Re: [PATCH RFC] __bd_forget should wait for inodes using themapping
From: Chris Mason
Date: Fri Jun 18 2004 - 08:07:38 EST
On Thu, 2004-06-17 at 22:10, viro@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> On Thu, Jun 17, 2004 at 09:54:28PM -0400, Chris Mason wrote:
> > __bd_forget will change the mapping for filesystem inodes without
> > waiting to make sure no users of the block device address space are
> > using that mapping.
> Filesystem block device inodes have no business even looking at their
> ->i_mapping. Where do you need to do that?
sync_sb_inodes, the filesystem block device inode ends up on some dirty
list, and under memory pressure balance_dirty_pages_ratelimited will
trigger writeback on it.
There's nothing to write back of course, the real block device address
space has no dirty pages at all. But, writeback is looking through the
mapping and __bd_forget can't drop it until writeback has finished
I've verified this really is happening ;-) The patch I sent is nasty but
I'm sure this is a real bug.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/