Re: RFC: always use REQ_OP_WRITE_ZEROES for zeroing offload

2017-03-30 Thread Mike Snitzer
On Thu, Mar 30 2017 at 11:22am -0400, Martin K. Petersen wrote: > Mike Snitzer writes: > > > Would be very useful, particularly for testing, if > > drivers/scsi/scsi_debug.c were updated to support WRITE ZEROES. > > There is no WRITE ZEROES in SCSI. You should be able to get the right > behavi

Re: RFC: always use REQ_OP_WRITE_ZEROES for zeroing offload

2017-03-30 Thread Martin K. Petersen
Mike Snitzer writes: > Would be very useful, particularly for testing, if > drivers/scsi/scsi_debug.c were updated to support WRITE ZEROES. There is no WRITE ZEROES in SCSI. You should be able to get the right behavior with lbpws=1 lbprz=1. -- Martin K. Petersen Oracle Linux Engineering

Re: RFC: always use REQ_OP_WRITE_ZEROES for zeroing offload

2017-03-30 Thread Mike Snitzer
Would be very useful, particularly for testing, if drivers/scsi/scsi_debug.c were updated to support WRITE ZEROES.

Re: RFC: always use REQ_OP_WRITE_ZEROES for zeroing offload

2017-03-30 Thread Christoph Hellwig
Lars, can you please take a look a patch 22 and check if it's safe? That's the big thing I want to know before posting the next version of the series. If it's not safe I'd like to drop that patch.

Re: RFC: always use REQ_OP_WRITE_ZEROES for zeroing offload

2017-03-29 Thread Paolo Bonzini
On 23/03/2017 23:53, Lars Ellenberg wrote: > Thin does not claim to zero data on discard. which is ok, and correct, > because it only punches holes on full chunks (or whatever you call > them), and leaves the rest in the mapping tree as is. > > And that behaviour would prevent DRBD from exposin

Re: RFC: always use REQ_OP_WRITE_ZEROES for zeroing offload

2017-03-27 Thread Christoph Hellwig
On Mon, Mar 27, 2017 at 10:03:07AM -0400, Mike Snitzer wrote: > By "you" I assume you're referring to Lars? Yes. > Lars' approach for discard, > when drbd is layered on dm-thinp, feels over-engineered. Not his fault, > the way discard and zeroing got conflated certainly lends itself to > these u

Re: RFC: always use REQ_OP_WRITE_ZEROES for zeroing offload

2017-03-27 Thread Mike Snitzer
On Mon, Mar 27 2017 at 5:10am -0400, Christoph Hellwig wrote: > It sounds like you don't want to support traditional discard at all, > but only WRITE ZEROES. So in many ways this series is the right way > forward. It would be nice if we could do a full blown > REQ_OP_WRITE_ZEROES for dm_think

Re: RFC: always use REQ_OP_WRITE_ZEROES for zeroing offload

2017-03-27 Thread Christoph Hellwig
It sounds like you don't want to support traditional discard at all, but only WRITE ZEROES. So in many ways this series is the right way forward. It would be nice if we could do a full blown REQ_OP_WRITE_ZEROES for dm_think that zeroes out partial blocks, similar to what hardware that implements

Re: RFC: always use REQ_OP_WRITE_ZEROES for zeroing offload

2017-03-23 Thread Lars Ellenberg
On Thu, Mar 23, 2017 at 01:02:22PM -0400, Mike Snitzer wrote: > On Thu, Mar 23 2017 at 11:54am -0400, > Lars Ellenberg wrote: > > > On Thu, Mar 23, 2017 at 10:33:18AM -0400, Christoph Hellwig wrote: > > > This series makes REQ_OP_WRITE_ZEROES the only zeroing offload > > > supported by the block

Re: RFC: always use REQ_OP_WRITE_ZEROES for zeroing offload

2017-03-23 Thread Mike Snitzer
On Thu, Mar 23 2017 at 11:54am -0400, Lars Ellenberg wrote: > On Thu, Mar 23, 2017 at 10:33:18AM -0400, Christoph Hellwig wrote: > > This series makes REQ_OP_WRITE_ZEROES the only zeroing offload > > supported by the block layer, and switches existing implementations > > of REQ_OP_DISCARD that co

Re: RFC: always use REQ_OP_WRITE_ZEROES for zeroing offload

2017-03-23 Thread Lars Ellenberg
On Thu, Mar 23, 2017 at 10:33:18AM -0400, Christoph Hellwig wrote: > This series makes REQ_OP_WRITE_ZEROES the only zeroing offload > supported by the block layer, and switches existing implementations > of REQ_OP_DISCARD that correctly set discard_zeroes_data to it, > removes incorrect discard_zer