From: Anton Altaparmakov <aia21@cam.ac.uk>
To: Andrew Morton <akpm@osdl.org>
Cc: Robert S Peterson <rpeterso@redhat.com>, linux-fsdevel@vger.kernel.org
Subject: Re: [patch] loop.c to use write ops for fs requiring special locking
Date: Thu, 2 Mar 2006 10:16:28 +0000 (GMT) [thread overview]
Message-ID: <Pine.LNX.4.64.0603021002001.15033@hermes-2.csi.cam.ac.uk> (raw)
In-Reply-To: <20060301140902.53350bb6.akpm@osdl.org>
On Wed, 1 Mar 2006, Andrew Morton wrote:
> Robert S Peterson <rpeterso@redhat.com> wrote:
> > 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?
It is simply that it is faster on all file systems that can use
prepare_write/commit_write and the "performance hungry" would have
complained if it were to be removed.
> > 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).
*blink* Why should it not work?
cryptoloop is exactly the reason for the performance hit with using
->write rather than prepare_write/commit_write as we need to allocate a
temporary page, do the transformation from the source page to the
temporary page, then send the temporary page to ->write, and finally
release the page. Ugly but the only way to allow transformations
in-flight I could see when writing the ->write using code for loop.c...
Best regards,
Anton
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/
next prev parent reply other threads:[~2006-03-02 10:16 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
2006-03-02 10:16 ` Anton Altaparmakov [this message]
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=Pine.LNX.4.64.0603021002001.15033@hermes-2.csi.cam.ac.uk \
--to=aia21@cam.ac.uk \
--cc=akpm@osdl.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).