On Tue, Mar 19, 2024 at 01:15:21PM +1100, Dave Chinner wrote: > From: Dave Chinner <dchinner@xxxxxxxxxx> > > It really is a unique snowflake, so peal off from normal buffer > recovery earlier and shuffle all the unique bits into the inode > buffer recovery function. > > Also, it looks like the handling of mismatched inode cluster buffer > sizes is wrong - we have to write the recovered buffer -before- we > mark it stale as we're not supposed to write stale buffers. I don't > think we check that anywhere in the buffer IO path, but lets do it > the right way anyway. > > Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx> > --- > fs/xfs/xfs_buf_item_recover.c | 99 ++++++++++++++++++++++------------- > 1 file changed, 63 insertions(+), 36 deletions(-) > > diff --git a/fs/xfs/xfs_buf_item_recover.c b/fs/xfs/xfs_buf_item_recover.c > index dba57ee6fa6d..f994a303ad0a 100644 > --- a/fs/xfs/xfs_buf_item_recover.c > +++ b/fs/xfs/xfs_buf_item_recover.c > @@ -229,7 +229,7 @@ xlog_recover_validate_buf_type( > * just avoid the verification stage for non-crc filesystems > */ > if (!xfs_has_crc(mp)) > - return; > + return 0; > > magic32 = be32_to_cpu(*(__be32 *)bp->b_addr); > magic16 = be16_to_cpu(*(__be16*)bp->b_addr); > @@ -407,7 +407,7 @@ xlog_recover_validate_buf_type( > * skipped. > */ > if (current_lsn == NULLCOMMITLSN) > - return 0;; > + return 0; Looks like these two should be in the previous patch. Otherwise this looks good: Reviewed-by: Christoph Hellwig <hch@xxxxxx>