diff options
| author | jinbaohong <jinbaohong@synology.com> | 2026-01-14 04:18:15 +0300 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2026-02-03 09:51:43 +0300 |
| commit | 23d4f616cb879de3ffea9f686ac60b44740beacb (patch) | |
| tree | 516affb600b2fcccb764522746e0e8e99ec23bad | |
| parent | 4681dbcfdc33d6627193425222819577a89857cc (diff) | |
| download | linux-23d4f616cb879de3ffea9f686ac60b44740beacb.tar.xz | |
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>
| -rw-r--r-- | fs/btrfs/volumes.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 844657f23e7d..c4be17fcb87a 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -8026,7 +8026,7 @@ int btrfs_verify_dev_extents(struct btrfs_fs_info *fs_info) if (!path) return -ENOMEM; - path->reada = READA_FORWARD; + path->reada = READA_FORWARD_ALWAYS; ret = btrfs_search_slot(NULL, root, &key, path, 0, 0); if (ret < 0) return ret; |
