btrfs-progs/check
Mark Harmstone 945cfa1ae3 btrfs-progs: check: add check for too many csum entries
My tool ntfs2btrfs has been creating btrfs volumes in a way that the
kernel doesn't like, but which isn't picked up by btrfs check - see
maharmstone/ntfs2btrfs#23 for the details, including a backtrace. This
patch adds a check for when a csum item contains too many entries -
effectively it ensures that there's always at least sizeof(struct
btrfs_item) bytes free in the tree, otherwise btrfs_del_csums can throw
an error.

max_entries is the value of the __MAX_CSUM_ITEMS macro in
fs/btrfs/file-item.c.

Pull-request: #401
Signed-off-by: Mark Harmstone <mark@harmstone.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2021-11-18 10:17:21 +01:00
..
btrfsck.h btrfs-progs: libbtrfs: remove unneeded BTRFS_FLAT_INCLUDES protections 2021-10-08 20:47:03 +02:00
common.h btrfs-progs: check: detect and fix invalid used for block groups 2021-08-25 15:38:54 +02:00
main.c btrfs-progs: check: add check for too many csum entries 2021-11-18 10:17:21 +01:00
mode-common.c btrfs-progs: cache csum_size and csum_type in btrfs_fs_info 2021-11-05 12:50:03 +01:00
mode-common.h btrfs-progs: require full nodesize alignement for subpage support 2021-08-20 14:45:58 +02:00
mode-lowmem.c btrfs-progs: check: fix a lowmem mode crash where fatal error is not properly handled 2021-11-04 20:56:42 +01:00
mode-lowmem.h btrfs-progs: check btrfs_super_used in lowmem check 2021-08-25 15:38:54 +02:00
mode-original.h btrfs-progs: use btrfs_key for btrfs_check_node() and btrfs_check_leaf() 2021-09-07 13:58:44 +02:00
qgroup-verify.c btrfs-progs: move repair.[ch] to common/ 2021-05-06 16:41:47 +02:00
qgroup-verify.h btrfs-progs: move ctree.c to kernel-shared/ 2020-08-31 17:01:05 +02:00