Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kraken: cephfs: Deadlock on two ceph-fuse clients accessing the same file #16191

Merged
merged 1 commit into from Jul 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 6 additions & 4 deletions src/mds/Locker.cc
Expand Up @@ -1916,10 +1916,12 @@ bool Locker::issue_caps(CInode *in, Capability *only_cap)
<< " wanted " << ccap_string(wanted)
<< dendl;

// skip if suppress, and not revocation
if (cap->is_suppress() && !(pending & ~allowed)) {
dout(20) << " suppressed and !revoke, skipping client." << it->first << dendl;
continue;
if (!(pending & ~allowed)) {
// skip if suppress or new, and not revocation
if (cap->is_new() || cap->is_suppress()) {
dout(20) << " !revoke and new|suppressed, skipping client." << it->first << dendl;
continue;
}
}

// notify clients about deleted inode, to make sure they release caps ASAP.
Expand Down
5 changes: 0 additions & 5 deletions src/mds/Server.cc
Expand Up @@ -4724,9 +4724,6 @@ void Server::handle_client_mknod(MDRequestRef& mdr)
newi->filelock.set_state(LOCK_EXCL);
newi->authlock.set_state(LOCK_EXCL);
newi->xattrlock.set_state(LOCK_EXCL);
cap->issue_norevoke(CEPH_CAP_AUTH_EXCL|CEPH_CAP_AUTH_SHARED|
CEPH_CAP_XATTR_EXCL|CEPH_CAP_XATTR_SHARED|
CEPH_CAP_ANY_FILE_WR);
}
}

Expand Down Expand Up @@ -4823,8 +4820,6 @@ void Server::handle_client_mkdir(MDRequestRef& mdr)
newi->filelock.set_state(LOCK_EXCL);
newi->authlock.set_state(LOCK_EXCL);
newi->xattrlock.set_state(LOCK_EXCL);
cap->issue_norevoke(CEPH_CAP_AUTH_EXCL|CEPH_CAP_AUTH_SHARED|
CEPH_CAP_XATTR_EXCL|CEPH_CAP_XATTR_SHARED);
}

// make sure this inode gets into the journal
Expand Down