Bug 2161479

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: Akash Raj <akraj>
Priority: unspecified    
Version: 5.2CC: akraj, ceph-eng-bugs, cephqe-warriors, gfarnum, hyelloji, kdreyer
Target Milestone: ---Keywords: Rebase
Target Release: 6.1   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
.MDS now processes all stray directory entries. Previously, a bug in the MDS stray directory processing logic caused the MDS to skip processing a few stray directory entries. Due to this, the MDS would not process all stray directory entries, causing deleted files to not free up space. With this fix, the stray index pointer is corrected, so that the MDS processes all stray directories.
Story Points: ---
Clone Of: 2161478 Environment:
Last Closed: 2023-06-15 09:16:27 UTC Type: ---
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: 2161478    
Bug Blocks: 2192813    

Description Venky Shankar 2023-01-17 04:36:30 UTC
+++ This bug was initially created as a clone of Bug #2161478 +++

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 2 Ken Dreyer (Red Hat) 2023-04-10 21:32:58 UTC
https://github.com/ceph/ceph/pull/49670 is in v17.2.6

Comment 9 errata-xmlrpc 2023-06-15 09:16:27 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 (Moderate: Red Hat Ceph Storage 6.1 security and bug fix 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:3623