All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Curt Wohlgemuth <curtw@google.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] VFS: Fix race with new inode creation
Date: Fri, 10 Apr 2009 17:01:39 +0100	[thread overview]
Message-ID: <20090410160139.GO26366@ZenIV.linux.org.uk> (raw)
In-Reply-To: <6601abe90904100831r713031b8u41eb161ab94e0c9b@mail.gmail.com>

On Fri, Apr 10, 2009 at 08:31:40AM -0700, Curt Wohlgemuth wrote:
> This patch fixes a race between a task creating a new inode, and one writing
> that same new, dirty inode out to disk.
> 
> We found this using a particular workload (fsstress) along with other
> ancillary processes running on the same machine.  The symptom is one or more
> hung unkillable (uniterruptible sleep) tasks that try to operate on this new
> inode.
> 
> The original comment block is wrong.  Since the inode gets marked dirty
> after it's created, but before its I_LOCK bit is cleared, there _can_ be
> somebody else doing something with this inode -- e.g., a writeback task
> (in our case, __sync_single_inode()).

Um...  I'd say that the real bug in there is that we shouldn't *get* to
__sync_single_inode() until I_NEW/I_LOCK are removed.

  reply	other threads:[~2009-04-10 16:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-10 15:31 [PATCH] VFS: Fix race with new inode creation Curt Wohlgemuth
2009-04-10 16:01 ` Al Viro [this message]
2009-04-10 16:08   ` Curt Wohlgemuth
2009-04-14 16:57   ` Andrew Morton
2009-04-14 17:30     ` Nick Piggin

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=20090410160139.GO26366@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=curtw@google.com \
    --cc=linux-fsdevel@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 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.