Re: [PATCH v2 2/4] On Discard either do Reset WP or Write Same

2016-08-23 Thread Shaun Tancheff
On Mon, Aug 22, 2016 at 8:25 PM, Damien Le Moal wrote: > > Shaun, > > On 8/23/16 09:22, Shaun Tancheff wrote: >> On Mon, Aug 22, 2016 at 6:57 PM, Damien Le Moal >> wrote: >> Also you may note that in my patch to get Host Aware working >> with the zone cache I do not include the runt zone in the

Re: [PATCH v2 2/4] On Discard either do Reset WP or Write Same

2016-08-22 Thread Damien Le Moal
Shaun, On 8/23/16 09:22, Shaun Tancheff wrote: > On Mon, Aug 22, 2016 at 6:57 PM, Damien Le Moal > wrote: >> >> Shaun, >> >> On 8/22/16 13:31, Shaun Tancheff wrote: >> [...] >>> -int sd_zbc_setup_discard(struct scsi_disk *sdkp, struct request *rq, >>> - sector_t sector, uns

Re: [PATCH v2 2/4] On Discard either do Reset WP or Write Same

2016-08-22 Thread Shaun Tancheff
On Mon, Aug 22, 2016 at 6:57 PM, Damien Le Moal wrote: > > Shaun, > > On 8/22/16 13:31, Shaun Tancheff wrote: > [...] >> -int sd_zbc_setup_discard(struct scsi_disk *sdkp, struct request *rq, >> - sector_t sector, unsigned int num_sectors) >> +int sd_zbc_setup_discard(struct sc

Re: [PATCH v2 2/4] On Discard either do Reset WP or Write Same

2016-08-22 Thread Damien Le Moal
Shaun, On 8/22/16 13:31, Shaun Tancheff wrote: [...] > -int sd_zbc_setup_discard(struct scsi_disk *sdkp, struct request *rq, > - sector_t sector, unsigned int num_sectors) > +int sd_zbc_setup_discard(struct scsi_cmnd *cmd) > { > - struct blk_zone *zone; > + struct re

[PATCH v2 2/4] On Discard either do Reset WP or Write Same

2016-08-21 Thread Shaun Tancheff
Based on the type of zone either perform a Reset WP for Sequential zones or a Write Same for Conventional zones. Also detect and handle the runt zone, if there is one. One additional check is added to error on discard requests that do not include all the active data in zone. By way of example whe