Re: [PATCH 10/18] libxfs: introduce libxfs_buf_read_uncached

Darrick J. Wong
2020-02-21T20:59:14Z

On Fri, Feb 21, 2020 at 12:50:28PM -0800, Darrick J. Wong wrote:
> On Fri, Feb 21, 2020 at 06:48:33AM -0800, Christoph Hellwig wrote:
> > On Wed, Feb 19, 2020 at 05:43:37PM -0800, Darrick J. Wong wrote:
> > > From: Darrick J. Wong <darrick.wong@oracle.com>
> > >
> > > Introduce an uncached read function so that userspace can handle them in
> > > the same way as the kernel. This also eliminates the need for some of
> > > the libxfs_purgebuf calls (and two trips into the cache code).
> > >
> > > Refactor the get/read uncached buffer functions to hide the details of
> > > uncached buffer-ism in rdwr.c.
> >
> > Split this into one patch adding the functionality to libxfs and
> > one each to convert db and copy over with a good rationale for the
> > switch in each case?
>
> Both programs use the uncached read for the same purpose, which is to
> read the superblock without polluting the buffer cache when we haven't
> yet established the filesystem sector size.

HAH nope, despite the very similiar code, they do it for different
reasons. Separate patches it is.

--D

> The only reason why repair doesn't need patching is that reaches into
> the buffer cache internals to call lseek and read by hand. I guess that
> should be fixed, separately.
>
> --D