[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110213013452.GF19533@dhcp231-156.rdu.redhat.com>
Date: Sat, 12 Feb 2011 20:34:53 -0500
From: Josef Bacik <josef@...hat.com>
To: "Theodore Ts'o" <tytso@....edu>
Cc: Ext4 Developers List <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH,RFC 3/7] ext4: clear the dirty bit for a page in
writeback at the last minute
On Sat, Feb 12, 2011 at 07:15:53PM -0500, Theodore Ts'o wrote:
> Move when we call clear_page_dirty_for_io() to just before we actually
> write the page. This simplifies the code somewhat, and avoids marking
> pages as clean and then needing to remark them as dirty later.
>
> Signed-off-by: "Theodore Ts'o" <tytso@....edu>
> ---
> fs/ext4/inode.c | 28 +++++++++++-----------------
> 1 files changed, 11 insertions(+), 17 deletions(-)
>
> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
> index e230f4f..3eca465 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -2060,7 +2060,7 @@ static int mpage_da_submit_io(struct mpage_da_data *mpd,
> if (nr_pages == 0)
> break;
> for (i = 0; i < nr_pages; i++) {
> - int commit_write = 0, redirty_page = 0;
> + int commit_write = 0, skip_page = 0;
> struct page *page = pvec.pages[i];
>
> index = page->index;
> @@ -2086,14 +2086,12 @@ static int mpage_da_submit_io(struct mpage_da_data *mpd,
> * If the page does not have buffers (for
> * whatever reason), try to create them using
> * __block_write_begin. If this fails,
> - * redirty the page and move on.
> + * skip the page and move on.
> */
> if (!page_has_buffers(page)) {
> if (__block_write_begin(page, 0, len,
> noalloc_get_block_write)) {
> - redirty_page:
> - redirty_page_for_writepage(mpd->wbc,
> - page);
> + skip_page:
Hmm so it looks like it's been done like this before. I guess if thats the way
you want it then it's ok, I just find it hard to read. Other than that this
looks good. Thanks,
Josef
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists