> On 5 Apr 2017, at 22:16, Jeff Layton <jlayton@xxxxxxxxxx> wrote: > > On Wed, 2017-04-05 at 09:30 +0800, Yan, Zheng wrote: >> Signed-off-by: "Yan, Zheng" <zyan@xxxxxxxxxx> >> --- >> fs/ceph/file.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/fs/ceph/file.c b/fs/ceph/file.c >> index 579a16c..0480492 100644 >> --- a/fs/ceph/file.c >> +++ b/fs/ceph/file.c >> @@ -123,7 +123,7 @@ int ceph_renew_caps(struct inode *inode) >> spin_lock(&ci->i_ceph_lock); >> wanted = __ceph_caps_file_wanted(ci); >> if (__ceph_is_any_real_caps(ci) && >> - (!(wanted & CEPH_CAP_ANY_WR) == 0 || ci->i_auth_cap)) { >> + (!(wanted & CEPH_CAP_ANY_WR) || ci->i_auth_cap)) { >> int issued = __ceph_caps_issued(ci, NULL); >> spin_unlock(&ci->i_ceph_lock); >> dout("renew caps %p want %s issued %s updating mds_wanted\n", > > That certainly looks more like what was intended, but I'm still a > little unclear on why we have so much special casing in all of this > caps handling. > > Why do we skip ceph_check_caps if we want CEPH_CAP_ANY_WR? It’s for multiple active mds setup. client can request read caps from any mds (that replicates the inode). client need to request write caps from auth mds. Regards Yan, Zheng > -- > Jeff Layton <jlayton@xxxxxxxxxx> -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html