Messages in this thread Patch in this message |  | | From | Unai Garro Arrazola <> | Subject | Re: ext[23]/lilo/2.5.{68,69,70} -- blkdev_put() problem? | Date | Fri, 13 Jun 2003 23:12:45 +0100 |
| |
-----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----- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |