[Devel] [PATCH RHEL8 COMMIT] fuse: fix fs context

Konstantin Khorenko khorenko at virtuozzo.com
Thu Aug 5 19:04:26 MSK 2021


The commit is pushed to "branch-rh8-4.18.0-305.3.1.vz8.7.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh8-4.18.0-305.3.1.vz8.7.2
------>
commit 6970650b82db682474347395cd6ce2b44783fea3
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Thu Aug 5 19:04:26 2021 +0300

    fuse: fix fs context
    
    "source" option is parsed before all others.
    So, during OPT_SOURCE parse disable_close_wait is never set.
    
    int do_new_mount()
    {
           vfs_parse_fs_string(fc, "source", name, strlen(name));
           parse_monolithic_mount_data(fc, data);
    }
    
    https://jira.sw.ru/browse/PSBM-131961
    
    Fixes: 9796700bfe1b ("fuse: enable synchronous close for both "pstorage://" and
    "vstorage://" fs types")
    
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 fs/fuse/inode.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 218f9e43c279..81308d08a8ad 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -695,9 +695,7 @@ static int fuse_parse_param(struct fs_context *fc, struct fs_parameter *param)
 		if (fc->source &&
 		    (strncmp(fc->source, "pstorage://", 11) == 0 ||
 		     strncmp(fc->source, "vstorage://", 11) == 0)) {
-			if (!ctx->disable_close_wait)
-				ctx->close_wait = 1;
-
+			ctx->close_wait = 1;
 			ctx->compat_inval_files = 1;
 		} else
 			ctx->no_fiemap = 1;
@@ -775,6 +773,7 @@ static int fuse_parse_param(struct fs_context *fc, struct fs_parameter *param)
 
 	case OPT_DISABLE_CLOSE_WAIT:
 		ctx->disable_close_wait = 1;
+		ctx->close_wait = 0;
 		break;
 
 	case OPT_KIO_NAME: {


More information about the Devel mailing list