diff options
author | Eric Wong <normalperson@yhbt.net> | 2013-02-06 22:29:01 +0000 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2013-02-07 14:25:44 +0100 |
commit | 634734b63ac39e137a1c623ba74f3e062b6577db (patch) | |
tree | 65e2414fb7d31005d473719f7158f29bc9ca48d0 /fs/fuse/dir.c | |
parent | 7e98d53086d18c877cb44e9065219335184024de (diff) | |
download | blackbird-op-linux-634734b63ac39e137a1c623ba74f3e062b6577db.tar.gz blackbird-op-linux-634734b63ac39e137a1c623ba74f3e062b6577db.zip |
fuse: allow control of adaptive readdirplus use
For some filesystems (e.g. GlusterFS), the cost of performing a
normal readdir and readdirplus are identical. Since adaptively
using readdirplus has no benefit for those systems, give
users/filesystems the option to control adaptive readdirplus use.
v2 of this patch incorporates Miklos's suggestion to simplify the code,
as well as improving consistency of macro names and documentation.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'fs/fuse/dir.c')
-rw-r--r-- | fs/fuse/dir.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 2b112d978e9f..85065221a58a 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -21,6 +21,8 @@ static bool fuse_use_readdirplus(struct inode *dir, struct file *filp) if (!fc->do_readdirplus) return false; + if (!fc->readdirplus_auto) + return true; if (test_and_clear_bit(FUSE_I_ADVISE_RDPLUS, &fi->state)) return true; if (filp->f_pos == 0) |