From 08920f4e8185397c7ddf3f22ea7ed002e50f2ddb Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 24 Aug 2010 10:38:21 -0700 Subject: [PATCH] mds: expose projected values for all locks to loner (not just filelock) There is nothing special about filelock in this case. If the client is the loner, we should use the projected values. This is important when we are looking at a snapid on the head (see snaptest-authwb.sh). --- src/mds/CInode.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mds/CInode.cc b/src/mds/CInode.cc index d248a1ffd4a9c..82a3db44e28bf 100644 --- a/src/mds/CInode.cc +++ b/src/mds/CInode.cc @@ -1688,9 +1688,9 @@ int CInode::encode_inodestat(bufferlist& bl, Session *session, Capability *cap = get_client_cap(client); bool pfile = filelock.is_xlocked_by_client(client) || get_loner() == client; //(cap && (cap->issued() & CEPH_CAP_FILE_EXCL)); - bool pauth = authlock.is_xlocked_by_client(client); - bool plink = linklock.is_xlocked_by_client(client); - bool pxattr = xattrlock.is_xlocked_by_client(client); + bool pauth = authlock.is_xlocked_by_client(client) || get_loner() == client; + bool plink = linklock.is_xlocked_by_client(client) || get_loner() == client; + bool pxattr = xattrlock.is_xlocked_by_client(client) || get_loner() == client; bool plocal = versionlock.get_last_wrlock_client() == client; -- 2.47.3