From fc85ec53a18a633872fad67d673f9d8fcb20b739 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 13 May 2008 08:36:29 -0700 Subject: [PATCH] kclient: comments. undo stupid in dir.c --- src/kernel/dir.c | 2 +- src/kernel/inode.c | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/kernel/dir.c b/src/kernel/dir.c index b931a57d7cae7..77f927ff61d75 100644 --- a/src/kernel/dir.c +++ b/src/kernel/dir.c @@ -372,7 +372,7 @@ static int ceph_create(struct inode *dir, struct dentry *dentry, int mode, dout(5, "create in dir %p dentry %p name '%.*s'\n", dir, dentry, dentry->d_name.len, dentry->d_name.name); - if (0 && nd) { + if (nd) { BUG_ON((nd->flags & LOOKUP_OPEN) == 0); err = ceph_lookup_open(dir, dentry, nd, mode); return err; diff --git a/src/kernel/inode.c b/src/kernel/inode.c index 9ed5a15ba535d..4987913af586a 100644 --- a/src/kernel/inode.c +++ b/src/kernel/inode.c @@ -505,8 +505,13 @@ int ceph_dentry_lease_valid(struct dentry *dentry) } - - +/* + * assimilate a full trace of inodes and dentries, from the root to + * the item relevant for this reply, into our cache. make any dcache + * changes needed to properly reflect the completed operation (e.g., + * call d_move). make note of the distribution of metadata across the + * mds cluster. + */ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req, struct ceph_mds_session *session) { @@ -527,8 +532,9 @@ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req, #if 0 /* - * to test op resends against a recovering mds, we pretend that - * write ops have no trace... + * if we resend completed ops to a recovering mds, we get no + * trace. pretend this is the case to ensure the 'no trace' + * handlers behave. */ if (rinfo->head->op & CEPH_MDS_OP_WRITE) { dout(0, "fill_trace faking empty trace on %d %s\n", -- 2.39.5