public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Long Li <leo.lilong@huawei.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: <djwong@kernel.org>, <cem@kernel.org>,
	<linux-xfs@vger.kernel.org>, <david@fromorbit.com>,
	<yi.zhang@huawei.com>, <houtao1@huawei.com>,
	<yangerkun@huawei.com>, <lonuxli.64@gmail.com>
Subject: Re: [PATCH 2/2] xfs: remove bp->b_error check in xfs_attr3_root_inactive
Date: Mon, 23 Dec 2024 09:08:21 +0800	[thread overview]
Message-ID: <Z2i4BVpGXsxt17zj@localhost.localdomain> (raw)
In-Reply-To: <Z2Z3mLjW7KXQKexP@infradead.org>

On Sat, Dec 21, 2024 at 12:08:56AM -0800, Christoph Hellwig wrote:
> On Sat, Dec 21, 2024 at 02:30:43PM +0800, Long Li wrote:
> > The xfs_da3_node_read earlier in the function will catch most cases of
> > incoming on-disk corruption, which makes this check mostly redundant,
> > unless someone corrupts the buffer and the AIL pushes it out to disk
> > while the buffer's unlocked.
> > 
> > In the first case we'll never reach this check, and in the second case
> > the AIL will shut down the log, at which point checking b_error becomes
> > meaningless. Remove the check to make the code consistent with most other
> > xfs_trans_get_buf() callers in XFS.
> 
> Hmm. I don't really understand the commit log.  The b_error check
> is right after a call to xfs_trans_get_buf_map.  xfs_trans_get_buf_map
> either reads the buffer from disk using xfs_buf_get_map which propagates
> b_error, or finds it in the transaction, where whoever read it from
> disk should have done the same.  So I think the change looks fine,
> but I don't think the commit log really explains it very well.
> 

It's true that the commit message is not clearly explained, and I'll rewrite
it in the next version.

Thanks,
Long Li

      reply	other threads:[~2024-12-23  1:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-21  6:30 [PATCH 0/2] xfs: two small cleanup Long Li
2024-12-21  6:30 ` [PATCH 1/2] xfs: remove redundant update for t_curr_res in xfs_log_ticket_regrant Long Li
2024-12-21  8:05   ` Christoph Hellwig
2024-12-23  1:04     ` Long Li
2024-12-21  6:30 ` [PATCH 2/2] xfs: remove bp->b_error check in xfs_attr3_root_inactive Long Li
2024-12-21  8:08   ` Christoph Hellwig
2024-12-23  1:08     ` Long Li [this message]

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=Z2i4BVpGXsxt17zj@localhost.localdomain \
    --to=leo.lilong@huawei.com \
    --cc=cem@kernel.org \
    --cc=david@fromorbit.com \
    --cc=djwong@kernel.org \
    --cc=hch@infradead.org \
    --cc=houtao1@huawei.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=lonuxli.64@gmail.com \
    --cc=yangerkun@huawei.com \
    --cc=yi.zhang@huawei.com \
    /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