Project

General

Profile

Actions

Bug #58294

closed

MDS: scan_stray_dir doesn't walk through all stray inode fragment

Added by ethan wu over 1 year ago. Updated 9 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Correctness/Safety
Target version:
% Done:

100%

Source:
Community (user)
Tags:
backport_processed
Backport:
pacific,quincy
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

After commit 28227872295ae657a0d26a3f004c54c41794db18 mds: automatically fragment stray dirs
stray dirs are allowed to be fragment.

But scan_stray_dir doesn't walk through all fragments of the stray inodes correctly.
It doesn't reset next.frag after each run of stray dir inode.
Therefore, next stray inode will start from the last fragment of previous stray inode, and the preceding fragments are all skipped.

For example,
suppose stray inode 0x601 has the following fragments
0x00
0x01
0x10
0x11
If fragment 0x01 is not complete, dir would send a fetch request and next is set with ino=0x601, fragment=0x01.
After all 0x601 fragments finishes, next remains the same as ino=0x601, fragment=0x01.
All inode 0x602~0x609's fragments that are < 0x01 won't be processed.


Related issues 2 (0 open2 closed)

Copied to CephFS - Backport #58349: pacific: MDS: scan_stray_dir doesn't walk through all stray inode fragmentResolvedVenky ShankarActions
Copied to CephFS - Backport #58350: quincy: MDS: scan_stray_dir doesn't walk through all stray inode fragmentResolvedVenky ShankarActions
Actions

Also available in: Atom PDF