[sheepdog] [PATCH 2/3] add check for version of fuse before using 'big_writes'
Robin Dong
robin.k.dong at gmail.com
Thu Aug 22 11:51:02 CEST 2013
From: Robin Dong <sanbai at taobao.com>
The feature 'big_writes' in fuse only be supported from fuse-2.8, so if the fuse-library
in the system is lower than 2.8, we would not use option "-obig_writes".
Signed-off-by: Robin Dong <sanbai at taobao.com>
---
sheepfs/core.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/sheepfs/core.c b/sheepfs/core.c
index 71253aa..2d9cd6a 100644
--- a/sheepfs/core.c
+++ b/sheepfs/core.c
@@ -258,7 +258,9 @@ static int sheepfs_main_loop(char *mountpoint)
fuse_opt_add_arg(&args, "sheepfs"); /* placeholder for argv[0] */
fuse_opt_add_arg(&args, "-oallow_root");
- fuse_opt_add_arg(&args, "-obig_writes");
+ /* 'big_writes' support only from fuse-2.8 */
+ if (FUSE_USE_VERSION >= 28)
+ fuse_opt_add_arg(&args, "-obig_writes");
fuse_opt_add_arg(&args, "-okernel_cache");
fuse_opt_add_arg(&args, "-ofsname=sheepfs");
fuse_opt_add_arg(&args, mountpoint);
--
1.7.3.2
More information about the sheepdog
mailing list