Re: [PATCH 2/7] xfs: cache last bitmap block in realtime allocator

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

 



On Wed, Oct 18, 2023 at 09:33:15AM -0700, Darrick J. Wong wrote:
> On Wed, Oct 18, 2023 at 08:19:11AM +0200, Christoph Hellwig wrote:
> > On Tue, Oct 17, 2023 at 08:54:23AM -0700, Darrick J. Wong wrote:
> > >   * The buffer is returned read and locked.
> > > @@ -59,12 +73,32 @@ xfs_rtbuf_get(
> > >  	struct xfs_buf		**bpp)		/* output: buffer for the block */
> > >  {
> > >  	struct xfs_mount	*mp = args->mount;
> > > +	struct xfs_buf		**cbpp;		/* cached block buffer */
> > > +	xfs_fsblock_t		*cbp;		/* cached block number */
> > >  	struct xfs_buf		*bp;		/* block buffer, result */
> > >  	struct xfs_inode	*ip;		/* bitmap or summary inode */
> > >  	struct xfs_bmbt_irec	map;
> > >  	int			nmap = 1;
> > >  	int			error;		/* error value */
> > >  
> > > +	cbpp = issum ? &args->bbuf : &args->sbuf;
> > > +	cbp = issum ? &args->bblock : &args->sblock;
> > 
> > Now that we have the summary/bitmap buffers in the args structure,
> > it seems like we can also drop the bp argument from xfs_rtbuf_get and
> > just the pointer in the args structue in the callers.
> 
> Yeah, I was wondering about that too -- either we take a second refcount
> on @bp and pass it out via **bpp, or callers can pluck it from @args
> directly and call _cache_relse before @args goes out of scope.
> 
> I'll remove **bpp since it's redundant.

Ok, I'm about to send out a v2.2 of Omar's patches with whitespace
cleanups for Dave's suggestionpatch:

 xfs: consolidate realtime allocation arguments

I also added a couple new patches to do the cleanups we talked about
here:

 xfs: simplify xfs_rtbuf_get calling conventions
 xfs: simplify rt bitmap/summary block accessor functions

--D

> --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