Skip to content

Commit 983db41

Browse files
committed
Merge PR ceph#53571 into main
* refs/pull/53571/head: client: queue a delay cap flushing if there are ditry caps/snapcaps Reviewed-by: Venky Shankar <[email protected]>
2 parents 76e6fb0 + d14752f commit 983db41

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/client/Client.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4796,6 +4796,9 @@ void Client::trim_caps(MetaSession *s, uint64_t max)
47964796
// is deleted inside remove_cap
47974797
++p;
47984798

4799+
if (in->dirty_caps || in->cap_snaps.size())
4800+
cap_delay_requeue(in.get());
4801+
47994802
if (in->caps.size() > 1 && cap != in->auth_cap) {
48004803
int mine = cap->issued | cap->implemented;
48014804
int oissued = in->auth_cap ? in->auth_cap->issued : 0;
@@ -4833,7 +4836,8 @@ void Client::trim_caps(MetaSession *s, uint64_t max)
48334836
}
48344837
if (all && in->ino != CEPH_INO_ROOT) {
48354838
ldout(cct, 20) << __func__ << " counting as trimmed: " << *in << dendl;
4836-
trimmed++;
4839+
if (!in->dirty_caps && !in->cap_snaps.size())
4840+
trimmed++;
48374841
}
48384842
}
48394843
}

0 commit comments

Comments
 (0)