]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
btrfs: use READA_FORWARD_ALWAYS for device extent verification
authorjinbaohong <jinbaohong@synology.com>
Wed, 14 Jan 2026 01:18:15 +0000 (01:18 +0000)
committerDavid Sterba <dsterba@suse.com>
Tue, 3 Feb 2026 06:51:43 +0000 (07:51 +0100)
commit23d4f616cb879de3ffea9f686ac60b44740beacb
tree516affb600b2fcccb764522746e0e8e99ec23bad
parent4681dbcfdc33d6627193425222819577a89857cc
btrfs: use READA_FORWARD_ALWAYS for device extent verification

btrfs_verify_dev_extents() iterates through the entire device tree
during mount to verify dev extents against chunks. Since this function
scans the whole tree, READA_FORWARD_ALWAYS is more appropriate than
READA_FORWARD.

While the device tree is typically small (a few hundred KB even for
multi-TB filesystems), using the correct readahead mode for full-tree
iteration is more consistent with the intended usage.

Signed-off-by: robbieko <robbieko@synology.com>
Signed-off-by: jinbaohong <jinbaohong@synology.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c