mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-11-13 07:56:30 +00:00
Allow -1 value to disable max_dirty_data (#1552)
This matches the man page.
This commit is contained in:
parent
f2c5e38724
commit
1a6d0826b5
@ -4492,11 +4492,12 @@ static int my_fuse_opt_proc(void* data, const char* arg, int key, struct fuse_ar
|
||||
}
|
||||
if(is_prefix(arg, "max_dirty_data=")){
|
||||
off_t size = static_cast<off_t>(cvt_strtoofft(strchr(arg, '=') + sizeof(char)));
|
||||
if(size < 50){
|
||||
if(size >= 50){
|
||||
size *= 1024 * 1024;
|
||||
}else if(size != -1){
|
||||
S3FS_PRN_EXIT("max_dirty_data option must be at least 50 MB.");
|
||||
return -1;
|
||||
}
|
||||
size *= 1024 * 1024;
|
||||
max_dirty_data = size;
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user