lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 07 Mar 2014 15:45:09 -0500
From:	Jeff Moyer <jmoyer@...hat.com>
To:	Christoph Hellwig <hch@...radead.org>
Cc:	Jens Axboe <axboe@...nel.dk>, Shaohua Li <shli@...ionio.com>,
	linux-kernel@...r.kernel.org, msnitzer@...hat.com
Subject: Re: [PATCH 1/1] block: rework flush sequencing for blk-mq

Christoph Hellwig <hch@...radead.org> writes:

> Witch to using a preallocated flush_rq for blk-mq similar to what's done
> with the old request path.  This allows us to set up the request properly
> with a tag from the actually allowed range and ->rq_disk as needed by
> some drivers.  To make life easier we also switch to dynamic allocation
> of ->flush_rq for the old path.
>
> This effectively reverts most of
>
>     "blk-mq: fix for flush deadlock"
>
> and
>
>     "blk-mq: Don't reserve a tag for flush request"
>
> Signed-off-by: Christoph Hellwig <hch@....de>

[snip]

> -static void blk_mq_flush_data_insert(struct request *rq)
> +static bool blk_flush_queue_rq(struct request *rq)
>  {
> -	INIT_WORK(&rq->mq_flush_data, mq_flush_data_run);
> -	kblockd_schedule_work(rq->q, &rq->mq_flush_data);
> +	if (rq->q->mq_ops) {
> +		INIT_WORK(&rq->mq_flush_work, mq_flush_run);
> +		kblockd_schedule_work(rq->q, &rq->mq_flush_work);
> +		return false;
> +	} else {
> +		list_add_tail(&rq->queuelist, &rq->q->queue_head);
> +		return true;
> +	}
>  }
>  
>  /**
> @@ -187,12 +193,7 @@ static bool blk_flush_complete_seq(struct request *rq, unsigned int seq,
>  
>  	case REQ_FSEQ_DATA:
>  		list_move_tail(&rq->flush.list, &q->flush_data_in_flight);
> -		if (q->mq_ops)
> -			blk_mq_flush_data_insert(rq);
> -		else {
> -			list_add(&rq->queuelist, &q->queue_head);
> -			queued = true;
> -		}
> +		queued = blk_flush_queue_rq(rq);
>  		break;

Hi, Christoph,

Did you mean to switch from list_add to list_add_tail?  That seems like
a change that warrants mention.

Cheers,
Jeff
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ