Current code always updates flushing_cap_seq when marking dirty
caps as flushing. If there are old flushing caps, updating
flushing_cap_seq confuses Client::wait_sync_caps(uint64_t), make
it think that the old caps have been flushed.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
int flushing = in->dirty_caps;
assert(flushing);
- if (flushing && !in->flushing_caps) {
+ if (!in->flushing_caps) {
ldout(cct, 10) << "mark_caps_flushing " << ccap_string(flushing) << " " << *in << dendl;
+ in->flushing_cap_seq = ++last_flush_seq;
num_flushing_caps++;
} else {
ldout(cct, 10) << "mark_caps_flushing (more) " << ccap_string(flushing) << " " << *in << dendl;
in->flushing_caps |= flushing;
in->dirty_caps = 0;
- in->flushing_cap_seq = ++last_flush_seq;
session->flushing_caps.push_back(&in->flushing_cap_item);