On Sun, Dec 03, 2023 at 11:02:57AM -0800, Darrick J. Wong wrote: > From: Darrick J. Wong <djwong@xxxxxxxxxx> > > XFS_TRANS_HAS_INTENT_DONE is a flag to the CIL that we've added a log > intent done item to the transaction. This enables an optimization > wherein we avoid writing out log intent and log intent done items if > they would have ended up in the same checkpoint. This reduces writes to > the ondisk log and speeds up recovery as a result. > > However, callers can use the defer ops machinery to modify xattrs > without using the log items. In this situation, there won't be an > intent done item, so we do not need to set the flag. Understanding the logged attrs code is till on my TODO list, but the patch looks obviously correct in that we shouldn't set XFS_TRANS_HAS_INTENT_DONE if there is no done items. I'm still confused how it can log an intent item without a done item, though. Cautiously and superficially: Reviewed-by: Christoph Hellwig <hch@xxxxxx>