Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

jinbaohong and committed by
David Sterba
23d4f616 4681dbcf

+1 -1
+1 -1
fs/btrfs/volumes.c
··· 8026 8026 if (!path) 8027 8027 return -ENOMEM; 8028 8028 8029 - path->reada = READA_FORWARD; 8029 + path->reada = READA_FORWARD_ALWAYS; 8030 8030 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0); 8031 8031 if (ret < 0) 8032 8032 return ret;