diff options
author | Greg Farnum <gregf@hq.newdream.net> | 2010-10-06 15:46:30 -0700 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-10-07 08:00:24 -0700 |
commit | 21b559de56695d36b3f0819b7e2454737db254f8 (patch) | |
tree | 41559b37754818d637d11aec1b61a138d7a8efb5 /fs/ceph | |
parent | bba0cd0e3d97472855840af817b766e3f632a501 (diff) | |
download | op-kernel-dev-21b559de56695d36b3f0819b7e2454737db254f8.zip op-kernel-dev-21b559de56695d36b3f0819b7e2454737db254f8.tar.gz |
ceph: send cap release message early on failed revoke.
If an MDS tries to revoke caps that we don't have, we want to send
releases early since they probably contain the caps message the MDS
is looking for.
Previously, we only sent the messages if we didn't have the inode either. But
in a multi-mds system we can retain the inode after dropping all caps for
a single MDS.
Signed-off-by: Greg Farnum <gregf@hq.newdream.net>
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/caps.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 73c1530..97de325 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -2774,15 +2774,7 @@ void ceph_handle_caps(struct ceph_mds_session *session, if (op == CEPH_CAP_OP_IMPORT) __queue_cap_release(session, vino.ino, cap_id, mseq, seq); - - /* - * send any full release message to try to move things - * along for the mds (who clearly thinks we still have this - * cap). - */ - ceph_add_cap_releases(mdsc, session); - ceph_send_cap_releases(mdsc, session); - goto done; + goto flush_cap_releases; } /* these will work even if we don't have a cap yet */ @@ -2810,7 +2802,7 @@ void ceph_handle_caps(struct ceph_mds_session *session, dout(" no cap on %p ino %llx.%llx from mds%d\n", inode, ceph_ino(inode), ceph_snap(inode), mds); spin_unlock(&inode->i_lock); - goto done; + goto flush_cap_releases; } /* note that each of these drops i_lock for us */ @@ -2834,6 +2826,17 @@ void ceph_handle_caps(struct ceph_mds_session *session, ceph_cap_op_name(op)); } + goto done; + +flush_cap_releases: + /* + * send any full release message to try to move things + * along for the mds (who clearly thinks we still have this + * cap). + */ + ceph_add_cap_releases(mdsc, session); + ceph_send_cap_releases(mdsc, session); + done: mutex_unlock(&session->s_mutex); done_unlocked: |