public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Mingming Cao <cmm@us.ibm.com>
To: Alex Tomas <alex@clusterfs.com>
Cc: Dmitriy Monakhov <dmonakhov@sw.ru>, linux-ext4@vger.kernel.org
Subject: Re: delayed allocatiou result in Oops
Date: Wed, 20 Jun 2007 16:46:10 -0700	[thread overview]
Message-ID: <1182383170.22978.11.camel@localhost.localdomain> (raw)
In-Reply-To: <4678E20D.6060108@clusterfs.com>

On Wed, 2007-06-20 at 12:15 +0400, Alex Tomas wrote:
> Mingming Cao wrote:
> > Hmm, PageMappedToDisk is probably not sufficient enough for pagesize!
> > =blocksize. Is that the reason we need page->private to pass the
> > request?
> 
> PageMappedToDisk isn't enough in that case, definitely. bh is the way
> to track state of each block (this is what i'm implementing now), but
> I think current nobh version (per-page flags are used) is valuable.
> 
> > That's good to know, thanks for the update. So probably above error case
> > handling will be addressed in the new version? 
> 
> well, you actually can move that SetPagePrivate() few lines above
> (Dmitriy already tested this).

Like this?

Index: linux-2.6.22-rc5/fs/ext4/writeback.c
===================================================================
--- linux-2.6.22-rc5.orig/fs/ext4/writeback.c	2007-06-20 16:41:26.000000000 -0700
+++ linux-2.6.22-rc5/fs/ext4/writeback.c	2007-06-20 16:44:10.000000000 -0700
@@ -918,16 +918,16 @@ int ext4_wb_commit_write(struct file *fi
 	wb_debug("commit page %lu (%u-%u) for inode %lu\n",
 			page->index, from, to, inode->i_ino);
 
-	/* mark page private so that we get
-	 * called to invalidate/release page */
-	SetPagePrivate(page);
-
 	if (!PageBooked(page) && !PageMappedToDisk(page)) {
 		/* ->prepare_write() observed that block for this
 		 * page hasn't been allocated yet. there fore it
 		 * asked to reserve block for later allocation */
 		BUG_ON(page->private == 0);
 		page->private = 0;
+		/* mark page private so that we get
+		 * called to invalidate/release page */
+		SetPagePrivate(page);
+
 		err = ext4_wb_reserve_space_page(page, 1);
 		if (err)
 			return err;

  reply	other threads:[~2007-06-20 23:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-14  7:23 delayed allocatiou result in Oops Dmitriy Monakhov
2007-06-15  5:14 ` Alex Tomas
2007-06-15 23:16   ` Mingming Cao
2007-06-16  8:02     ` [PATCH] ext4:fix invariant checking in ext4_rebalance_reservation Dmitriy Monakhov
2007-06-18 21:09       ` Mingming Cao
2007-06-19  5:56       ` Dmitry Monakhov
2007-06-16  8:14     ` delayed allocatiou result in Oops Dmitriy Monakhov
2007-06-19  1:01       ` Mingming Cao
2007-06-19  7:11         ` Alex Tomas
2007-06-19  9:16           ` Dmitry Monakhov
2007-06-19  9:36             ` Alex Tomas
2007-06-19 21:50             ` Andreas Dilger
2007-06-19 16:23           ` Mingming Cao
2007-06-19 16:47             ` Aneesh Kumar K.V
2007-06-20  8:15             ` Alex Tomas
2007-06-20 23:46               ` Mingming Cao [this message]
2007-06-21  4:50                 ` Dmitry Monakhov

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=1182383170.22978.11.camel@localhost.localdomain \
    --to=cmm@us.ibm.com \
    --cc=alex@clusterfs.com \
    --cc=dmonakhov@sw.ru \
    --cc=linux-ext4@vger.kernel.org \
    /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