Re: [PATCH] xfs: use current->journal_info for detecting transaction recursion

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

 



On Mon, Feb 22, 2021 at 06:15:57PM -0800, Darrick J. Wong wrote:
> On Tue, Feb 23, 2021 at 10:31:07AM +1100, Dave Chinner wrote:
> > From: Dave Chinner <dchinner@xxxxxxxxxx>
> > 
> > Because the iomap code using PF_MEMALLOC_NOFS to detect transaction
> > recursion in XFS is just wrong. Remove it from the iomap code and
> > replace it with XFS specific internal checks using
> > current->journal_info instead.
> 
> It might be worth mentioning that this changes the PF_MEMALLOC_NOFS
> behavior very slightly -- it's now bound to the allocation and freeing
> of the transaction, instead of the strange way we used to do this, where
> we'd set it at reservation time but we don't /clear/ it at unreserve time.

They are effectively the same thing, so I think you are splitting
hairs here. The rule is "transaction context is NOFS" so whether it
is set when the transaction context is entered or a few instructions
later when we start the reservation is not significant.

> This doesn't strictly look like a fix patch, but as it is a Dumb
> Developer Detector(tm) I could try to push it for 5.12 ... or just make
> it one of the first 5.13 patches.  Any preference?

Nope. You're going to need to fix the transaction nesting the new gc
code does before applying this, though, because that is detected as
transaction recursion by this patch....

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx



[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