Project

General

Profile

Bug #54463

mds: flush mdlog if locked and still has wanted caps not satisfied

Added by Xiubo Li 9 months ago. Updated 3 months ago.

Status:
Resolved
Priority:
Urgent
Assignee:
Category:
-
Target version:
% Done:

0%

Source:
Tags:
backport_processed
Backport:
quincy,pacific
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
MDS
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

In _do_cap_update() if one client is releasing the Fw caps the
relevant client range will be erased, and then new_max will be 0.
It will skip flushing the mdlog after it submitting a journal log,
which will keep holding the wrlock for the filelock.

So when a new client is trying to open the file for reading, since
the wrlock is locked for the filelock the file_eval() is possibly
couldn't changing the lock state and at the same time if the
filelock is in stable state, such as in EXECL, MIX. The mds may
skip flushing the mdlog in the open related code too.

We need to flush the mdlog if there still has any wanted caps
couldn't be satisfied and has any lock for the filelock after the
file_eval().


Related issues

Copied to CephFS - Backport #55756: quincy: mds: flush mdlog if locked and still has wanted caps not satisfied Resolved
Copied to CephFS - Backport #55757: pacific: mds: flush mdlog if locked and still has wanted caps not satisfied Resolved

History

#1 Updated by Xiubo Li 9 months ago

#2 Updated by Xiubo Li 9 months ago

  • Subject changed from mds: flush the mdlog when file size changes to mds: flush mdlog if locked and still has wanted caps not satisfied

#3 Updated by Xiubo Li 9 months ago

  • Description updated (diff)

#4 Updated by Patrick Donnelly 6 months ago

  • Status changed from Fix Under Review to Pending Backport
  • Target version set to v18.0.0

#5 Updated by Backport Bot 6 months ago

  • Copied to Backport #55756: quincy: mds: flush mdlog if locked and still has wanted caps not satisfied added

#6 Updated by Backport Bot 6 months ago

  • Copied to Backport #55757: pacific: mds: flush mdlog if locked and still has wanted caps not satisfied added

#7 Updated by Backport Bot 4 months ago

  • Tags set to backport_processed

#8 Updated by Xiubo Li 3 months ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF