Re: [PATCH] xfs: get rid of the ip parameter to xchk_setup_*

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

 



On Thu, Apr 08, 2021 at 01:19:33PM +0100, Christoph Hellwig wrote:
> On Wed, Apr 07, 2021 at 06:01:14PM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@xxxxxxxxxx>
> > 
> > Now that the scrub context stores a pointer to the file that was used to
> > invoke the scrub call, the struct xfs_inode pointer that we passed to
> > all the setup functions is no longer necessary.  This is only ever used
> > if the caller wants us to scrub the metadata of the open file.
> 
> Even before we had the xfs_inode in struct xfs_scrub, so why detour
> through struct file?

xfs_scrub.fil[ep] is the file corresponding to the fd that userspace
used to call scrub.

xfs_scrub.ip is the file that we're actively checking, if applicable.
This can be a different file than filp if we're checking file-based
metadata such as the rt bitmap and summary files; or if the caller is
doing scrub-by-handle for a non-regular file (e.g. open the root
directory and pass in the ino/gen of a symlink file to check that the
symlink is ok).

Let me respin this with added struct commentary in scrub.h.

--D



[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