btrfs-progs/check
Mark Harmstone 6cf11f3e38 btrfs-progs: check: check order of inline extent refs
The kernel seems to order inline extent items in a particular way:
forward by sub-type, then reverse by hash. Having these out of order can
cause a volume to go readonly when deleting an inode.

See https://github.com/maharmstone/ntfs2btrfs/issues/51

With additional comments from the pull request:

 - lookup_inline_extent_backref() is skipping the remaining backref item
   if data/metadata item is smaller (either through the data hash, or
   metadata parent/ref_root) than the target range

 - the fix could be still missing in lowmem mode

 - image could be created according this comment
   https://github.com/maharmstone/ntfs2btrfs/issues/51#issuecomment-1500781204

 - due to late merge, the squota newly added key
   BTRFS_EXTENT_OWNER_REF_KEY was not part of the patch and the value of
   'hash' needs to be verified

Pull-request: #622
Signed-off-by: Mark Harmstone <mark@harmstone.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2023-10-21 15:51:07 +02:00
..
common.h btrfs-progs: sync extent-io-tree.[ch] and misc.h from the kernel 2023-05-26 18:02:29 +02:00
main.c btrfs-progs: check: check order of inline extent refs 2023-10-21 15:51:07 +02:00
mode-common.c btrfs-progs: clean up includes, using include-what-you-use 2023-10-03 01:11:57 +02:00
mode-common.h btrfs-progs: clean up includes, using include-what-you-use 2023-10-03 01:11:57 +02:00
mode-lowmem.c btrfs-progs: fix all variable shadowing 2023-10-10 19:16:29 +02:00
mode-lowmem.h btrfs-progs: check: update include lists 2022-10-11 09:06:12 +02:00
mode-original.h btrfs-progs: check: add check for metadata level mismatch 2023-09-12 23:18:34 +02:00
qgroup-verify.c btrfs-progs: fix all variable shadowing 2023-10-10 19:16:29 +02:00
qgroup-verify.h btrfs-progs: check: update include lists 2022-10-11 09:06:12 +02:00
repair.c btrfs-progs: fix all variable shadowing 2023-10-10 19:16:29 +02:00
repair.h btrfs-progs: clean up includes, using include-what-you-use 2023-10-03 01:11:57 +02:00