summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Markuze <amarkuze@redhat.com>2026-08-27 15:16:21 +0000
committerIlya Dryomov <idryomov@gmail.com>2026-09-02 12:23:05 +0200
commitdc173b37415e8f738fc4de477490056b479ddc9f (patch)
tree4b3637bdd8556033167429077bcc7f6afef6b207
parentf75987e543c243e19f49fe32ce870b2e24ab8c23 (diff)
downloadlinux-stable-dc173b37415e8f738fc4de477490056b479ddc9f.tar.gz
linux-stable-dc173b37415e8f738fc4de477490056b479ddc9f.zip
ceph: apply nearfull_sync option on remount
ceph_parse_mount_param() stores nearfull_sync / nonearfull_sync on the temporary fs_context options, but ceph_reconfigure_fc() never copied CEPH_MOUNT_OPT_NEARFULL_SYNC onto the live mount. Remount therefore succeeded while writes and /proc/mounts kept the original-mount flag. Apply the flag the same way as ASYNC_DIROPS and SPARSEREAD so remount can enable or disable NEARFULL IOCB_DSYNC promotion. Fixes: c7a12c20bfba ("ceph: make nearfull sync writes opt-in") Signed-off-by: Alex Markuze <amarkuze@redhat.com> Reviewed-by: Xiubo Li <xiubo.li@clyso.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
-rw-r--r--fs/ceph/super.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index 15edea30dc8b..72935f665f11 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -1420,6 +1420,11 @@ static int ceph_reconfigure_fc(struct fs_context *fc)
else
ceph_clear_mount_opt(fsc, SPARSEREAD);
+ if (fsopt->flags & CEPH_MOUNT_OPT_NEARFULL_SYNC)
+ ceph_set_mount_opt(fsc, NEARFULL_SYNC);
+ else
+ ceph_clear_mount_opt(fsc, NEARFULL_SYNC);
+
if (strcmp_null(fsc->mount_options->mon_addr, fsopt->mon_addr)) {
kfree(fsc->mount_options->mon_addr);
fsc->mount_options->mon_addr = fsopt->mon_addr;