The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Chris Mason <mason@suse.com>
To: Andrea Arcangeli <andrea@suse.de>
Cc: Andrey Savochkin <saw@saw.sw.com.sg>,
	Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org
Subject: Re: EXT3: problem with copy_from_user inside a transaction
Date: Fri, 03 Sep 2004 08:06:20 -0400	[thread overview]
Message-ID: <1094213179.16078.19.camel@watt.suse.com> (raw)
In-Reply-To: <20040903123541.GB8557@x30.random>

On Fri, 2004-09-03 at 08:35, Andrea Arcangeli wrote:
> On Fri, Sep 03, 2004 at 03:05:21PM +0400, Andrey Savochkin wrote:
> > Hi Andrew,
> > 
> > filemap_copy_from_user() between prepare_write() and commit_write()
> > appears to be a problem for ext3.
> > 
And reiserv3, and maybe the other journaled filesystems.

> yes, Chris is working on it for a few months.
> 
Working is a generous term, I've somewhat been waiting for a better
solution to pop into my head.  In the end, I think all we can do is not
allow filesystems to take locks (or implicit locks like starting a
transaction) inside the prepare_write call.

This would mean that all the work is done during the commit_write
stage.  The trick is that we would have to handle -ENOSPC since we might
not know we've run out of room until after the data has been copied from
userland.

prepare_write could reserve blocks, which brings us half way to a
generic delayed allocation layer.  But for a quick and dirty start,
doing it all in commit_write should work.

-chris



  reply	other threads:[~2004-09-03 13:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-03 11:05 EXT3: problem with copy_from_user inside a transaction Andrey Savochkin
2004-09-03 12:35 ` Andrea Arcangeli
2004-09-03 12:06   ` Chris Mason [this message]
2004-09-03 13:03     ` Andrea Arcangeli
2004-09-03 13:57     ` Andrey Savochkin
2004-09-04  7:47       ` Chris Mason
2004-09-04 14:33         ` Andrey Savochkin
2004-09-04 20:12           ` Andrey Savochkin
2004-09-07 11:55     ` [RFC][PATCH] " Andrey Savochkin

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=1094213179.16078.19.camel@watt.suse.com \
    --to=mason@suse.com \
    --cc=akpm@osdl.org \
    --cc=andrea@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=saw@saw.sw.com.sg \
    /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