lkml.org 
[lkml]   [2016]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] block: Fix secure erase
> --- 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>

\
 
 \ /
  Last update: 2016-09-17 09:57    [W:0.551 / U:1.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site