ceph: don't enable rbytes mount option by default
authorYan, Zheng <zyan@redhat.com>
Mon, 25 Jan 2016 02:44:33 +0000 (10:44 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Fri, 25 Mar 2016 17:51:41 +0000 (18:51 +0100)
When rbytes mount option is enabled, directory size is recursive
size. Recursive size is not updated instantly. This can cause
directory size to change between successive stat(1)

Signed-off-by: Yan, Zheng <zyan@redhat.com>
fs/ceph/super.c
fs/ceph/super.h

index c941fd1a8eb806ec0b67c6e816708fb65c85779f..e82acc6f3ac344a1a158216b5d1164192626b6f0 100644 (file)
@@ -439,8 +439,8 @@ static int ceph_show_options(struct seq_file *m, struct dentry *root)
 
        if (fsopt->flags & CEPH_MOUNT_OPT_DIRSTAT)
                seq_puts(m, ",dirstat");
-       if ((fsopt->flags & CEPH_MOUNT_OPT_RBYTES) == 0)
-               seq_puts(m, ",norbytes");
+       if ((fsopt->flags & CEPH_MOUNT_OPT_RBYTES))
+               seq_puts(m, ",rbytes");
        if (fsopt->flags & CEPH_MOUNT_OPT_NOASYNCREADDIR)
                seq_puts(m, ",noasyncreaddir");
        if ((fsopt->flags & CEPH_MOUNT_OPT_DCACHE) == 0)
index 9c458eb522458da2364238cef2e92530ace87df9..d4425b172bb669f251313654e75d9c7fc37d2208 100644 (file)
@@ -37,8 +37,7 @@
 #define CEPH_MOUNT_OPT_FSCACHE         (1<<10) /* use fscache */
 #define CEPH_MOUNT_OPT_NOPOOLPERM      (1<<11) /* no pool permission check */
 
-#define CEPH_MOUNT_OPT_DEFAULT    (CEPH_MOUNT_OPT_RBYTES | \
-                                  CEPH_MOUNT_OPT_DCACHE)
+#define CEPH_MOUNT_OPT_DEFAULT    CEPH_MOUNT_OPT_DCACHE
 
 #define ceph_set_mount_opt(fsc, opt) \
        (fsc)->mount_options->flags |= CEPH_MOUNT_OPT_##opt;