aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fuse/fuse_i.h
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2016-06-30 07:10:49 -0400
committerMiklos Szeredi <mszeredi@redhat.com>2016-06-30 07:10:49 -0400
commit5c672ab3f0ee0f78f7acad183f34db0f8781a200 (patch)
tree8504dad9b399cbef1a3e252c7253325d51740eae /fs/fuse/fuse_i.h
parent4c2e07c6a29e0129e975727b9f57eede813eea85 (diff)
fuse: serialize dirops by default
Negotiate with userspace filesystems whether they support parallel readdir and lookup. Disable parallelism by default for fear of breaking fuse filesystems. Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> Fixes: 9902af79c01a ("parallel lookups: actual switch to rwsem") Fixes: d9b3dbdcfd62 ("fuse: switch to ->iterate_shared()")
Diffstat (limited to 'fs/fuse/fuse_i.h')
-rw-r--r--fs/fuse/fuse_i.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h
index eddbe02c4028..929c383432b0 100644
--- a/fs/fuse/fuse_i.h
+++ b/fs/fuse/fuse_i.h
@@ -110,6 +110,9 @@ struct fuse_inode {
110 110
111 /** Miscellaneous bits describing inode state */ 111 /** Miscellaneous bits describing inode state */
112 unsigned long state; 112 unsigned long state;
113
114 /** Lock for serializing lookup and readdir for back compatibility*/
115 struct mutex mutex;
113}; 116};
114 117
115/** FUSE inode state bits */ 118/** FUSE inode state bits */
@@ -540,6 +543,9 @@ struct fuse_conn {
540 /** write-back cache policy (default is write-through) */ 543 /** write-back cache policy (default is write-through) */
541 unsigned writeback_cache:1; 544 unsigned writeback_cache:1;
542 545
546 /** allow parallel lookups and readdir (default is serialized) */
547 unsigned parallel_dirops:1;
548
543 /* 549 /*
544 * The following bitfields are only for optimization purposes 550 * The following bitfields are only for optimization purposes
545 * and hence races in setting them will not cause malfunction 551 * and hence races in setting them will not cause malfunction
@@ -956,4 +962,7 @@ int fuse_do_setattr(struct inode *inode, struct iattr *attr,
956 962
957void fuse_set_initialized(struct fuse_conn *fc); 963void fuse_set_initialized(struct fuse_conn *fc);
958 964
965void fuse_unlock_inode(struct inode *inode);
966void fuse_lock_inode(struct inode *inode);
967
959#endif /* _FS_FUSE_I_H */ 968#endif /* _FS_FUSE_I_H */