Message ID | 50E93BDC.6050104@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Sun, 6 Jan 2013, Yan, Zheng wrote: > how about below patch, also updated git://github.com/ukernel/ceph-client.git wip-ceph The branch looks good. Once Alex sorts out testing-next tomorrow we can pull these in. If you don't mind adding the Reviewed-by tags, that'd be helpful, otherwise I'll do it tomorrow. Thanks! sage > > Reagrds > Yan, Zheng > --- > >From 6fdcf8d71239dac7b26f50623ee5986f39552b4a Mon Sep 17 00:00:00 2001 > From: "Yan, Zheng" <zheng.z.yan@intel.com> > Date: Fri, 4 Jan 2013 15:30:10 +0800 > Subject: [PATCH 5/5] ceph: check mds_wanted for imported cap > > The MDS may have incorrect wanted caps after importing caps. So the > client should check the value mds has and send cap update if necessary. > > Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com> > --- > fs/ceph/caps.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c > index 40b5bbe..1e1e020 100644 > --- a/fs/ceph/caps.c > +++ b/fs/ceph/caps.c > @@ -2429,7 +2429,9 @@ static void handle_cap_grant(struct inode *inode, struct ceph_mds_caps *grant, > dout("mds wanted %s -> %s\n", > ceph_cap_string(le32_to_cpu(grant->wanted)), > ceph_cap_string(wanted)); > - grant->wanted = cpu_to_le32(wanted); > + /* imported cap may not have correct mds_wanted */ > + if (le32_to_cpu(grant->op) == CEPH_CAP_OP_IMPORT) > + check_caps = 1; > } > > cap->seq = seq; > -- > 1.7.11.7 > > -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 01/07/2013 01:11 PM, Sage Weil wrote: > On Sun, 6 Jan 2013, Yan, Zheng wrote: >> how about below patch, also updated git://github.com/ukernel/ceph-client.git wip-ceph > > The branch looks good. Once Alex sorts out testing-next tomorrow we can > pull these in. If you don't mind adding the Reviewed-by tags, that'd be > helpful, otherwise I'll do it tomorrow. > done. Regards Yan, Zheng -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 40b5bbe..1e1e020 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -2429,7 +2429,9 @@ static void handle_cap_grant(struct inode *inode, struct ceph_mds_caps *grant, dout("mds wanted %s -> %s\n", ceph_cap_string(le32_to_cpu(grant->wanted)), ceph_cap_string(wanted)); - grant->wanted = cpu_to_le32(wanted); + /* imported cap may not have correct mds_wanted */ + if (le32_to_cpu(grant->op) == CEPH_CAP_OP_IMPORT) + check_caps = 1; } cap->seq = seq;