From d4e86a17d127e39747cb38a13c72d4cc56894f90 Mon Sep 17 00:00:00 2001 From: Or Ozeri Date: Mon, 28 May 2018 13:49:54 +0300 Subject: [PATCH] Revert "enable FUSE read_sync by default" This reverts commit 86b0921ac40ad0a34cd4202901efc2f4f774777b. Conflicts: src/s3fs.cpp --- src/s3fs.cpp | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/src/s3fs.cpp b/src/s3fs.cpp index 5430fac..098f1a1 100644 --- a/src/s3fs.cpp +++ b/src/s3fs.cpp @@ -120,7 +120,6 @@ static bool nocopyapi = false; static bool norenameapi = false; static bool nonempty = false; static bool allow_other = false; -static bool fuse_read_mode_set = false; static bool load_iamrole = false; static uid_t s3fs_uid = 0; static gid_t s3fs_gid = 0; @@ -4323,10 +4322,6 @@ static int my_fuse_opt_proc(void* data, const char* arg, int key, struct fuse_ar allow_other = true; return 1; // continue for fuse option } - if(0 == strcmp(arg, "sync_read") || 0 == strcmp(arg, "async_read")){ - fuse_read_mode_set = true; - return 1; // continue for fuse option - } if(0 == STR2NCMP(arg, "mp_umask=")){ mp_umask = strtol(strchr(arg, '=') + sizeof(char), NULL, 0); mp_umask &= (S_IRWXU | S_IRWXG | S_IRWXO); @@ -4912,17 +4907,6 @@ int main(int argc, char* argv[]) exit(EXIT_FAILURE); } - // s3fs read is sync (fdent_lock is locked while reading) - // FUSE is async read by default - // switch FUSE to sync read to avoid hitting FUSE's max_background limit - // as well as to make sure that big read requests that are splitted by the kernel - // are always read in-order - if (!fuse_read_mode_set && 0 != fuse_opt_add_arg(&custom_args, "-osync_read")){ - S3fsCurl::DestroyS3fsCurl(); - s3fs_destroy_global_ssl(); - exit(EXIT_FAILURE); - } - // [NOTE] // exclusive option check here. //