Re: [PATCH] blk-flush: fix inverted scheduler check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 11, 2019 at 04:11:40PM -0700, Jens Axboe wrote:
> 
> A previous commit inadvertently inverted a check for whether or not we
> have an IO scheduler attached. This is reported to cause a hang with
> particular LVM setups.
> 
> Fixup the condition.
> 
> Reported-by: Dragan Milenkovic <dragan.milenkovic@xxxxxxxxxxxx>
> Fixes: 344e9ffcbd18 ("block: add queue_is_mq() helper")
> Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
> 
> ---
> 
> diff --git a/block/blk-flush.c b/block/blk-flush.c
> index 6e0f2d97fc6d..b56f4e5e6359 100644
> --- a/block/blk-flush.c
> +++ b/block/blk-flush.c
> @@ -273,7 +273,7 @@ static void blk_kick_flush(struct request_queue *q, struct blk_flush_queue *fq,
>  	 * assigned to empty flushes, and we deadlock if we are expecting
>  	 * other requests to make progress. Don't defer for that case.
>  	 */
> -	if (!list_empty(&fq->flush_data_in_flight) && q->elevator &&
> +	if (!list_empty(&fq->flush_data_in_flight) && !q->elevator &&
>  	    time_before(jiffies,
>  			fq->flush_pending_since + FLUSH_PENDING_TIMEOUT))
>  		return;

Reviewed-by: Ming Lei <ming.lei@xxxxxxxxxx>

Thanks,
Ming



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux