]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - fs/fuse/inode.c
fuse: allow control of adaptive readdirplus use
[karo-tx-linux.git] / fs / fuse / inode.c
index 9876a87255fe28b138bdd277c256581682d9dc93..01353ed75750c20f574ad9f09e4c6a3c2a739f5b 100644 (file)
@@ -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;
@@ -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);