]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ceph: make 'nocopyfrom' a default mount option
authorLuis Henriques <lhenriques@suse.com>
Mon, 10 Dec 2018 10:23:12 +0000 (10:23 +0000)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 11 Dec 2018 17:22:17 +0000 (18:22 +0100)
Since we found a problem with the 'copy-from' operation after objects have
been truncated, offloading object copies to OSDs should be discouraged
until the issue is fixed.

Thus, this patch adds the 'nocopyfrom' mount option to the default mount
options which effectily means that remote copies won't be done in
copy_file_range unless they are explicitly enabled at mount time.

[ Adjust ceph_show_options() accordingly. ]

Link: https://tracker.ceph.com/issues/37378
Signed-off-by: Luis Henriques <lhenriques@suse.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/super.c
fs/ceph/super.h

index b5ecd6f50360d53e0fe24c4ea79416722e93fc6c..4e9a7cc488da16efea5f2a69b95f64bd23e1a245 100644 (file)
@@ -563,8 +563,8 @@ static int ceph_show_options(struct seq_file *m, struct dentry *root)
                seq_puts(m, ",noacl");
 #endif
 
-       if (fsopt->flags & CEPH_MOUNT_OPT_NOCOPYFROM)
-               seq_puts(m, ",nocopyfrom");
+       if ((fsopt->flags & CEPH_MOUNT_OPT_NOCOPYFROM) == 0)
+               seq_puts(m, ",copyfrom");
 
        if (fsopt->mds_namespace)
                seq_show_option(m, "mds_namespace", fsopt->mds_namespace);
index c005a5400f2ed9b1e0e932ea680c2f0824020277..79a265ba92006b309796c525a5a2db3e9522f076 100644 (file)
@@ -42,7 +42,9 @@
 #define CEPH_MOUNT_OPT_NOQUOTADF       (1<<13) /* no root dir quota in statfs */
 #define CEPH_MOUNT_OPT_NOCOPYFROM      (1<<14) /* don't use RADOS 'copy-from' op */
 
-#define CEPH_MOUNT_OPT_DEFAULT    CEPH_MOUNT_OPT_DCACHE
+#define CEPH_MOUNT_OPT_DEFAULT                 \
+       (CEPH_MOUNT_OPT_DCACHE |                \
+        CEPH_MOUNT_OPT_NOCOPYFROM)
 
 #define ceph_set_mount_opt(fsc, opt) \
        (fsc)->mount_options->flags |= CEPH_MOUNT_OPT_##opt;