]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: some export.c comments
authorSage Weil <sage@newdream.net>
Thu, 16 Oct 2008 23:39:43 +0000 (16:39 -0700)
committerSage Weil <sage@newdream.net>
Thu, 16 Oct 2008 23:39:43 +0000 (16:39 -0700)
src/kernel/addr.c
src/kernel/export.c

index d1303d3640c5897b68fa7b9a1525d831ea3785ce..bea6ec70868e6d6e0d38866537ef39e43ccec113 100644 (file)
@@ -742,7 +742,7 @@ get_more_pages:
                                                len, locked_pages);
                req = NULL;
                /*
-                * FIXME: writepages_start fail (ENOMEM?) we should
+                * FIXME: if writepages_start fails (ENOMEM?) we should
                 * really redirty all those pages and release req..
                 */
 
index 296d10daca957de7c41beb06d45c6518588a1874..2debdeca63a6973fd1cbd38c5639e57893ba5367 100644 (file)
@@ -1,7 +1,6 @@
 #include <linux/exportfs.h>
 
 #include "ceph_fs.h"
-
 #include "ceph_debug.h"
 
 int ceph_debug_export = -1;
@@ -13,6 +12,18 @@ int ceph_debug_export = -1;
 /*
  * fh is N tuples of
  *  <ino, parent's d_name.hash>
+ *
+ * This is only a semi-reliable strategy.  The fundamental issue is
+ * that ceph doesn't not have a way to locate an arbitrary inode by
+ * ino.  Keeping a few parents in the handle increases the probability
+ * that we'll find it in one of the MDS caches, but it is by no means
+ * a guarantee.
+ *
+ * Also, the FINDINODE request is currently directed at a single MDS.
+ * It should probably try all MDS's before giving up.  For a single MDS
+ * system that isn't a problem.
+ *
+ * In the meantime, this works reasonably well for basic usage.
  */
 
 #define IPSZ (sizeof(struct ceph_inopath_item) / sizeof(u32))
@@ -33,9 +44,9 @@ static int ceph_encode_fh(struct dentry *dentry, __u32 *rawfh, int *max_len,
                return -ENOSPC;
 
        /*
-        * pretty sure this is racy
+        * pretty sure this is racy.  caller holds dentry->d_lock, but
+        * not parents'.
         */
-       /* note: caller holds dentry->d_lock */
        fh[0].ino = cpu_to_le64(ceph_vino(dentry->d_inode).ino);
        fh[0].dname_hash = cpu_to_le32(dentry->d_name.hash);
        len = 1;