]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: fill in kstatfs f_fsid
authorSage Weil <sage@newdream.net>
Fri, 12 Sep 2008 19:46:43 +0000 (12:46 -0700)
committerSage Weil <sage@newdream.net>
Fri, 12 Sep 2008 19:46:43 +0000 (12:46 -0700)
src/TODO
src/kernel/super.c

index f18bf553cb2e799c229c2045fe341dd1f1f58f23..dd8d1248751ed3e57600ce5f92ad48e9e34b2795 100644 (file)
--- a/src/TODO
+++ b/src/TODO
@@ -52,12 +52,8 @@ userspace client
 - fix readdir vs fragment race by keeping a separate frag pos, and ignoring dentries below it
 
 kernel client
-- statfs fsid should xor the ceph_fsid hi/low words
 - async writepages?
   - we want to saturate network with writeback on a single file
-- add i_frag_mutex to protect the frag tree..
-  - get rid of ugly i_lock vs kmalloc juggling  in get_or_create_frag
-- fsync on dir?  what is that supposed to do?
 - make writepages maybe skip pages with errors?
   - EIO, or ENOSPC?
   - ... writeback vs ENOSPC vs flush vs close()... hrm...
index eb5ba2873da8972578074de30c29d6c16d2e81d5..598dd24b7144c4ed565662cd68dac2c3aa544f07 100644 (file)
@@ -76,7 +76,9 @@ static void ceph_put_super(struct super_block *s)
 static int ceph_statfs(struct dentry *dentry, struct kstatfs *buf)
 {
        struct ceph_client *client = ceph_inode_to_client(dentry->d_inode);
+       struct ceph_monmap *monmap = client->monc.monmap;
        struct ceph_statfs st;
+       __le64 fsid;
        int err;
 
        dout(30, "ceph_statfs\n");
@@ -92,10 +94,13 @@ static int ceph_statfs(struct dentry *dentry, struct kstatfs *buf)
        buf->f_bavail = st.f_avail >> (CEPH_BLOCK_SHIFT-10);
        buf->f_files = st.f_objects;
        buf->f_ffree = -1;
-       /* fsid? */
        buf->f_namelen = PATH_MAX;
        buf->f_frsize = 4096;
 
+       fsid = monmap->fsid.major ^ monmap->fsid.minor;
+       buf->f_fsid.val[0] = fsid & 0xffffffff;
+       buf->f_fsid.val[1] = fsid >> 32;
+
        return 0;
 }