diff options
author | David Sterba <dsterba@suse.com> | 2015-11-27 16:31:35 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-01-07 15:01:15 +0100 |
commit | e4058b54d1e442b6b3eca949f0d63d49ba2b020d (patch) | |
tree | dead11c1b6c35da853a74f133f45f55ffd107e4f /fs/btrfs/inode.c | |
parent | 4d4ab6d6bc05ba65169de9a5391e6ccbe09d8719 (diff) | |
download | lwn-e4058b54d1e442b6b3eca949f0d63d49ba2b020d.tar.gz lwn-e4058b54d1e442b6b3eca949f0d63d49ba2b020d.zip |
btrfs: cleanup, use enum values for btrfs_path reada
Replace the integers by enums for better readability. The value 2 does
not have any meaning since a717531942f488209dded30f6bc648167bcefa72
"Btrfs: do less aggressive btree readahead" (2009-01-22).
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 3e1398b123aa..dc2c1bedbafa 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -3342,7 +3342,7 @@ int btrfs_orphan_cleanup(struct btrfs_root *root) ret = -ENOMEM; goto out; } - path->reada = -1; + path->reada = READA_BACK; key.objectid = BTRFS_ORPHAN_OBJECTID; key.type = BTRFS_ORPHAN_ITEM_KEY; @@ -4308,7 +4308,7 @@ int btrfs_truncate_inode_items(struct btrfs_trans_handle *trans, path = btrfs_alloc_path(); if (!path) return -ENOMEM; - path->reada = -1; + path->reada = READA_BACK; /* * We want to drop from the next block forward in case this new size is @@ -5744,7 +5744,7 @@ static int btrfs_real_readdir(struct file *file, struct dir_context *ctx) if (!path) return -ENOMEM; - path->reada = 1; + path->reada = READA_FORWARD; if (key_type == BTRFS_DIR_INDEX_KEY) { INIT_LIST_HEAD(&ins_list); @@ -6775,7 +6775,7 @@ again: * Chances are we'll be called again, so go ahead and do * readahead */ - path->reada = 1; + path->reada = READA_FORWARD; } ret = btrfs_lookup_file_extent(trans, root, path, |