From: Yan, Zheng Date: Tue, 18 Mar 2014 02:15:29 +0000 (+0800) Subject: ceph: set mds_wanted when MDS reply changes a cap to auth cap X-Git-Tag: v3.15-rc1~61^2~50 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=d9ffc4f77073e7e1ca731f21804769de9c094b87;p=~emulex%2Finfiniband.git ceph: set mds_wanted when MDS reply changes a cap to auth cap When adjusting caps client wants, MDS does not record caps that are not allowed. For non-auth MDS, it does not record WR caps. So when a MDS reply changes a non-auth cap to auth cap, client needs to set cap's mds_wanted according to the reply. Signed-off-by: Yan, Zheng --- diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index d9ef44e5474..2e5e648eb5c 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -622,8 +622,10 @@ retry: if (flags & CEPH_CAP_FLAG_AUTH) { if (ci->i_auth_cap == NULL || - ceph_seq_cmp(ci->i_auth_cap->mseq, mseq) < 0) + ceph_seq_cmp(ci->i_auth_cap->mseq, mseq) < 0) { ci->i_auth_cap = cap; + cap->mds_wanted = wanted; + } ci->i_cap_exporting_issued = 0; } else { WARN_ON(ci->i_auth_cap == cap);