From: David Sterba <dsterba@suse.cz>
To: fdmanana@kernel.org
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 0/2] btrfs: fix a couple KCSAN warnings
Date: Wed, 21 Feb 2024 12:12:41 +0100 [thread overview]
Message-ID: <20240221111241.GG355@twin.jikos.cz> (raw)
In-Reply-To: <cover.1708429856.git.fdmanana@suse.com>
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.
next prev parent reply other threads:[~2024-02-21 11:13 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 ` David Sterba [this message]
2024-02-21 11:25 ` [PATCH 0/2] btrfs: fix a couple KCSAN warnings Filipe Manana
2024-02-21 11:31 ` David Sterba
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=20240221111241.GG355@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