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] ext4: Use page_mkwrite vma_operations to get mmap write notification.
Date: Fri, 22 Feb 2008 23:53:10 +0530 [thread overview]
Message-ID: <20080222182310.GC6629@skywalker> (raw)
In-Reply-To: <1203703848.3639.9.camel@localhost.localdomain>
On Fri, Feb 22, 2008 at 10:10:48AM -0800, Mingming Cao wrote:
> On Fri, 2008-02-22 at 20:09 +0530, Aneesh Kumar K.V wrote:
.....
> > + ext4_journal_stop(handle);
> > + goto out_unlock;
> > + }
> > + if (!ret && ext4_should_order_data(inode)) {
> > + ret = walk_page_buffers(handle, page_buffers(page),
> > + 0, end, NULL, ext4_journal_dirty_data);
> > + }
> > + if (!ret)
> > + ret = block_commit_write(page, 0, end);
> > +
> Hmm, it seems wired to do commit_write when the page is about becoming
> writable, but maybe that's the way it needs to?
>
> Don't we need to update the i_size somewhere?
block_commit_write simply iterate over buffer_head of page and mark them
dirty. That is why we don't want to call that for data=journalled mode.
>
> > + ext4_journal_stop(handle);
> > +out_unlock:
> > + unlock_page(page);
> > + mutex_unlock(&inode->i_mutex);
> > + return ret;
> > +}
>
> It seems this combined the three journalling mode prepare_write() code
> here:(
>
> Since prepare_write() and commit_write() is going to sunset, why not
> simply calling mappings->a_ops->write_begin() and then write_end()? that
> should take care of pretty much the journalling and the page operations,
> no?
write_begin and write_end works with the user space buffer. In this case
we don't have one. Also what ext4_page_mkwrite does is mostly what
write_begin/write_end does except the copy of user space buffer.
-aneesh
next prev parent reply other threads:[~2008-02-22 18:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-22 14:39 [PATCH] ext4: Use page_mkwrite vma_operations to get mmap write notification Aneesh Kumar K.V
2008-02-22 14:39 ` [PATCH] ext4: Fix fallocate error path Aneesh Kumar K.V
2008-02-22 14:39 ` [PATCH] ext4: Convert uninitialized extent to initialized extent in case of file system full Aneesh Kumar K.V
2008-02-22 15:07 ` Aneesh Kumar K.V
2008-02-22 18:10 ` [PATCH] ext4: Use page_mkwrite vma_operations to get mmap write notification Mingming Cao
2008-02-22 18:23 ` Aneesh Kumar K.V [this message]
2008-02-22 19:28 ` Mingming Cao
-- strict thread matches above, loose matches on Subject: below --
2008-05-30 13:39 [PATCH -v2] delalloc and journal locking order inversion fixes Aneesh Kumar K.V
2008-05-30 13:39 ` [PATCH] ext4: Use page_mkwrite vma_operations to get mmap write notification Aneesh Kumar K.V
2008-05-21 17:44 delalloc and journal locking order inversion fixes Aneesh Kumar K.V
2008-05-21 17:44 ` [PATCH] ext4: Add validation to jbd lock inversion patch and split and writepage Aneesh Kumar K.V
2008-05-21 17:44 ` [PATCH] ext4: inverse locking ordering of page_lock and transaction start in delalloc Aneesh Kumar K.V
2008-05-21 17:44 ` [PATCH] ext4: Fix delalloc sync hang with journal lock inversion Aneesh Kumar K.V
2008-05-21 17:44 ` [PATCH] ext4: Inverse locking order of page_lock and transaction start Aneesh Kumar K.V
2008-05-21 17:44 ` [PATCH] ext4: Use page_mkwrite vma_operations to get mmap write notification Aneesh Kumar K.V
2008-02-18 11:53 Aneesh Kumar K.V
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=20080222182310.GC6629@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