On Tue, Aug 27, 2024 at 08:00:05PM +1000, Dave Chinner wrote: > Hence the only cases where the item might have been already removed > from the AIL by the ->iop_push() are those where the push itself > removes the item from the AIL. This only occurs in shutdown > situations, so it's not the common case. > > In which case, returning XFS_ITEM_FREED to tell the push code that > it was freed and should not reference it at all is fine. We don't > really even need tracing for this case because if the items can't be > removed from the AIL, they will leave some other AIL trace when > pushe (i.e. they will be stuck locked, pinned or flushing and those > will leave traces...) So XFS_ITEM_FREED is definitively a better name, but it still feels a bit fragile that any of these shutdown paths need special handling inside ->iop_push.