All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jens Axboe <axboe@fb.com>, Christoph Hellwig <hch@lst.de>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	linux-mmc@vger.kernel.org, linux-block@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] block: Fix secure erase
Date: Mon, 15 Aug 2016 20:13:28 +0200	[thread overview]
Message-ID: <20160815181328.GA9696@lst.de> (raw)
In-Reply-To: <1471270071-28921-1-git-send-email-adrian.hunter@intel.com>

> --- a/block/elevator.c
> +++ b/block/elevator.c
> @@ -366,7 +366,10 @@ void elv_dispatch_sort(struct request_queue *q, struct request *rq)
>  	list_for_each_prev(entry, &q->queue_head) {
>  		struct request *pos = list_entry_rq(entry);
>  
> -		if ((req_op(rq) == REQ_OP_DISCARD) != (req_op(pos) == REQ_OP_DISCARD))
> +		if ((req_op(rq) == REQ_OP_DISCARD ||
> +		     req_op(rq) == REQ_OP_SECURE_ERASE) !=
> +		    (req_op(pos) == REQ_OP_DISCARD ||
> +		     req_op(pos) == REQ_OP_SECURE_ERASE))
>  			break;

This really should be a:

	if (req_op(rq) != req_op(pos))

I'l lleave it up to Jens if he wants that in this patch or not, otherwise
I'll send an incremental patch.

Otherwise this looks fine:

Reviewed-by: Christoph Hellwig <hch@lst.de>

  parent reply	other threads:[~2016-08-15 18:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-11  8:43 [REGRESSION] Secure discard is broken Adrian Hunter
2016-08-11 14:05 ` Christoph Hellwig
2016-08-15 14:07   ` [PATCH] block: Fix secure erase Adrian Hunter
2016-08-15 16:43     ` Shaun Tancheff
2016-08-15 18:14       ` Christoph Hellwig
2016-08-16  7:20         ` Adrian Hunter
2016-08-17  0:52           ` Christoph Hellwig
2016-08-15 18:13     ` Christoph Hellwig [this message]
2016-08-15 18:16       ` Jens Axboe
2016-08-15 18:16         ` Jens Axboe
2016-08-15 18:17         ` Christoph Hellwig
2016-08-16  7:59           ` [PATCH V2] " Adrian Hunter
2016-08-16 16:15             ` Christoph Hellwig
2016-08-19 11:52             ` Ulf Hansson
2016-08-19 15:14               ` Jens Axboe
2016-08-19 15:14                 ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160815181328.GA9696@lst.de \
    --to=hch@lst.de \
    --cc=adrian.hunter@intel.com \
    --cc=axboe@fb.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.