Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 352906
b: refs/heads/master
c: 634734b
h: refs/heads/master
v: v3
  • Loading branch information
Eric Wong authored and Miklos Szeredi committed Feb 7, 2013
1 parent e736d93 commit 84231a8
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7e98d53086d18c877cb44e9065219335184024de
refs/heads/master: 634734b63ac39e137a1c623ba74f3e062b6577db
2 changes: 2 additions & 0 deletions trunk/fs/fuse/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 4 additions & 1 deletion trunk/fs/fuse/fuse_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -514,9 +514,12 @@ struct fuse_conn {
/** Use enhanced/automatic page cache invalidation. */
unsigned auto_inval_data:1;

/** Does the filesystem support readdir-plus? */
/** Does the filesystem support readdirplus? */
unsigned do_readdirplus:1;

/** Does the filesystem want adaptive readdirplus? */
unsigned readdirplus_auto:1;

/** The number of requests waiting for completion */
atomic_t num_waiting;

Expand Down
4 changes: 3 additions & 1 deletion trunk/fs/fuse/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -866,6 +866,8 @@ static void process_init_reply(struct fuse_conn *fc, struct fuse_req *req)
fc->auto_inval_data = 1;
if (arg->flags & FUSE_DO_READDIRPLUS)
fc->do_readdirplus = 1;
if (arg->flags & FUSE_READDIRPLUS_AUTO)
fc->readdirplus_auto = 1;
} else {
ra_pages = fc->max_read / PAGE_CACHE_SIZE;
fc->no_lock = 1;
Expand Down Expand Up @@ -893,7 +895,7 @@ static void fuse_send_init(struct fuse_conn *fc, struct fuse_req *req)
FUSE_EXPORT_SUPPORT | FUSE_BIG_WRITES | FUSE_DONT_MASK |
FUSE_SPLICE_WRITE | FUSE_SPLICE_MOVE | FUSE_SPLICE_READ |
FUSE_FLOCK_LOCKS | FUSE_IOCTL_DIR | FUSE_AUTO_INVAL_DATA |
FUSE_DO_READDIRPLUS;
FUSE_DO_READDIRPLUS | FUSE_READDIRPLUS_AUTO;
req->in.h.opcode = FUSE_INIT;
req->in.numargs = 1;
req->in.args[0].size = sizeof(*arg);
Expand Down
3 changes: 3 additions & 0 deletions trunk/include/uapi/linux/fuse.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ struct fuse_file_lock {
* FUSE_FLOCK_LOCKS: remote locking for BSD style file locks
* FUSE_HAS_IOCTL_DIR: kernel supports ioctl on directories
* FUSE_AUTO_INVAL_DATA: automatically invalidate cached pages
* FUSE_DO_READDIRPLUS: do READDIRPLUS (READDIR+LOOKUP in one)
* FUSE_READDIRPLUS_AUTO: adaptive readdirplus
*/
#define FUSE_ASYNC_READ (1 << 0)
#define FUSE_POSIX_LOCKS (1 << 1)
Expand All @@ -233,6 +235,7 @@ struct fuse_file_lock {
#define FUSE_HAS_IOCTL_DIR (1 << 11)
#define FUSE_AUTO_INVAL_DATA (1 << 12)
#define FUSE_DO_READDIRPLUS (1 << 13)
#define FUSE_READDIRPLUS_AUTO (1 << 14)

/**
* CUSE INIT request/reply flags
Expand Down

0 comments on commit 84231a8

Please sign in to comment.