e1000e: Fix check_for_link return value with autoneg off
[pandora-kernel.git] / fs / ceph / super.c
index b48f15f..8bfafe5 100644 (file)
@@ -70,8 +70,14 @@ static int ceph_statfs(struct dentry *dentry, struct kstatfs *buf)
        /*
         * express utilization in terms of large blocks to avoid
         * overflow on 32-bit machines.
+        *
+        * NOTE: for the time being, we make bsize == frsize to humor
+        * not-yet-ancient versions of glibc that are broken.
+        * Someday, we will probably want to report a real block
+        * size...  whatever that may mean for a network file system!
         */
        buf->f_bsize = 1 << CEPH_BLOCK_SHIFT;
+       buf->f_frsize = 1 << CEPH_BLOCK_SHIFT;
        buf->f_blocks = le64_to_cpu(st.kb) >> (CEPH_BLOCK_SHIFT-10);
        buf->f_bfree = le64_to_cpu(st.kb_avail) >> (CEPH_BLOCK_SHIFT-10);
        buf->f_bavail = le64_to_cpu(st.kb_avail) >> (CEPH_BLOCK_SHIFT-10);
@@ -79,7 +85,6 @@ static int ceph_statfs(struct dentry *dentry, struct kstatfs *buf)
        buf->f_files = le64_to_cpu(st.num_objects);
        buf->f_ffree = -1;
        buf->f_namelen = NAME_MAX;
-       buf->f_frsize = PAGE_CACHE_SIZE;
 
        /* leave fsid little-endian, regardless of host endianness */
        fsid = *(u64 *)(&monmap->fsid) ^ *((u64 *)&monmap->fsid + 1);
@@ -356,8 +361,10 @@ static int ceph_show_options(struct seq_file *m, struct vfsmount *mnt)
        if (opt->flags & CEPH_OPT_NOCRC)
                seq_puts(m, ",nocrc");
 
-       if (opt->name)
-               seq_printf(m, ",name=%s", opt->name);
+       if (opt->name) {
+               seq_puts(m, ",name=");
+               seq_escape(m, opt->name, ", \t\n\\");
+       }
        if (opt->key)
                seq_puts(m, ",secret=<hidden>");
 
@@ -400,7 +407,7 @@ static int ceph_show_options(struct seq_file *m, struct vfsmount *mnt)
        if (fsopt->max_readdir_bytes != CEPH_MAX_READDIR_BYTES_DEFAULT)
                seq_printf(m, ",readdir_max_bytes=%d", fsopt->max_readdir_bytes);
        if (strcmp(fsopt->snapdir_name, CEPH_SNAPDIRNAME_DEFAULT))
-               seq_printf(m, ",snapdirname=%s", fsopt->snapdir_name);
+               seq_show_option(m, "snapdirname", fsopt->snapdir_name);
        return 0;
 }
 
@@ -906,14 +913,20 @@ static int __init init_ceph(void)
        if (ret)
                goto out;
 
-       ret = register_filesystem(&ceph_fs_type);
+       ret = ceph_snap_init();
        if (ret)
                goto out_icache;
 
+       ret = register_filesystem(&ceph_fs_type);
+       if (ret)
+               goto out_snap;
+
        pr_info("loaded (mds proto %d)\n", CEPH_MDSC_PROTOCOL);
 
        return 0;
 
+out_snap:
+       ceph_snap_exit();
 out_icache:
        destroy_caches();
 out:
@@ -924,6 +937,7 @@ static void __exit exit_ceph(void)
 {
        dout("exit_ceph\n");
        unregister_filesystem(&ceph_fs_type);
+       ceph_snap_exit();
        destroy_caches();
 }