Re: [PATCH] block: Fix secure erase

2016-08-16 Thread Christoph Hellwig
On Tue, Aug 16, 2016 at 10:20:25AM +0300, Adrian Hunter wrote: > On 15/08/16 21:14, Christoph Hellwig wrote: > > On Mon, Aug 15, 2016 at 11:43:12AM -0500, Shaun Tancheff wrote: > >> Hmm ... Since REQ_SECURE implied REQ_DISCARD doesn't this > >> mean that we should include REQ_OP_SECURE_ERASE

Re: [PATCH] block: Fix secure erase

2016-08-16 Thread Christoph Hellwig
On Tue, Aug 16, 2016 at 10:20:25AM +0300, Adrian Hunter wrote: > On 15/08/16 21:14, Christoph Hellwig wrote: > > On Mon, Aug 15, 2016 at 11:43:12AM -0500, Shaun Tancheff wrote: > >> Hmm ... Since REQ_SECURE implied REQ_DISCARD doesn't this > >> mean that we should include REQ_OP_SECURE_ERASE

Re: [PATCH] block: Fix secure erase

2016-08-16 Thread Adrian Hunter
On 15/08/16 21:14, Christoph Hellwig wrote: > On Mon, Aug 15, 2016 at 11:43:12AM -0500, Shaun Tancheff wrote: >> Hmm ... Since REQ_SECURE implied REQ_DISCARD doesn't this >> mean that we should include REQ_OP_SECURE_ERASE checking >> wherever REQ_OP_DISCARD is being checked now in

Re: [PATCH] block: Fix secure erase

2016-08-16 Thread Adrian Hunter
On 15/08/16 21:14, Christoph Hellwig wrote: > On Mon, Aug 15, 2016 at 11:43:12AM -0500, Shaun Tancheff wrote: >> Hmm ... Since REQ_SECURE implied REQ_DISCARD doesn't this >> mean that we should include REQ_OP_SECURE_ERASE checking >> wherever REQ_OP_DISCARD is being checked now in

Re: [PATCH] block: Fix secure erase

2016-08-15 Thread Christoph Hellwig
On Mon, Aug 15, 2016 at 12:16:30PM -0600, Jens Axboe wrote: >> 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. > > Let's get a v2 with that fixed up, it makes a big

Re: [PATCH] block: Fix secure erase

2016-08-15 Thread Christoph Hellwig
On Mon, Aug 15, 2016 at 12:16:30PM -0600, Jens Axboe wrote: >> 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. > > Let's get a v2 with that fixed up, it makes a big

Re: [PATCH] block: Fix secure erase

2016-08-15 Thread Jens Axboe
On 08/15/2016 12:13 PM, Christoph Hellwig wrote: --- 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, >queue_head) { struct request *pos = list_entry_rq(entry); -

Re: [PATCH] block: Fix secure erase

2016-08-15 Thread Jens Axboe
On 08/15/2016 12:13 PM, Christoph Hellwig wrote: --- 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, >queue_head) { struct request *pos = list_entry_rq(entry); -

Re: [PATCH] block: Fix secure erase

2016-08-15 Thread Christoph Hellwig
On Mon, Aug 15, 2016 at 11:43:12AM -0500, Shaun Tancheff wrote: > Hmm ... Since REQ_SECURE implied REQ_DISCARD doesn't this > mean that we should include REQ_OP_SECURE_ERASE checking > wherever REQ_OP_DISCARD is being checked now in drivers/scsi/sd.c ? > > (It's only in 3 spots so it's a quickie

Re: [PATCH] block: Fix secure erase

2016-08-15 Thread Christoph Hellwig
On Mon, Aug 15, 2016 at 11:43:12AM -0500, Shaun Tancheff wrote: > Hmm ... Since REQ_SECURE implied REQ_DISCARD doesn't this > mean that we should include REQ_OP_SECURE_ERASE checking > wherever REQ_OP_DISCARD is being checked now in drivers/scsi/sd.c ? > > (It's only in 3 spots so it's a quickie

Re: [PATCH] block: Fix secure erase

2016-08-15 Thread Christoph Hellwig
> --- 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, >queue_head) { > struct request *pos = list_entry_rq(entry); > > - if ((req_op(rq) ==

Re: [PATCH] block: Fix secure erase

2016-08-15 Thread Christoph Hellwig
> --- 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, >queue_head) { > struct request *pos = list_entry_rq(entry); > > - if ((req_op(rq) ==

Re: [PATCH] block: Fix secure erase

2016-08-15 Thread Shaun Tancheff
On Mon, Aug 15, 2016 at 9:07 AM, Adrian Hunter wrote: > Commit 288dab8a35a0 ("block: add a separate operation type for secure > erase") split REQ_OP_SECURE_ERASE from REQ_OP_DISCARD without considering > all the places REQ_OP_DISCARD was being used to mean either. Fix

Re: [PATCH] block: Fix secure erase

2016-08-15 Thread Shaun Tancheff
On Mon, Aug 15, 2016 at 9:07 AM, Adrian Hunter wrote: > Commit 288dab8a35a0 ("block: add a separate operation type for secure > erase") split REQ_OP_SECURE_ERASE from REQ_OP_DISCARD without considering > all the places REQ_OP_DISCARD was being used to mean either. Fix those. > > Signed-off-by:

[PATCH] block: Fix secure erase

2016-08-15 Thread Adrian Hunter
Commit 288dab8a35a0 ("block: add a separate operation type for secure erase") split REQ_OP_SECURE_ERASE from REQ_OP_DISCARD without considering all the places REQ_OP_DISCARD was being used to mean either. Fix those. Signed-off-by: Adrian Hunter Fixes: 288dab8a35a0

[PATCH] block: Fix secure erase

2016-08-15 Thread Adrian Hunter
Commit 288dab8a35a0 ("block: add a separate operation type for secure erase") split REQ_OP_SECURE_ERASE from REQ_OP_DISCARD without considering all the places REQ_OP_DISCARD was being used to mean either. Fix those. Signed-off-by: Adrian Hunter Fixes: 288dab8a35a0 ("block: add a separate