From 629d5a962b396da766a30483a6c33de855262075 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 16 Oct 2008 16:39:43 -0700 Subject: [PATCH] kclient: some export.c comments --- src/kernel/addr.c | 2 +- src/kernel/export.c | 17 ++++++++++++++--- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/kernel/addr.c b/src/kernel/addr.c index d1303d3640c58..bea6ec70868e6 100644 --- a/src/kernel/addr.c +++ b/src/kernel/addr.c @@ -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.. */ diff --git a/src/kernel/export.c b/src/kernel/export.c index 296d10daca957..2debdeca63a69 100644 --- a/src/kernel/export.c +++ b/src/kernel/export.c @@ -1,7 +1,6 @@ #include #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 * + * + * 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; -- 2.39.5