Re: [PATCH] Make ll_rw_block() wait for buffer lock

From: Andrew Morton
Date: Mon Jul 11 2005 - 18:39:38 EST


Jan Kara <jack@xxxxxxx> wrote:
>
> attached patch adds an operation SWRITE to ll_rw_block(). When this
> operation is specified ll_rw_block() waits for a buffer lock and doesn't
> just skip the locked buffer. Under some circumstances we need to make
> sure that current data are really being sent to disk and the old
> ll_rw_block()'s behaviour makes this impossible to achieve (as in some
> places we lock and unlock buffer without sending it to disk).

Fair enough - it's certainly saner this way.

Ordinarily it would be nicer to add a new function for this, say

ll_sync_write_bufs(struct buffer_head **bufs, int nr)

rather than adding new interpretations to ll_rw_block().

But ll_rw_block() is such a familiar old thing that I guess there's not
much advantage in adding some new thing for people to remember.
-
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/