All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Mark Fasheh <mark.fasheh@oracle.com>,
	linux-fsdevel@vger.kernel.org,
	Michael Halcrow <mhalcrow@us.ibm.com>
Subject: Re: i_mutex locking in generic_file_splice_write()
Date: Fri, 13 Oct 2006 10:18:56 +0200	[thread overview]
Message-ID: <20061013081855.GG6515@kernel.dk> (raw)
In-Reply-To: <20061013011129.42a757fb.akpm@osdl.org>

On Fri, Oct 13 2006, Andrew Morton wrote:
> On Fri, 13 Oct 2006 09:45:17 +0200
> Jens Axboe <jens.axboe@oracle.com> wrote:
> 
> > > Compile tested only. I probably won't get a chance to actually run it until
> > > late this weekend at the earliest :/
> > 
> > Patch looks ok to me. The double lock test only works, as long as splice
> > is the only one ever locking both mutexes. Or if others follow the same
> > ordering rules. I'm not very well versed in vfs matters, is that
> > guarenteed?
> 
> Taking the lowest-addressed lock first is the usual convention, if we really
> have to do that.  I'm not aware of anywhere else where we pull this
> trick with i_mutex though.

It is, but people had concerns with that approach when it was originally
done for pipe tee'ing. Things like lock_rename() look scary.

-- 
Jens Axboe


  reply	other threads:[~2006-10-13  8:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-12 19:01 i_mutex locking in generic_file_splice_write() Mark Fasheh
2006-10-12 19:54 ` Andrew Morton
2006-10-13  0:17   ` Mark Fasheh
2006-10-13  7:45     ` Jens Axboe
2006-10-13  8:11       ` Andrew Morton
2006-10-13  8:18         ` Jens Axboe [this message]
2006-10-13 19:44           ` Mark Fasheh
2006-10-15 18:05             ` Jens Axboe
2006-10-15 19:56               ` Mark Fasheh
2006-10-15 20:08                 ` Jens Axboe
2006-10-15 20:14                   ` Mark Fasheh
2006-10-16 17:58                     ` Andreas Dilger
2006-10-16 22:24                       ` Mark Fasheh

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=20061013081855.GG6515@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=akpm@osdl.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=mark.fasheh@oracle.com \
    --cc=mhalcrow@us.ibm.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.