[Devel] [PATCH rh7 6/9] ploop: remove preflush from dio_submit

Dmitry Monakhov dmonakhov at openvz.org
Fri Jun 24 07:42:07 PDT 2016


Maxim Patlasov <mpatlasov at virtuozzo.com> writes:

> After commit c2247f3745 fixing barriers for ordinary
> requests and previous patch fixing delay_fua,
> that legacy code in dio_submit processing
> (preq->req_rw & REQ_FLUSH) by setting REQ_FLUSH in
> the first outgoing bio must die: it is incorrect
> anyway (we don't wait for completion of the first
> bio before sending others).
Wow. This is so true. BTW: Reasonable way to handle FLUSH
is to queue such preq to preflush_queue similar to fsync_queue for
fsync_thread infrastructure

>
> Signed-off-by: Maxim Patlasov <mpatlasov at virtuozzo.com>
> ---
>  drivers/block/ploop/io_direct.c |    7 -------
>  1 file changed, 7 deletions(-)
>
> diff --git a/drivers/block/ploop/io_direct.c b/drivers/block/ploop/io_direct.c
> index 1ea2008..ee3cd5c 100644
> --- a/drivers/block/ploop/io_direct.c
> +++ b/drivers/block/ploop/io_direct.c
> @@ -89,15 +89,12 @@ dio_submit(struct ploop_io *io, struct ploop_request * preq,
>  	sector_t sec, nsec;
>  	int err;
>  	struct bio_list_walk bw;
> -	int preflush;
>  	int postfua = 0;
>  	int write = !!(rw & REQ_WRITE);
>  	int delayed_fua = 0;
>  
>  	trace_submit(preq);
>  
> -	preflush = !!(rw & REQ_FLUSH);
> -
>  	if (test_and_clear_bit(PLOOP_REQ_FORCE_FUA, &preq->state))
>  		postfua = 1;
>  
> @@ -236,10 +233,6 @@ flush_bio:
>  		b->bi_private = preq;
>  		b->bi_end_io = dio_endio_async;
>  
> -		if (unlikely(preflush)) {
> -			rw2 |= REQ_FLUSH;
> -			preflush = 0;
> -		}
>  		if (unlikely(postfua && !bl.head))
>  			rw2 |= REQ_FUA;
>  
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 472 bytes
Desc: not available
URL: <http://lists.openvz.org/pipermail/devel/attachments/20160624/778674e8/attachment.sig>


More information about the Devel mailing list