Project

General

Profile

Bug #41327

mds: dirty rstat lost during scatter-gather process

Added by Xuehan Xu about 1 month ago. Updated about 1 month ago.

Status:
Need Review
Priority:
Normal
Assignee:
Category:
Correctness/Safety
Target version:
Start date:
08/18/2019
Due date:
% Done:

0%

Source:
Community (dev)
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Labels (FS):
Pull request ID:

Description

In the following scenario, the current lock's dirty state could be lost:

  1. 1. current lock's state is LOCK_LOCK;
  2. 2. auth send LOCK_AC_MIX, and the current lock do finish_scatter_update, which wrlock_force the current lock;
  3. 3. auth send LOCK_AC_LOCK, and would be forced to wait, since the current lock is wrlocked;
  4. 4. the child inode want to pop rstat up to the current lock's parent, which would also be forced to wait since the current lock state is LOCK_MIX_LOCK; the current lock would be marked dirty, and the child inode would be attached to the corresponding dir's dirty_rstat_inodes;
  5. 5. the previous finish_scatter_update finishes, the codes reaches here and "start_flush" the current lock, which would clear the dirty flag of the current lock.

As the CInode::encode_lock_state method doesn't pop dirty_rstat_inodes' rstat to the corresponding dir, step 5 actually lead to the lost of the dirty state marked by step 4.

History

#1 Updated by Patrick Donnelly about 1 month ago

  • Status changed from New to Need Review
  • Assignee set to Xuehan Xu

Also available in: Atom PDF