public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Balaji Rao <balajirrao@gmail.com>
Cc: linux-btrfs@vger.kernel.org, Chris Mason <chris.mason@oracle.com>
Subject: Re: Problem during implementing NFS support
Date: Sun, 20 Jul 2008 13:08:16 -0700	[thread overview]
Message-ID: <1216584496.2475.198.camel@shinybook.infradead.org> (raw)
In-Reply-To: <200807210106.56056.balajirrao@gmail.com>

On Mon, 2008-07-21 at 01:06 +0530, Balaji Rao wrote:
> The idea of the patch seems correct to me, that once we "own" the
> lock, an attempt to take it again should be a nop.

Well, kind of correct. There are potentially race conditions with the
handling of f->readdir_process, but given that we only ever really
compare it to 'current', it's actually going to turn out OK in practice.
You won't ever actually get a false negative (and deadlock) or a false
positive (and go through lookup() without locking), as far as I can
tell.

But still, it's ugly as sin and I'd much rather come up with a _proper_
fix in the VFS. I was looking at it at one point, and didn't actually
apply that patch to the JFFS2 tree.

Since general btrfs work is now more of a priority for me than getting
JFFS2 to be NFS-exportable was, I think I'll pick up where I left off
with that.

In the meantime, we have an evil hack which at least ought to work for
now.

-- 
David Woodhouse                            Open Source Technology Centre
David.Woodhouse@intel.com                              Intel Corporation

-- 
dwmw2


  reply	other threads:[~2008-07-20 20:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-20 19:11 Problem during implementing NFS support Balaji Rao
2008-07-20 16:43 ` David Woodhouse
2008-07-20 19:36   ` Balaji Rao
2008-07-20 20:08     ` David Woodhouse [this message]
2008-07-21  8:10   ` Christoph Hellwig
2008-07-21 12:58     ` Chris Mason

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=1216584496.2475.198.camel@shinybook.infradead.org \
    --to=dwmw2@infradead.org \
    --cc=balajirrao@gmail.com \
    --cc=chris.mason@oracle.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