public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Filipe Manana <fdmanana@kernel.org>
Cc: dsterba@suse.cz, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 0/2] btrfs: fix a couple KCSAN warnings
Date: Wed, 21 Feb 2024 12:31:27 +0100	[thread overview]
Message-ID: <20240221113127.GH355@twin.jikos.cz> (raw)
In-Reply-To: <CAL3q7H78JY7ogkGpbhEyNio2QiPOHFmT3U+d3YVcuqot2OS-0w@mail.gmail.com>

On Wed, Feb 21, 2024 at 11:25:16AM +0000, Filipe Manana wrote:
> On Wed, Feb 21, 2024 at 11:13 AM David Sterba <dsterba@suse.cz> wrote:
> >
> > On Tue, Feb 20, 2024 at 12:24:32PM +0000, fdmanana@kernel.org wrote:
> > > From: Filipe Manana <fdmanana@suse.com>
> > >
> > > KCSAN reports a couple data races around access to block reserves.
> > > While they are very likely harmless it generates some noise and reports
> > > will keep coming, so address these.
> > >
> > > Filipe Manana (2):
> > >   btrfs: fix data races when accessing the reserved amount of block reserves
> > >   btrfs: fix data race at btrfs_use_block_rsv() when accessing block reserve
> >
> > Thre's another way to "fix" the KCSAN warnings, adding a data_race()
> > annotation to the access when it does not matter if the lock is taken or
> > not.
> >
> > In commit 748f553c3c4c "btrfs: add KCSAN annotations for unlocked access
> > to block_rsv->full" this was added for 'full', have you considered that
> > for 'reserved' too? The spin lock is also correct regarding the warning
> > but still increases the lock contention.
> 
> Yes, I have considered that, and in the change logs of the patches I
> mention why I chose to take the lock instead.

Ah sorry, I skimmed the changelogs too quickly, it's indeed there.

For both patches,

Reviewed-by: David Sterba <dsterba@suse.com>

      reply	other threads:[~2024-02-21 11:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-20 12:24 [PATCH 0/2] btrfs: fix a couple KCSAN warnings fdmanana
2024-02-20 12:24 ` [PATCH 1/2] btrfs: fix data races when accessing the reserved amount of block reserves fdmanana
2024-02-26 17:39   ` Sweet Tea Dorminy
2024-02-26 17:55     ` Filipe Manana
2024-02-20 12:24 ` [PATCH 2/2] btrfs: fix data race at btrfs_use_block_rsv() when accessing block reserve fdmanana
2024-02-21 11:12 ` [PATCH 0/2] btrfs: fix a couple KCSAN warnings David Sterba
2024-02-21 11:25   ` Filipe Manana
2024-02-21 11:31     ` David Sterba [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=20240221113127.GH355@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=fdmanana@kernel.org \
    --cc=linux-btrfs@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