Re: [PATCH 11/19] xfs: refactor EFI log item recovery dispatch

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

 



On Tue, Apr 28, 2020 at 04:45:57PM -0700, Darrick J. Wong wrote:
> On Tue, Apr 28, 2020 at 03:41:32PM -0700, Darrick J. Wong wrote:
> > On Sat, Apr 25, 2020 at 11:28:01AM -0700, Christoph Hellwig wrote:
> > > On Tue, Apr 21, 2020 at 07:07:13PM -0700, Darrick J. Wong wrote:
> > > > From: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
> > > > 
> > > > Move the extent free intent and intent-done log recovery code into the
> > > > per-item source code files and use dispatch functions to call them.  We
> > > > do these one at a time because there's a lot of code to move.  No
> > > > functional changes.
> > > 
> > > What is the reason for splitting xlog_recover_item_type vs
> > > xlog_recover_intent_type?  To me it would seem more logical to have
> > > one operation vector, with some ops only set for intents.
> > 
> > Partly because I started by refactoring only the intent items, and then
> > decided to prepend a series to do everything; and partly to be stingy
> > with bytes. :P
> > 
> > That said, I like your suggestion of every XFS_LI_* code gets its own
> > xlog_recover_item_type so I'll go do that.
> 
> Aha, now I remember why those two are separate types -- the
> process_intent and cancel_intent functions operate on the xfs_log_item
> that gets created from the xlog_recover_item that we pulled out of the
> log, whereas the other functions are called directly on the
> xlog_recovery_item.  There's no direct link between the log item and the
> recovery log item, nor is there a good way to link through their
> dispatch functions.

Maybe those should move to xfs_item_ops as they operate on a "live"
xfs_log_item? (they'd need to grow names clearly related to recovery
of course).  In fact except for slightly different calling convention
->cancel_intent already seems to be identical to ->abort_intent in
xfs_item_ops, so that would be one off the list.

Btw, it seems like we should drop the ail_lock before calling
->process_intent as all instances do that anyway, and it would keep
the locking a little more centralized, and it will allow killing
one pointless wrapper in each instance.  Maybe we can also move
the recovered flag to the generic log item flags?



[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