The I_S.INNODB_BUFFER_PAGE query seems unsafe to me, as it queries the buffer pool and not the tablespace. The innochecksum approach to find unused pages at the end to truncate + header field patching seems to be as OK as it could possibly be given the method.