All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Robert S Peterson <rpeterso@redhat.com>
Cc: linux-fsdevel@vger.kernel.org, aia21@cam.ac.uk
Subject: Re: [patch] loop.c to use write ops for fs requiring special locking
Date: Wed, 1 Mar 2006 14:09:02 -0800	[thread overview]
Message-ID: <20060301140902.53350bb6.akpm@osdl.org> (raw)
In-Reply-To: <1141231737.15117.88.camel@technetium.msp.redhat.com>

Robert S Peterson <rpeterso@redhat.com> wrote:
>
> Hi All,
> 
> Below is a small patch to loop.c I'd like to see in the kernel.
> 
> This is an extension of Anton Altaparmakov's previous fix which allows
> loop.c to use the aop->write rather than prepare_write/commit_write if
> prepare_write/commit_write aren't available.

There's a reason why we must use prepare_write/commit_write rather than
->write() and ow-ow-my-brain-hurts I can't remember what it was.  Anton, do
you recall?

> Right now, the current loop.c uses aop->prepare_write/commit_write
> unless there is no other option.  However, due to special locking
> requirements, some backing filesystems may prefer the use of aop->write
> rather than prepare_write/commit_write.  Since loop.c does not have
> advisory locking, the backing fs should have a choice of which to use.
> 
> In the case of GFS, for example, loop.c's use of aop->prepare_write
> circumvents proper cluster locking and transaction building, so using
> aop->write is the right thing for loop.c to do.
> 
> How the patch works:
> If the backing filesystem has special locking requirements (new flag in
> fs_flags) loop.c uses aop->write rather than prepare_write/commit_write.
> 

I think you'll find that cryptoloop doesn't work (see "ow-ow", above).

> --- linux-2.6.15.4.orig/drivers/block/loop.c    2006-02-10
> 01:22:48.000000000 -0600
> +++ linux-2.6.15.4.patched/drivers/block/loop.c 2006-03-01
> 09:38:48.000000000 -0600

(The patch is wordwrapped)


  reply	other threads:[~2006-03-01 22:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-01 16:48 [patch] loop.c to use write ops for fs requiring special locking Robert S Peterson
2006-03-01 22:09 ` Andrew Morton [this message]
2006-03-02 10:16   ` Anton Altaparmakov
2006-03-10 23:04     ` Robert S Peterson
2006-03-10 23:13       ` Andrew Morton
2006-03-11  0:36         ` Anton Altaparmakov
2006-03-24 17:07           ` [patch 2.6.16] loop.c to use write ops for fs requiring special locking [try #2] Robert S Peterson
2006-03-24 19:46             ` Anton Altaparmakov
  -- strict thread matches above, loose matches on Subject: below --
2006-03-27 21:52 [PATCH] loop.c to use write ops for fs requiring special locking Robert S Peterson
2006-03-28  0:44 ` Andrew Morton
2006-03-28 15:33   ` Robert S Peterson
2006-03-28 19:27     ` Andrew Morton
2006-03-28 14:40 ` Christoph Hellwig
2006-03-28 15:59   ` Robert S Peterson
2006-03-29  9:05     ` Christoph Hellwig
2006-03-30  0:10       ` Robert S Peterson
2006-03-30 14:15         ` Christoph Hellwig

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=20060301140902.53350bb6.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=aia21@cam.ac.uk \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=rpeterso@redhat.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.