Bug 2161478

Summary: MDS: scan_stray_dir doesn't walk through all stray inode fragment
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Venky Shankar <vshankar>
Component: CephFSAssignee: Venky Shankar <vshankar>
Status: CLOSED ERRATA QA Contact: Hemanth Kumar <hyelloji>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 5.2CC: ceph-eng-bugs, cephqe-warriors, hyelloji, tserlin, vereddy
Target Milestone: ---   
Target Release: 5.3z1   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: ceph-16.2.10-105.el8cp Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2161479 (view as bug list) Environment:
Last Closed: 2023-02-28 10:06:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2161479    

Description Venky Shankar 2023-01-17 04:34:42 UTC
Description of problem:

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.


Version-Release number of selected component (if applicable):
5.2

How reproducible:
Always

Steps to Reproduce:
Delete huge number of files in cephfs to fill up the stray directory and restart the MDS whilst the inodes hang around in stray. Not all stray inodes would get evaluated.

Actual results:
MDS should correct evaluate stray directory inodes on restart.

Comment 8 errata-xmlrpc 2023-02-28 10:06:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Red Hat Ceph Storage 5.3 Bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:0980