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

From: Christoph Hellwig
Date: Wed Jun 29 2011 - 02:42:26 EST


On Wed, Jun 29, 2011 at 10:54:22AM +1000, Dave Chinner wrote:
> The comment says it does not wait for IO to be -completed-.
>
> The function as implemented waits for IO to be *submitted*.
>
> This provides the callers with same blocking semantics (i.e. request
> queue full) as if the caller submitted the IO themselves. The code
> that uses this function rely on this blocking to delay the next set
> of operations they do until after IO has been started, so removing
> the completion will change their behaviour significantly.

The real importance is for locking. If we don't wait for completion
we may still do writebacks in the flushers thread while we're already
unlocked s_umount. That will give us back the nasty writeback vs
umount races that this scheme fixed. The commit logs that added
it should explain it in more detail (at least I usually write detailed
changelogs)

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