All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: cen zhang <zzzccc427@gmail.com>
Cc: cem@kernel.org, linux-xfs@vger.kernel.org,
	linux-kernel@vger.kernel.org, baijiaju1990@gmail.com,
	zhenghaoran154@gmail.com
Subject: Re: [BUG] Data race between xfs_file_release and xfs_bmap_del_extent_delay about i_delayed_blks
Date: Sun, 11 May 2025 21:33:12 -0700	[thread overview]
Message-ID: <aCF6CEJoh3En3icU@infradead.org> (raw)
In-Reply-To: <CAFRLqsWw_6XYE5K+31UBV+DOUht1MG+6v=P587DP-Su3z8t3Rg@mail.gmail.com>

On Mon, May 12, 2025 at 12:01:54PM +0800, cen zhang wrote:
> I would like to report a data race bug detected in
> the Btrfs filesystem on Linux kernel 6.14-rc4.

xfs?

> The issue was discovered by our tools,

As in KCSAN?

> Reader (fs/xfs/xfs_file.c):
> xfs_file_release  {
> ……
>         xfs_iflags_clear(ip, XFS_EOFBLOCKS_RELEASED);
>         if (ip->i_delayed_blks > 0)
>             filemap_flush(inode->i_mapping);
> ……
> }

And this should make it very clear that the race does not matter.
bu we should indeed throw in a data_race() and a comment to make that
clear.  I'll take care of that.


      reply	other threads:[~2025-05-12  4:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-12  4:01 [BUG] Data race between xfs_file_release and xfs_bmap_del_extent_delay about i_delayed_blks cen zhang
2025-05-12  4:33 ` Christoph Hellwig [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=aCF6CEJoh3En3icU@infradead.org \
    --to=hch@infradead.org \
    --cc=baijiaju1990@gmail.com \
    --cc=cem@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=zhenghaoran154@gmail.com \
    --cc=zzzccc427@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.