Whamcloud - gitweb
LU-16381 ofd: fix soft_sync_limit lprocfs write handler 62/49362/8
authorAndrew Perepechko <andrew.perepechko@hpe.com>
Sun, 11 Dec 2022 11:22:49 +0000 (14:22 +0300)
committerOleg Drokin <green@whamcloud.com>
Mon, 13 Mar 2023 06:12:08 +0000 (06:12 +0000)
soft_sync_limit_store() must return the size of the input buffer
in the success case, otherwise the writer may loop forever.

Change-Id: I2d926eaba7062c495a56c6ee32e1b82e08df63ce
Signed-off-by: Andrew Perepechko <andrew.perepechko@hpe.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49362
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/ofd/lproc_ofd.c

index ae1ca11..74020a6 100644 (file)
@@ -584,7 +584,7 @@ static ssize_t soft_sync_limit_store(struct kobject *kobj,
                return rc;
 
        ofd->ofd_soft_sync_limit = val;
-       return 0;
+       return count;
 }
 LUSTRE_RW_ATTR(soft_sync_limit);