Re: [PATCH 1/4] xfs: online repair of directories

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 26, 2024 at 06:31:01PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@xxxxxxxxxx>
> 
> If a directory looks like it's in bad shape, try to sift through the
> rubble to find whatever directory entries we can, scan the directory
> tree for the parent (if needed), stage the new directory contents in a
> temporary file and use the atomic extent swapping mechanism to commit
> the results in bulk.  As a side effect of this patch, directory
> inactivation will be able to purge any leftover dir blocks.

I would have split xfs_inactive_dir and it's caller into a separate
prep patch, but if you want to keep that together that's probably
fine as it's completely unrelated functionality.

> + * Legacy Locking Issues
> + * ---------------------
> + *
> + * Prior to Linux 6.5, if /a, /a/b, and /c were all directories, the VFS would
> + * not take i_rwsem on /a/b for a "mv /a/b /c/" operation.  This meant that
> + * only b's ILOCK protected b's dotdot update.  b's IOLOCK was not taken,
> + * unlike every other dotdot update (link, remove, mkdir).  If the repair code
> + * dropped the ILOCK, we it was required either to revalidate the dotdot entry
> + * or to use dirent hooks to capture updates from other threads.
> + */

How does this matter here?

Otherwise looks good:

Reviewed-by: Christoph Hellwig <hch@xxxxxx>




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux