tools/cephfs: make journal pointer/header failure explicit
iIf the journal pointer and/or header is missing or corrupt, the tool silently returns with no-op. There is no dentry recovery happening if any of the objects are missing but it should be explicit to the user. This still doesn't change returning errnos on failures to maintain status quo until https://tracker.ceph.com/issues/77913 is addressed One important change: The condition to scan events is now changed from header_present to header_valid. The reason for this can be understood by reading JournalScanner::scan_header -- if the header could not be decoded, it is set to null, using this in JournalTool::recover_dentries would segfault and other corruptions include bad magic or inconsistent offsets. A recovery should not proceed with distorted magic/offset. Fixes: https://tracker.ceph.com/issues/76422 Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
D
Dhairya Parmar committed
0e9af4b99e04b5bd97b38ee3998a661014b26e9c
Parent: 627af6c