Re: [PATCH 2/2] xfs: add missing _require_scratch calls

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



On Tue, Oct 17, 2023 at 06:25:07AM +0200, Christoph Hellwig wrote:
> On Mon, Oct 16, 2023 at 11:41:24AM -0700, Darrick J. Wong wrote:
> > > +_require_scratch
> > >  _require_scratch_delalloc
> > >  _require_scratch_reflink
> > 
> > Oops.  That _require_scratch_delalloc could've gone beneath the
> > _require_scratch_reflink to take advantage of the _require_scratch call
> > in _require_scratch_reflink.
> > 
> > That said ... maybe _require_scratch_* calls should require the caller
> > to have _require_scratch'd beforehand?  And perhaps all
> > _require_scratch_* functions should complain if
> > ${RESULT_DIR}/require_scratch doesn't already exist.
> 
> Either having a _require_scratch in all _require_scratch_* helpers or
> none sounds sensible to me, having it in some and nother others is
> rather confusing.  Any preferences?

IMIO, every test should be calling _require_scratch explicitly, and only
once.  The _require_scratch_XXX functions should complain if you haven't
called _require_scratch.

--D



[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux