Re: [PATCH 23/63] xfs: implement deferred bmbt map/unmap operations

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

 



On Fri, 2016-09-30 at 10:38 -0700, Darrick J. Wong wrote:
> On Fri, Sep 30, 2016 at 12:34:04AM -0700, Christoph Hellwig wrote:
> > > +/* Deferred mapping is only for real extents in the data fork. */
> > > +static bool
> > > +xfs_bmap_is_update_needed(
> > > +	int			whichfork,
> > > +	struct xfs_bmbt_irec	*bmap)
> > > +{
> > > +	ASSERT(whichfork == XFS_DATA_FORK);
> > > +
> > > +	return  bmap->br_startblock != HOLESTARTBLOCK &&
> > > +		bmap->br_startblock != DELAYSTARTBLOCK;
> > > +}
> > 
> > Passing in an argument just to assert on it seems weird.
> > And except for that a better name might be xfs_bmbt_is_real or similar,
> > and I bet we'd have other users for it as well.
> 
> xfs_bmap_*map_extent are the only callers, and the only whichfork
> values are XFS_DATA_FORK.  I might as well just tear out all those
> asserts since they're never going to trigger anyway.
> 

Um, isn't that the point of an assertion ?

--
Roger



--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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