Bug #63906 » fix.patch
src/mds/Server.cc | ||
---|---|---|
void Server::handle_client_getattr(MDRequestRef& mdr, bool is_lookup)
|
||
{
|
||
const cref_t<MClientRequest> &req = mdr->client_request;
|
||
client_t client = mdr->get_client();
|
||
if (req->get_filepath().depth() == 0 && is_lookup) {
|
||
// refpath can't be empty for lookup but it can for
|
||
... | ... | |
if (r > 0)
|
||
return; // delayed
|
||
if (!r) {
|
||
CInode *in = mdr->in[0];
|
||
if ((mask & CEPH_CAP_LINK_SHARED) &&
|
||
(in->linklock.is_xlocked() && !in->linklock.is_xlocked_by_client(client))) {
|
||
in->linklock.add_waiter(SimpleLock::WAIT_STABLE, new C_MDS_RetryRequest(mdcache, mdr));
|
||
mds->mdlog->flush();
|
||
return;
|
||
}
|
||
if ((mask & CEPH_CAP_AUTH_SHARED) &&
|
||
(in->authlock.is_xlocked() && !in->authlock.is_xlocked_by_client(client))) {
|
||
in->authlock.add_waiter(SimpleLock::WAIT_STABLE, new C_MDS_RetryRequest(mdcache, mdr));
|
||
mds->mdlog->flush();
|
||
return;
|
||
}
|
||
if ((mask & CEPH_CAP_XATTR_SHARED) &&
|
||
(in->xattrlock.is_xlocked() && !in->xattrlock.is_xlocked_by_client(client))) {
|
||
in->authlock.add_waiter(SimpleLock::WAIT_STABLE, new C_MDS_RetryRequest(mdcache, mdr));
|
||
mds->mdlog->flush();
|
||
return;
|
||
}
|
||
if ((mask & CEPH_CAP_FILE_SHARED) &&
|
||
(in->filelock.is_xlocked() && !in->filelock.is_xlocked_by_client(client))) {
|
||
in->authlock.add_waiter(SimpleLock::WAIT_STABLE, new C_MDS_RetryRequest(mdcache, mdr));
|
||
mds->mdlog->flush();
|
||
return;
|
||
}
|
||
}
|
||
if (r < 0) {
|
||
// fall-thru. let rdlock_path_pin_ref() check again.
|
||
} else if (is_lookup) {
|
||
... | ... | |
* handling this case here is easier than weakening rdlock
|
||
* semantics... that would cause problems elsewhere.
|
||
*/
|
||
client_t client = mdr->get_client();
|
||
int issued = 0;
|
||
Capability *cap = ref->get_client_cap(client);
|
||
if (cap && (mdr->snapid == CEPH_NOSNAP ||
|
- « Previous
- 1
- 2
- 3
- Next »