Re: [PATCH] writeback: Don't wait for completion inwriteback_inodes_sb_nr

From: Christoph Hellwig
Date: Sat Jul 02 2011 - 07:32:24 EST


On Fri, Jul 01, 2011 at 03:55:33PM -0700, Curt Wohlgemuth wrote:
> One other issue I have with sync as it's structured is that we don't
> do a WB_SYNC_ALL pass on any inode that's only associated with a block
> device, and not on a mounted filesystem. Blockdev mounts are
> pseudo-mounts, and are explicitly skipped in __sync_filesystem(). So
> if you've written directly to a block device and do a sync, the only
> pass over the pages for this inode are via the
> wakeup_flusher_threads() -- which operates on a BDI, regardless of the
> superblock, and uses WB_SYNC_NONE.
>
> All the sync_filesystem() calls are per-sb, not per-BDI, and they'll
> exclude pseudo-superblocks.

Interesting. I think that's actually correct by the traditional
defintion of sync, but not really useful. I also doubt it's
intentional.

> I've seen cases in our modified kernels here at Google in which
> lilo/shutdown failed because of a lack of WB_SYNC_ALL writeback for
> /dev/sda (though I haven't been able to come up with a consistent test
> case, nor reproduce this on an upstream kernel).

lilo really should do an fsync of the partition it installed itself
into. That's won't only fix this issue, but also has a lot less impact
on the rest of the system.

--
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/