From: Sage Weil Date: Tue, 7 Jun 2011 18:07:44 +0000 (-0700) Subject: client: allow caps to be dropped on another inode for requests X-Git-Tag: v0.30~102^2~21 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5e679d3ae6e5e3f5af438368baa695d7daab6715;p=ceph.git client: allow caps to be dropped on another inode for requests We need the ability to drop caps on another inode that isn't req->inode or req->old_inode in the request struct. Signed-off-by: Sage Weil --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 74d35049b48..47c5377f679 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -1154,6 +1154,10 @@ void Client::encode_cap_releases(MetaRequest *req, int mds) { encode_inode_release(req->old_inode, req, mds, req->old_inode_drop, req->old_inode_unless); + if (req->other_inode_drop && req->other_inode) + encode_inode_release(req->other_inode, req, + mds, req->other_inode_drop, + req->other_inode_unless); if (req->dentry_drop && req->dentry) encode_dentry_release(req->dentry, req, diff --git a/src/client/Client.h b/src/client/Client.h index ec71b2025b7..11db91ded17 100644 --- a/src/client/Client.h +++ b/src/client/Client.h @@ -114,9 +114,10 @@ struct MetaRequest { int old_inode_drop, old_inode_unless; int dentry_drop, dentry_unless; int old_dentry_drop, old_dentry_unless; + int other_inode_drop, other_inode_unless; vector cap_releases; Inode *inode; - Inode *old_inode; + Inode *old_inode, *other_inode; Dentry *dentry; //associated with path Dentry *old_dentry; //associated with path2 @@ -161,7 +162,8 @@ struct MetaRequest { old_inode_drop(0), old_inode_unless(0), dentry_drop(0), dentry_unless(0), old_dentry_drop(0), old_dentry_unless(0), - inode(NULL), old_inode(NULL), + other_inode_drop(0), other_inode_unless(0), + inode(NULL), old_inode(NULL), other_inode(NULL), dentry(NULL), old_dentry(NULL), mds(-1), resend_mds(-1), send_to_auth(false), sent_on_mseq(0), num_fwd(0), retry_attempt(0),