mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Unai Garro Arrazola <Unai.Garro@ee.ed.ac.uk>
To: Andrew Morton <akpm@digeo.com>, Andy Pfiffer <andyp@osdl.org>
Cc: christophe@saout.de, adam@yggdrasil.com,
	linux-kernel@vger.kernel.org,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Max Valdez <maxvalde@fis.unam.mx>,
	Eduardo Pereira Habkost <ehabkost@conectiva.com.br>
Subject: Re: ext[23]/lilo/2.5.{68,69,70} -- blkdev_put() problem?
Date: Fri, 13 Jun 2003 23:12:45 +0100	[thread overview]
Message-ID: <200306132312.54493.Unai.Garro@ee.ed.ac.uk> (raw)
In-Reply-To: <20030613010149.359cb4dd.akpm@digeo.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I just got the time to checked. It works great, thanks! Where can I send this 
box of chocolates as gratitude? ;-)

On Friday 13 June 2003 09:01, Andrew Morton wrote:
> This should fix it.
>
>
>
> Once the blockdev inode for /dev/ram0 is dirtied we have a memory-backed
> inode on the blockdev superblock's s_dirty list.
>
> sync_sb_inodes() sees the memory-backed inode on the superblock and assumes
> that all the other inodes on the superblock are also memory-backed.  This
> is not true for the blockdev superblock!  We forget to write out dirty
> pages against the following blockdevs.
>
> Fix this by just leaving the inode dirty and moving on to inspect the other
> blockdev inodes on sb->s_io.
>
> (This is a little inefficient: an alternative is to leave dirtied
> memory-backed inodes on inode_in_use, so nobody ever even considers them
> for writeout.  But that introduces an inconsistency and is a bit kludgey).
>
>
>
>  fs/fs-writeback.c |   15 ++++++++++++++-
>  1 files changed, 14 insertions(+), 1 deletion(-)
>
> diff -puN fs/fs-writeback.c~writeback-memory-backed-fix fs/fs-writeback.c
> --- 25/fs/fs-writeback.c~writeback-memory-backed-fix	2003-06-12
> 23:12:28.000000000 -0700 +++ 25-akpm/fs/fs-writeback.c	2003-06-12
> 23:14:07.000000000 -0700
> @@ -260,8 +260,21 @@ sync_sb_inodes(struct super_block *sb, s
>  		struct address_space *mapping = inode->i_mapping;
>  		struct backing_dev_info *bdi = mapping->backing_dev_info;
>
> -		if (bdi->memory_backed)
> +		if (bdi->memory_backed) {
> +			if (sb == blockdev_superblock) {
> +				/*
> +				 * Dirty memory-backed blockdev: the ramdisk
> +				 * driver does this.
> +				 */
> +				list_move(&inode->i_list, &sb->s_dirty);
> +				continue;
> +			}
> +			/*
> +			 * Assume that all inodes on this superblock are memory
> +			 * backed.  Skip the superblock.
> +			 */
>  			break;
> +		}
>
>  		if (wbc->nonblocking && bdi_write_congested(bdi)) {
>  			wbc->encountered_congestion = 1;
>
> _

- -- 
Coincidences are spiritual puns.
		-- G.K. Chesterton
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+6kxjhxDfDIoZlaURAsHrAKCRFnHCpzdBbtJ8C9vrY6P7T9+dYACgg+fL
XYizhhJD8KZ3bO4O/YzXr2c=
=Rwik
-----END PGP SIGNATURE-----

  parent reply	other threads:[~2003-06-13 22:01 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-09 19:04 [KEXEC][2.5.69] kexec for 2.5.69 available Andy Pfiffer
2003-05-09 20:04 ` ext3/lilo/2.5.6[89] (was: [KEXEC][2.5.69] kexec for 2.5.69 available) Christophe Saout
2003-05-09 20:55   ` Andy Pfiffer
2003-05-09 20:46     ` ext3/lilo/2.5.6[89] (was: [KEXEC][2.5.69] kexec for 2.5.69available) Riley Williams
2003-05-09 22:39       ` Joe Korty
2003-05-09 23:39       ` Andy Pfiffer
2003-06-11 22:08     ` ext[23]/lilo/2.5.{68,69,70} -- IDE Problem? Andy Pfiffer
2003-06-11 23:21       ` Christophe Saout
2003-06-11 23:40         ` Bartlomiej Zolnierkiewicz
2003-06-12  0:20         ` ext[23]/lilo/2.5.{68,69,70} -- blkdev_put() problem? Andy Pfiffer
2003-06-12  0:29           ` Andrew Morton
2003-06-12 10:42             ` Christophe Saout
2003-06-12 10:54               ` Andrew Morton
2003-06-12 11:12                 ` Christophe Saout
2003-06-12 11:24                 ` ext[23]/lilo/2.5.{68,69,70} -- strace lilo - freeze Christophe Saout
2003-06-12 12:44                 ` ext[23]/lilo/2.5.{68,69,70} -- blkdev_put() problem? Herbert Xu
2003-06-12 17:27             ` Andy Pfiffer
2003-06-12 17:53               ` Andrew Morton
2003-06-12 18:03                 ` Andy Pfiffer
2003-06-12 18:10                   ` Andrew Morton
2003-06-12 18:53                     ` Christophe Saout
2003-06-12 18:25                   ` Andy Pfiffer
2003-06-13  8:01                     ` Andrew Morton
2003-06-13  9:57                       ` Herbert Xu
2003-06-13 14:42                       ` Eduardo Pereira Habkost
2003-06-13 17:17                       ` Andy Pfiffer
2003-06-13 22:12                       ` Unai Garro Arrazola [this message]
2003-06-13 22:28                         ` Andrew Morton

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=200306132312.54493.Unai.Garro@ee.ed.ac.uk \
    --to=unai.garro@ee.ed.ac.uk \
    --cc=adam@yggdrasil.com \
    --cc=akpm@digeo.com \
    --cc=andyp@osdl.org \
    --cc=christophe@saout.de \
    --cc=ehabkost@conectiva.com.br \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maxvalde@fis.unam.mx \
    /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

all inboxes | Powered by JetHome®