public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: Theodore Tso <tytso@mit.edu>
Cc: linux-ext4@vger.kernel.org
Subject: Re: Problem with delayed allocation
Date: Wed, 6 Aug 2008 15:35:53 +0530	[thread overview]
Message-ID: <20080806100553.GB31907@skywalker> (raw)
In-Reply-To: <20080805132133.GA15568@skywalker>

On Tue, Aug 05, 2008 at 06:51:33PM +0530, Aneesh Kumar K.V wrote:
> On Tue, Aug 05, 2008 at 12:22:17PM +0530, Aneesh Kumar K.V wrote:
> > On Tue, Aug 05, 2008 at 02:44:28AM -0400, Theodore Tso wrote:
> > > On Mon, Aug 04, 2008 at 10:05:05PM +0530, Aneesh Kumar K.V wrote:
> > > > 
> > > > This is the complete patch that  I have. I haven't fully tested it
> > > > (right now waiting for the machine to be free). This should apply 
> > > > after stable-boundary-undo.patch
> > > 
> > > Umm... the patch doesn't apply right after the stable boundary udo
> > > patch.
> > > 
> > > 						- Ted
> > 
> > I did a fresh git pull and updated the patch. I also accumulated few
> > changes after words while testing on ABAT. Attaching both the patches
> > below. The patches apply after ext4_journal_credits_fix_for_writepages.patch
> > in the patch queue.
> 
> I still see the problem with the below changes. Now that i have read
> the writeback path more closely I am not sure how it will guarantee
> that all dirty pages of the inode are written back to disk before
> generic_sync_sb_inodes return.
> 

Below changes fixed it for me. range_start was used in the loop in
generic_sync_sb_inodes and since we were checking for !range_start
we missed restoring wbc->range_start for range_start == 0.

    Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>

diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 472a6a7..ea1a8db 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -2241,14 +2241,14 @@ static int ext4_da_writepages(struct address_space *mapping,
 	if (!mapping->nrpages || !mapping_tagged(mapping, PAGECACHE_TAG_DIRTY))
 		return 0;
 
-	if (!wbc->range_cyclic) {
+	if (!wbc->range_cyclic)
 		/*
 		 * If range_cyclic is not set force range_cont
 		 * and save the old writeback_index
 		 */
 		wbc->range_cont = 1;
-		range_start =  wbc->range_start;
-	}
+
+	range_start =  wbc->range_start;
 	pages_skipped = wbc->pages_skipped;
 
 restart_loop:
@@ -2322,8 +2322,7 @@ static int ext4_da_writepages(struct address_space *mapping,
 
 out_writepages:
 	wbc->nr_to_write = to_write;
-	if (range_start)
-		wbc->range_start = range_start;
+	wbc->range_start = range_start;
 	return ret;
 }
 

  parent reply	other threads:[~2008-08-06 10:06 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-02 20:07 Problem with delayed allocation Theodore Ts'o
2008-08-02 22:40 ` Theodore Tso
2008-08-04  3:16 ` Aneesh Kumar K.V
2008-08-04 14:08   ` Theodore Tso
2008-08-04 14:52 ` Aneesh Kumar K.V
2008-08-04 15:27   ` Aneesh Kumar K.V
2008-08-04 15:33     ` Aneesh Kumar K.V
2008-08-04 16:35 ` Aneesh Kumar K.V
2008-08-05  6:44   ` Theodore Tso
2008-08-05  6:52     ` Aneesh Kumar K.V
2008-08-05 13:21       ` Aneesh Kumar K.V
2008-08-05 13:47         ` Theodore Tso
2008-08-05 14:24           ` Aneesh Kumar K.V
2008-08-05 15:16             ` Theodore Tso
2008-08-06 10:05         ` Aneesh Kumar K.V [this message]
2008-08-06 10:11           ` Aneesh Kumar K.V
2008-08-07  0:49             ` Mingming Cao

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=20080806100553.GB31907@skywalker \
    --to=aneesh.kumar@linux.vnet.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