mirror of
https://github.com/ceph/ceph
synced 2025-02-21 01:47:25 +00:00
Merge pull request #4168 from ceph/wip-11226-dir-fx
RFC client: Hold on to exclusive caps on directories we "own" Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
commit
7721b224c4
@ -2853,6 +2853,13 @@ void Client::check_caps(Inode *in, bool is_delayed)
|
||||
unsigned used = get_caps_used(in);
|
||||
unsigned cap_used;
|
||||
|
||||
if (in->is_dir() && (in->flags & I_COMPLETE)) {
|
||||
// we do this here because we don't want to drop to Fs (and then
|
||||
// drop the Fs if we do a create!) if that alone makes us send lookups
|
||||
// to the MDS. Doing it in in->caps_wanted() has knock-on effects elsewhere
|
||||
wanted |= CEPH_CAP_FILE_EXCL;
|
||||
}
|
||||
|
||||
int retain = wanted | used | CEPH_CAP_PIN;
|
||||
if (!unmounting) {
|
||||
if (wanted)
|
||||
|
Loading…
Reference in New Issue
Block a user