linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josef Bacik <josef@toxicpanda.com>
To: Meng Xu <mengxu.gatech@gmail.com>
Cc: dsterba@suse.cz, linux-btrfs@vger.kernel.org, josef@toxicpanda.com
Subject: Re: potential data race on `delayed_rsv->full`
Date: Fri, 1 Nov 2019 14:16:07 -0400	[thread overview]
Message-ID: <20191101181606.7dlamcd3x3vf4x2q@macbook-pro-91.dhcp.thefacebook.com> (raw)
In-Reply-To: <c8aaa244-f0f3-0611-0b2d-13a78a57f9bd@gmail.com>

On Fri, Nov 01, 2019 at 01:09:30PM -0400, Meng Xu wrote:
> Hi David,
> 
> Thank you for the confirmation and the additional information.
> 
> I feel the same that this race may not lead to serious issues, but would
> rather prefer a confirmation from the developers. Thank you again for your
> time!
> 

Sorry I saw this while I was on vacation, I read through and determined that
there were no cases where this would bite us.  This is just used as a lock free
way to see if we should refill the delayed refs rsv.  Worst case we don't and
the next guy does it, it doesn't affect us in an practical way.

However given our recent fun with inode->i_size it may be worth it to wrap
access to ->full with WRITE_ONCE/READ_ONCE to make sure nothing squirrely
happens in the future.  Thanks,

Josef

  reply	other threads:[~2019-11-01 18:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-15 18:33 potential data race on `delayed_rsv->full` Meng Xu
2019-11-01 15:45 ` David Sterba
2019-11-01 17:09   ` Meng Xu
2019-11-01 18:16     ` Josef Bacik [this message]
2019-11-05 10:01       ` 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=20191101181606.7dlamcd3x3vf4x2q@macbook-pro-91.dhcp.thefacebook.com \
    --to=josef@toxicpanda.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=mengxu.gatech@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 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).