btrfs-progs/check
Qu Wenruo 6674a952ff btrfs-progs: check/lowmem: detect invalid file extents for symbolic links
[BUG]
There is a recent bug that btrfs/012 fails and kernel rejects to read a
symbolic link which is backed by a regular extent.

Furthremore in that case, "btrfs check --mode=lowmem" doesn't detect such
problem at all.

[CAUSE]
For symbolic links, we only allow inline extents, and this means we should
only have a symbolic link target which is smaller than 4K.

But lowmem mode btrfs check doesn't handle symbolic link inodes any
differently, thus it doesn't check if the file extents are inlined or not,
nor reporting this problem as an error.

[FIX]
When processing data extents, if we find the owning inode is a symbolic
link, and the file extent is regular/preallocated, report an error for
the bad file extent item.

Signed-off-by: Qu Wenruo <wqu@suse.com>
2024-09-17 14:33:22 +02:00
..
common.h btrfs-progs: add extra chunk alignment checks 2024-01-16 19:14:37 +01:00
main.c btrfs-progs: check/original: detect invalid file extent items for 2024-09-17 14:33:22 +02:00
mode-common.c btrfs-progs: fix warnings reported by -Wold-style-definition 2024-07-30 19:53:32 +02:00
mode-common.h btrfs-progs: check: use bool for option status variables 2024-04-30 19:34:52 +02:00
mode-lowmem.c btrfs-progs: check/lowmem: detect invalid file extents for symbolic links 2024-09-17 14:33:22 +02:00
mode-lowmem.h btrfs-progs: do not check ram_bytes for non-compressed data extents 2024-06-25 17:42:17 +02:00
mode-original.h btrfs-progs: do not check ram_bytes for non-compressed data extents 2024-06-25 17:42:17 +02:00
qgroup-verify.c btrfs-progs: reorder key initializations 2024-04-30 21:49:15 +02:00
qgroup-verify.h
repair.c btrfs-progs: reorder key initializations 2024-04-30 21:49:15 +02:00
repair.h btrfs-progs: clean up includes, using include-what-you-use 2023-10-03 01:11:57 +02:00