Linux-XFS Archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Dave Chinner <david@fromorbit.com>, linux-xfs@vger.kernel.org
Subject: Re: [PATCH 4/5] xfs: detect partial buffer recovery operations
Date: Tue, 19 Mar 2024 16:14:47 -0700	[thread overview]
Message-ID: <20240319231447.GS1927156@frogsfrogsfrogs> (raw)
In-Reply-To: <ZfoXihIirJ1PZrs5@infradead.org>

On Tue, Mar 19, 2024 at 03:54:02PM -0700, Christoph Hellwig wrote:
> > +static bool
> > +xlog_recovery_is_dir_buf(
> > +	struct xfs_buf_log_format	*buf_f)
> > +{
> > +	switch (xfs_blft_from_flags(buf_f)) {
> > +	case XFS_BLFT_DIR_BLOCK_BUF:
> > +	case XFS_BLFT_DIR_DATA_BUF:
> > +	case XFS_BLFT_DIR_FREE_BUF:
> > +	case XFS_BLFT_DIR_LEAF1_BUF:
> > +	case XFS_BLFT_DIR_LEAFN_BUF:
> > +	case XFS_BLFT_DA_NODE_BUF:
> 
> XFS_BLFT_DA_NODE_BUF can also be a non-directory buffer.  Maybe this
> should be named something like xlog_recover_maybe_is_partial_dabuf?
> 
> > +		error = bp->b_error;
> >  		goto out_release;
> >  	}
> >  
> > +
> 
> This adds a spurious new line.
> 
> Otherwise this looks good to me, but the lack over verifiation for these
> multi-buffer recoveries really scares me..

I wondered if there was a good way to reconstruct the discontiguous
buffer, but the only things I could think of relied on guessing from the
subsequent buffer log items.  Does anyone have a better idea?

--D

  reply	other threads:[~2024-03-19 23:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-19  2:15 [PATCH 0/5] xfs: fix discontiguous metadata block recovery Dave Chinner
2024-03-19  2:15 ` [PATCH 1/5] xfs: buffer log item type mismatches are corruption Dave Chinner
2024-03-19  7:23   ` Christoph Hellwig
2024-03-19 18:16   ` Darrick J. Wong
2024-03-19  2:15 ` [PATCH 2/5] xfs: separate out inode buffer recovery a bit more Dave Chinner
2024-03-19  7:26   ` Christoph Hellwig
2024-03-19 18:40   ` Darrick J. Wong
2024-03-19  2:15 ` [PATCH 3/5] xfs: recover dquot buffers unconditionally Dave Chinner
2024-03-19 18:49   ` Darrick J. Wong
2024-03-19 21:46   ` Christoph Hellwig
2024-03-19  2:15 ` [PATCH 4/5] xfs: detect partial buffer recovery operations Dave Chinner
2024-03-19 20:39   ` Darrick J. Wong
2024-03-19 22:54   ` Christoph Hellwig
2024-03-19 23:14     ` Darrick J. Wong [this message]
2024-03-19  2:15 ` [PATCH 5/5] xfs: consistently use struct xlog in buffer item recovery Dave Chinner
2024-03-19 20:40   ` Darrick J. Wong
2024-03-19 21:48   ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240319231447.GS1927156@frogsfrogsfrogs \
    --to=djwong@kernel.org \
    --cc=david@fromorbit.com \
    --cc=hch@infradead.org \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).