summaryrefslogtreecommitdiff
path: root/volumes.c
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2018-05-10 19:22:11 +0300
committerDavid Sterba <dsterba@suse.com>2018-06-07 16:37:38 +0200
commit9e2bf8c8abecf878ea5928f2751e92433af124c7 (patch)
tree75f7d294bcfa8bc1fa50ea2aec1ae64f0711313a /volumes.c
parent6386ae4d8c6644630ab3f9aa1c92d8aed3b81aea (diff)
btrfs-progs: Use symbolic names for read ahead behavior
Presently btrfs-progs haven't pulled the enum defining the symbolic names of read ahead constants. This commit adds the enum and simultaneously converts all usages to respective symbolic name. No functional change, just making the code human readable. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'volumes.c')
-rw-r--r--volumes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/volumes.c b/volumes.c
index ad3016dc..9379d2f6 100644
--- a/volumes.c
+++ b/volumes.c
@@ -420,7 +420,7 @@ static int find_free_dev_extent_start(struct btrfs_device *device,
goto out;
}
- path->reada = 2;
+ path->reada = READA_FORWARD;
key.objectid = device->devid;
key.offset = search_start;
@@ -846,7 +846,7 @@ static int btrfs_device_avail_bytes(struct btrfs_trans_handle *trans,
key.offset = root->fs_info->alloc_start;
key.type = BTRFS_DEV_EXTENT_KEY;
- path->reada = 2;
+ path->reada = READA_FORWARD;
ret = btrfs_search_slot(trans, root, &key, path, 0, 0);
if (ret < 0)
goto error;