From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Mingming Cao <cmm@us.ibm.com>
Cc: tytso@mit.edu, linux-ext4@vger.kernel.org
Subject: Re: [PATCH -v2] ext4: Use page_mkwrite vma_operations to get mmap write notification.
Date: Fri, 22 Feb 2008 00:49:29 +0530 [thread overview]
Message-ID: <20080221191929.GB8292@skywalker> (raw)
In-Reply-To: <1203615560.3750.8.camel@localhost.localdomain>
On Thu, Feb 21, 2008 at 09:39:20AM -0800, Mingming Cao wrote:
> On Tue, 2008-02-19 at 09:13 +0530, Aneesh Kumar K.V wrote:
> > We would like to get notified when we are doing a write on mmap section.
> > This is needed with respect to preallocated area. We split the preallocated
> > area into initialzed extent and uninitialzed extent in the call back. This
> > let us handle ENOSPC better. Otherwise we get ENOSPC in the writepage and
> > that would result in data loss. The changes are also needed to handle ENOSPC
> > when writing to an mmap section of files with holes.
> >
>
> Hi Aneesh,
>
> I have a concern, it seems we missed journalling the allocation activity
> for the mmaped write. See comments below...
>
> Another thing, perhaps similar patch should be ported to ext2/3, as this
> also addressed the mmaped write ENOSPC error without
> preallocation/deleyed allocation.
>
> > Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
......
> > +
> > +int ext4_page_mkwrite(struct vm_area_struct *vma, struct page *page)
> > +{
> > + return block_page_mkwrite(vma, page, ext4_get_block);
> > +}
> > +
>
> I don't see block allocation being journalled here. block_page_mkwrite()
> eventually calling block_prepare_write() which invokes ext4_get_block()
> without starting a new journal handle.
>
> Perhaps call ext4 write_begin() and write_end() inode operations, that
> would taking care of different write_begin and write_end for three
> different journalling mode.
>
You are correct. I missed the journalling details when working on the
patch. Will send the one with fix.
-aneesh
prev parent reply other threads:[~2008-02-21 19:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-19 3:43 [PATCH -v2] ext4: Use page_mkwrite vma_operations to get mmap write notification Aneesh Kumar K.V
2008-02-19 3:44 ` [PATCH -v2] ext4: Don't mark the filesystem with errors if we fail to fallocate Aneesh Kumar K.V
2008-02-19 5:24 ` Mingming Cao
2008-02-19 5:25 ` [PATCH -v2] ext4: Use page_mkwrite vma_operations to get mmap write notification Mingming Cao
2008-02-21 17:39 ` Mingming Cao
2008-02-21 19:19 ` Aneesh Kumar K.V [this message]
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=20080221191929.GB8292@skywalker \
--to=aneesh.kumar@linux.vnet.ibm.com \
--cc=cmm@us.ibm.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/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