All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: kusumi.tomohiro@gmail.com
Cc: fio@vger.kernel.org, Tomohiro Kusumi <tkusumi@tuxera.com>
Subject: Re: [PATCH v2 6/7] Acquire file ->lock while the lock itself is being copied
Date: Tue, 14 Feb 2017 08:23:48 -0700	[thread overview]
Message-ID: <20170214152348.GA32572@kernel.dk> (raw)
In-Reply-To: <20170214151948.16460-7-tkusumi@tuxera.com>

On Tue, Feb 14 2017, kusumi.tomohiro@gmail.com wrote:
> From: Tomohiro Kusumi <tkusumi@tuxera.com>
> 
> to the destination file pointer.
> The ones in dup_files() doesn't seem to require locking from
> the way it's been called.

I've been thinking about this a little bit, since I could not see what
the race was. Do you spot one, or are you just acting on the comment?
I think the original race was that we copied over the lock, lock owner,
batch, etc. Hence the race was that if someone else grabbed the lock
while we were doing that copy, the fields weren't in a consistent state.
But now we're just copying the pointer to the lock, so I don't think
there's a race. It's just a stale comment.

-- 
Jens Axboe



  reply	other threads:[~2017-02-14 15:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-14 15:19 [PATCH v2 0/7] kusumi.tomohiro
2017-02-14 15:19 ` [PATCH v2 1/7] configure: Drop default CONFIG_LITTLE_ENDIAN for Cygwin kusumi.tomohiro
2017-02-14 15:19 ` [PATCH v2 2/7] configure: Use x86 instead of i386 for $cpu for IA32 kusumi.tomohiro
2017-02-14 15:19 ` [PATCH v2 3/7] Drop conditional declaration of disk_list kusumi.tomohiro
2017-02-14 15:19 ` [PATCH v2 4/7] Always set ->real_file_size to -1 when failed to get file size kusumi.tomohiro
2017-02-14 15:19 ` [PATCH v2 5/7] Add missing "rand"/"trimwrite" strings to corresponding ddir slots kusumi.tomohiro
2017-02-14 15:19 ` [PATCH v2 6/7] Acquire file ->lock while the lock itself is being copied kusumi.tomohiro
2017-02-14 15:23   ` Jens Axboe [this message]
2017-02-14 15:27     ` Tomohiro Kusumi
2017-02-14 15:33       ` Jens Axboe
2017-02-14 15:19 ` [PATCH v2 7/7] Use 0 instead of DDIR_READ to iterate from 0 to DDIR_RWDIR_CNT kusumi.tomohiro
2017-02-14 15:25 ` [PATCH v2 0/7] Jens Axboe

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=20170214152348.GA32572@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=fio@vger.kernel.org \
    --cc=kusumi.tomohiro@gmail.com \
    --cc=tkusumi@tuxera.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.