From: Nikolay Borisov <nborisov@suse.com>
To: dsterba@suse.cz
Cc: linux-btrfs@vger.kernel.org, josef@toxicpanda.com,
Nikolay Borisov <nborisov@suse.com>
Subject: [PATCH] btrfs: Remove memory barrier from block_group_cache_done
Date: Wed, 30 Aug 2017 19:35:42 +0300 [thread overview]
Message-ID: <1504110942-23146-1-git-send-email-nborisov@suse.com> (raw)
This memory barrier was introduced in 817d52f8dba2 ("Btrfs: async block group
caching"), but even at that time it's usage was broken since it didn't pair
with anything. There was one situation where the cached member was set to
BTRFS_CACHE_FINISHED in a spinlock region which *might* have acted as a pairing
barrier. Since there is no clear semantics how it's supposed to work better
to just remove it.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---
fs/btrfs/extent-tree.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 21c78c48e15b..10c2ef1a9fd2 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -112,7 +112,6 @@ static void space_info_add_old_bytes(struct btrfs_fs_info *fs_info,
static noinline int
block_group_cache_done(struct btrfs_block_group_cache *cache)
{
- smp_mb();
return cache->cached == BTRFS_CACHE_FINISHED ||
cache->cached == BTRFS_CACHE_ERROR;
}
--
2.7.4
next reply other threads:[~2017-08-30 16:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-30 16:35 Nikolay Borisov [this message]
2017-09-25 14:08 ` [PATCH] btrfs: Remove memory barrier from block_group_cache_done 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=1504110942-23146-1-git-send-email-nborisov@suse.com \
--to=nborisov@suse.com \
--cc=dsterba@suse.cz \
--cc=josef@toxicpanda.com \
--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;
as well as URLs for NNTP newsgroup(s).