Re: [PATCH] sd: fix uninitialized variable access in error handling

2016-10-21 Thread Shaun Tancheff
{ > + zone_blocks = 0; > goto out; > + } > > same = buf[4] & 0x0f; > if (same > 0) { > -- > 2.9.0 > Reviewed-by: Shaun Tancheff -- Shaun Tancheff -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v8 6/7] sd: Implement support for ZBC devices

2016-10-18 Thread Shaun Tancheff
On Tue, Oct 18, 2016 at 11:58 AM, Jeff Moyer wrote: > Damien Le Moal writes: > >> + if (!is_power_of_2(zone_blocks)) { >> + if (sdkp->first_scan) >> + sd_printk(KERN_NOTICE, sdkp, >> + "Devices with non power of 2 zone " >> +

Re: [PATCH v5 2/4] fusion: remove iopriority handling

2016-10-13 Thread Shaun Tancheff
On Thu, Oct 13, 2016 at 6:00 PM, Adam Manzanares wrote: > The request priority is now by default coming from the ioc. It was not > clear what this code was trying to do based upon the iopriority class or > data. The driver should check that a device supports priorities and use > them according to

[PATCH v6 6/7] sd: Implement support for ZBC devices

2016-09-30 Thread Shaun Tancheff
Shaun Tancheff * Removed confusing use of 512B sector units in functions interface] Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Shaun Tancheff Tested-by: Shaun Tancheff --- Changes from v5: * Rebased on Jens' for-4.9/block branch (v5 is bas

[PATCH v6 5/7] block: Implement support for zoned block devices

2016-09-30 Thread Shaun Tancheff
zones of the device. Signed-off-by: Hannes Reinecke [Damien: * Removed the zone cache * Implement report zones operation based on earlier proposal by Shaun Tancheff ] Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by

[PATCH v6 7/7] blk-zoned: implement ioctls

2016-09-30 Thread Shaun Tancheff
zone information result is passed as an array of struct blk_zone identical to the structure used internally for processing the REQ_OP_ZONE_REPORT operation. The BLKRESETZONE ioctl maps to a single call of the blkdev_reset_zones function. Signed-off-by: Shaun Tancheff Signed-off-by: Damien Le

[PATCH v6 2/7] blk-sysfs: Add 'chunk_sectors' to sysfs attributes

2016-09-30 Thread Shaun Tancheff
: Martin K. Petersen Reviewed-by: Shaun Tancheff Tested-by: Shaun Tancheff --- Documentation/ABI/testing/sysfs-block | 13 + block/blk-sysfs.c | 11 +++ 2 files changed, 24 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-block b/Documentation/A

[PATCH v6 3/7] block: update chunk_sectors in blk_stack_limits()

2016-09-30 Thread Shaun Tancheff
From: Hannes Reinecke Signed-off-by: Hannes Reinecke Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Shaun Tancheff Tested-by: Shaun Tancheff --- block/blk-settings.c | 4 1 file changed, 4 insertions(+) diff --git a/block

[PATCH v6 4/7] block: Define zoned block device operations

2016-09-30 Thread Shaun Tancheff
From: Shaun Tancheff Define REQ_OP_ZONE_REPORT and REQ_OP_ZONE_RESET for handling zones of host-managed and host-aware zoned block devices. With with these two new operations, the total number of operations defined reaches 8 and still fits with the 3 bits definition of REQ_OP_BITS. Signed-off

[PATCH v6 1/7] block: Add 'zoned' queue limit

2016-09-30 Thread Shaun Tancheff
Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Shaun Tancheff Tested-by: Shaun Tancheff --- Documentation/ABI/testing/sysfs-block | 16 block/blk-settings.c | 1 + block/blk-sysfs.c | 18

[PATCH v6 0/7] ZBC / Zoned block device support

2016-09-30 Thread Shaun Tancheff
This series introduces support for zoned block devices. It integrates earlier submissions by Hannes Reinecke, Damien Le Moal and Shaun Tancheff. Compared to the previous series version, the code was significantly simplified by limiting support to zoned devices satisfying the following conditions

Re: [PATCH v5 0/7] ZBC / Zoned block device support

2016-09-30 Thread Shaun Tancheff
Hello Bart, I rebased this series on Jens for-4.9/block and will repost. Thanks! --Shaun On Fri, Sep 30, 2016 at 12:18 PM, Bart Van Assche wrote: > On 09/30/2016 09:47 AM, Shaun Tancheff wrote: >> On Fri, Sep 30, 2016 at 11:10 AM, Bart Van Assche >> wrote: >>> On 0

Re: [PATCH v5 0/7] ZBC / Zoned block device support

2016-09-30 Thread Shaun Tancheff
lNlVTT7Ugl8V50qIHLe856QW0qfG3WVYGOrWzA&m=VY30muznazMHPib_ks7gWROq97LIrq37TtKOXyYliB0&s=s2DsgBOJACiLmv56Aw-uehcdexEfBe73hSnqZDfB0xY&e= -- Shaun Tancheff -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH v4 6/7] sd: Implement support for ZBC devices

2016-09-28 Thread Shaun Tancheff
* Modified sd_zbc_read_zones to include checks that the >device satisfies the kernel constraints > * Implemeted REPORT ZONES setup and post-processing based >on code from Shaun Tancheff ] > Signed-off-by: Damien Le Moal > --- > drivers

Re: [PATCH v4 5/7] block: Implement support for zoned block devices

2016-09-28 Thread Shaun Tancheff
ev_zone_size are also provided for, as the name suggest, > obtaining the zone size (in 512B sectors) of the zones of the device. > > Signed-off-by: Hannes Reinecke > > [Damien: * Removed the zone cache > * Implement report zones operation based on earlier proposal >

Re: [PATCH v4 3/7] block: update chunk_sectors in blk_stack_limits()

2016-09-28 Thread Shaun Tancheff
t; > + if (b->chunk_sectors) > + t->chunk_sectors = min_not_zero(t->chunk_sectors, > + b->chunk_sectors); > + > return ret; > } > EXPORT_SYMBOL(blk_stack_limits); > -- > 2.7.4 Reviewed-by: Shau

Re: [PATCH v4 2/7] blk-sysfs: Add 'chunk_sectors' to sysfs attributes

2016-09-28 Thread Shaun Tancheff
@@ -555,6 +565,7 @@ static struct attribute *default_attrs[] = { > &queue_hw_sector_size_entry.attr, > &queue_logical_block_size_entry.attr, > &queue_physical_block_size_entry.attr, > + &queue_chunk_sectors_entry.attr, > &queue_io_min_en

Re: [PATCH v4 1/7] block: Add 'zoned' queue limit

2016-09-28 Thread Shaun Tancheff
-1354,6 +1381,26 @@ static inline unsigned int bdev_write_same(struct > block_device *bdev) > return 0; > } > > +static inline enum blk_zoned_model bdev_zoned_model(struct block_device > *bdev) > +{ > + struct request_queue *q = bdev_get_queue(bdev); >

Re: [PATCH v2 3/7] block: update chunk_sectors in blk_stack_limits()

2016-09-27 Thread Shaun Tancheff
t; > + if (b->chunk_sectors) > + t->chunk_sectors = min_not_zero(t->chunk_sectors, > + b->chunk_sectors); > + > return ret; > } > EXPORT_SYMBOL(blk_stack_limits); > -- > 2.7.4 Reviewed-by: Sha

Re: [PATCH v2 2/7] blk-sysfs: Add 'chunk_sectors' to sysfs attributes

2016-09-27 Thread Shaun Tancheff
ntry.attr, > &queue_physical_block_size_entry.attr, > + &queue_chunk_sectors_entry.attr, > &queue_io_min_entry.attr, > &queue_io_opt_entry.attr, > &queue_discard_granularity_entry.attr, > -- > 2.7.4 Reviewed-by: Shaun Tancheff Tested-by: Shaun

Re: [PATCH v2 1/7] block: Add 'zoned' queue limit

2016-09-27 Thread Shaun Tancheff
v_write_same(struct > block_device *bdev) > return 0; > } > > +static inline enum blk_zoned_model bdev_zoned_model(struct block_device > *bdev) > +{ > + struct request_queue *q = bdev_get_queue(bdev); > + > + if (q) > + return blk_queue_

Re: [PATCH v2 6/7] sd: Implement support for ZBC devices

2016-09-27 Thread Shaun Tancheff
off-by: Hannes Reinecke > > [Damien: * Removed zone cache support > * Removed mapping of discard to reset write pointer command > * Modified sd_zbc_read_zones to include checks that the >device satisfies the kernel constraints > * Implemeted REPORT ZONES set

[PATCH v3 7/7] blk-zoned: implement ioctls

2016-09-27 Thread Shaun Tancheff
zone information result is passed as an array of struct blk_zone identical to the structure used internally for processing the REQ_OP_ZONE_REPORT operation. The BLKRESETZONE ioctl maps to a single call of the blkdev_reset_zones function. Signed-off-by: Shaun Tancheff Signed-off-by: Damien Le

[PATCH v3 5/7] block: Implement support for zoned block devices

2016-09-27 Thread Shaun Tancheff
zones of the device. Signed-off-by: Hannes Reinecke [Damien: * Removed the zone cache * Implement report zones operation based on earlier proposal by Shaun Tancheff ] Signed-off-by: Damien Le Moal --- Changes from v2: - Added EXPORT_SYMBOL_GPL() per Damien - Added uapi

Re: [PATCH v2 7/7] blk-zoned: implement ioctls

2016-09-26 Thread Shaun Tancheff
> If you are not the intended recipient, any disclosure, copying, distribution > or any action taken or omitted to be taken in reliance on it, is prohibited. > If you have received this e-mail in error, please notify the sender > immediately and delete the e-mail in its entirety from you

Re: [PATCH v2 7/7] blk-zoned: implement ioctls

2016-09-26 Thread Shaun Tancheff
SEQWRITE_REQ, >> - BLK_ZONE_TYPE_SEQWRITE_PREF, >> -}; > > Please don't move this code around after it was added just two > patches earlier. I'd say just split adding the new blkzoned.h > uapi header into a patch of it's own and add that before the > c

Re: UFS API in the kernel

2016-09-26 Thread Shaun Tancheff
fG3WVYGOrWzA&m=vJFB6pCywWtdvkgHz9Vc0jQz0xzeyZlr-7eCWYu88nM&s=yiQLPFpqmMrbqLZz1Jb3aNqOje2dRMLJHEzUDobwcXc&e= -- Shaun Tancheff -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 9/9] blk-zoned: Add ioctl interface for zone operations

2016-09-19 Thread Shaun Tancheff
On Mon, Sep 19, 2016 at 4:27 PM, Damien Le Moal wrote: > From: Shaun Tancheff > > Adds the new BLKUPDATEZONES, BLKREPORTZONE, BLKRESETZONE, > BLKOPENZONE, BLKCLOSEZONE and BLKFINISHZONE ioctls. > > BLKREPORTZONE implementation uses the device queue zone RB-tree by > default

Re: [PATCH 8/9] sd: Implement support for ZBC devices

2016-09-19 Thread Shaun Tancheff
On Mon, Sep 19, 2016 at 4:27 PM, Damien Le Moal wrote: > From: Hannes Reinecke > > Implement ZBC support functions to setup zoned disks and fill the > block device zone information tree during the device scan. The > zone information tree is also always updated on disk revalidation. > This adds su

Re: patch "libata: Add support for SCT Write Same" breaks system

2016-09-09 Thread Shaun Tancheff
On Fri, Sep 9, 2016 at 10:36 AM, Tejun Heo wrote: > Hello, Shaun. > > On Fri, Sep 09, 2016 at 10:26:44AM -0500, Shaun Tancheff wrote: >> I'm looking into it now. Let me see if I can reproduce this on any of my >> hardware. >> >> If not there are a couple of

[PATCH] Some drives failing on SCT Write Same

2016-09-09 Thread Shaun Tancheff
Restrict support SCT Write Same to devices which also support ZAC where support is required. Reported-by: Mike Krinkin Signed-off-by: Shaun Tancheff --- drivers/ata/libata-scsi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/ata/libata-scsi.c b/drivers/ata

Re: patch "libata: Add support for SCT Write Same" breaks system

2016-09-09 Thread Shaun Tancheff
On Fri, Sep 9, 2016 at 10:36 AM, Tejun Heo wrote: > Hello, Shaun. > > On Fri, Sep 09, 2016 at 10:26:44AM -0500, Shaun Tancheff wrote: >> I'm looking into it now. Let me see if I can reproduce this on any of my >> hardware. >> >> If not there are a couple of

Re: [PATCH v8 1/2 RESEND] Add bio/request flags to issue ZBC/ZAC commands

2016-08-25 Thread Shaun Tancheff
On Thu, Aug 25, 2016 at 9:31 PM, Damien Le Moal wrote: > > Shaun, > > On 8/25/16 05:24, Shaun Tancheff wrote: >> >> (RESENDING to include f2fs, fs-devel and dm-devel) >> >> Add op flags to access to zone information as well as open, close >> and reset zon

Re: [PATCH] ata: do not hard code limit in ata_set_lba_range_entries()

2016-08-25 Thread Shaun Tancheff
Tom, In my opinion this patch you submitted is simply making the code less safe against a buffer overflow without a sufficiently good reason. In future please comment on other patches as replies to those patches. Mixing them together is just confusing. --Shaun -- To unsubscribe from this list: s

[PATCH v8 2/2 RESEND] Add ioctl to issue ZBC/ZAC commands via block layer

2016-08-24 Thread Shaun Tancheff
(RESENDING to include f2fs, fs-devel and dm-devel) Add support for ZBC ioctl's BLKREPORT - Issue Report Zones to device. BLKZONEACTION - Issue a Zone Action (Close, Finish, Open, or Reset) Signed-off-by: Shaun Tancheff --- v8: - Changed ioctl for zone actions to a single ioctl

[PATCH v8 1/2 RESEND] Add bio/request flags to issue ZBC/ZAC commands

2016-08-24 Thread Shaun Tancheff
igned-off-by: Shaun Tancheff --- v8: - Added Finish Zone op - Fixed report zones copy to user to work when HARDENED_USERCOPY is enabled v6: - Added GFP_DMA to gfp mask. v5: - In sd_setup_zone_action_cmnd, remove unused vars and fix switch indent - In blk-lib fix documentation v4: - Rebase on

[PATCH v8 0/2 RESEND] Block layer support ZAC/ZBC commands

2016-08-24 Thread Shaun Tancheff
- Changed bi_rw to op_flags clarify sepeartion of bio op from flags. - Fixed memory leak in blkdev_issue_zone_report failing to put_bio(). - Documented opt in blkdev_issue_zone_report. - Moved include/uapi/linux/fs.h changes to patch 3 - Fixed commit message for first patch in series. Shaun Tanch

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 cac

Re: [PATCH] ata: do not hard code limit in ata_set_lba_range_entries()

2016-08-23 Thread Shaun Tancheff
0, and make the SATL > response with invalid CDB field if we catch that. No that is not quite right you need to check if you are overflowing either RBUF or sdp->sector_size. > Though IMHO this is really NOT a reason that is strong enough to > prevent this patch from entering the rep

Re: [PATCH] ata: do not hard code limit in ata_set_lba_range_entries()

2016-08-23 Thread Shaun Tancheff
On Tue, Aug 23, 2016 at 3:37 AM, Tom Yan wrote: > On 23 August 2016 at 07:30, Shaun Tancheff wrote: > If we really want/need to avoid hitting some real buffer limit (e.g. > maximum length of scatter/gather list?), then we should in some way > check n_block against that. If it is

Re: [PATCH] ata: do not hard code limit in ata_set_lba_range_entries()

2016-08-23 Thread Shaun Tancheff
On Mon, Aug 22, 2016 at 3:53 PM, Tom Yan wrote: > On 22 August 2016 at 20:32, Shaun Tancheff wrote: >> On Mon, Aug 22, 2016 at 3:07 PM, Tom Yan wrote: >>> I don't see how that's possible. count / n_block will always be >>> smaller than 65535 * ATA_MAX_TR

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) >>

Re: [PATCH] ata: do not hard code limit in ata_set_lba_range_entries()

2016-08-22 Thread Shaun Tancheff
On Mon, Aug 22, 2016 at 3:07 PM, Tom Yan wrote: > I don't see how that's possible. count / n_block will always be > smaller than 65535 * ATA_MAX_TRIM_RNUM(64) = 4194240. Not to mention > that isn't even a "buffer limit" anyway. By SG_IO do you mean like > SCSI Write Same commands that issued with

Re: [PATCH] ata: do not hard code limit in ata_set_lba_range_entries()

2016-08-22 Thread Shaun Tancheff
On Mon, Aug 22, 2016 at 1:55 PM, wrote: > From: Tom Yan > > In commit 5c79097a28c2 ("libata-scsi: reject WRITE SAME (16) with > n_block that exceeds limit"), it is made sure that > ata_set_lba_range_entries() will never be called with a request > size (n_block) that is larger than the number of

Re: [PATCH 2/2] Migrate zone cache from RB-Tree to arrays of descriptors

2016-08-22 Thread Shaun Tancheff
On Mon, Aug 22, 2016 at 2:11 AM, Hannes Reinecke wrote: > On 08/22/2016 06:34 AM, Shaun Tancheff wrote: >> Currently the RB-Tree zone cache is fast and flexible. It does >> use a rather largish amount of ram. This model reduces the ram >> required from 120 bytes per zone to 1

Re: [PATCH 2/2] Migrate zone cache from RB-Tree to arrays of descriptors

2016-08-21 Thread Shaun Tancheff
On Sun, Aug 21, 2016 at 11:34 PM, Shaun Tancheff wrote: > Currently the RB-Tree zone cache is fast and flexible. It does > use a rather largish amount of ram. This model reduces the ram > required from 120 bytes per zone to 16 bytes per zone with a > moderate transformation of the blk

[PATCH 2/2] Migrate zone cache from RB-Tree to arrays of descriptors

2016-08-21 Thread Shaun Tancheff
. Signed-off-by: Shaun Tancheff --- block/blk-core.c |2 +- block/blk-sysfs.c | 31 +- block/blk-zoned.c | 103 +++-- drivers/scsi/sd.c |5 +- drivers/scsi/sd.h |4 +- drivers/scsi/sd_zbc.c | 1025 +++- include

[PATCH 1/2] Move ZBC core setup to sd_zbc

2016-08-21 Thread Shaun Tancheff
Move the remaining ZBC specific code to sd_zbc.c Signed-off-by: Shaun Tancheff --- drivers/scsi/sd.c | 65 +-- drivers/scsi/sd.h | 20 ++ drivers/scsi/sd_zbc.c | 170 +++--- 3 files changed, 126 insertions(+), 129

[PATCH 0/2] Change zone cache format to use less memory

2016-08-21 Thread Shaun Tancheff
. Shaun Tancheff (2): Move ZBC core setup to sd_zbc Migrate zone cache from RB-Tree to arrays of descriptors block/blk-core.c |2 +- block/blk-sysfs.c | 31 +- block/blk-zoned.c | 103 +++-- drivers/scsi/sd.c | 66 +-- drivers/scsi/sd.h | 20 +- drivers

[PATCH v2 3/4] Merge ZBC constants

2016-08-21 Thread Shaun Tancheff
Dedupe ZBC/ZAC constants used for reporting options, same code, zone condition and zone type. These are all useful to programs consuming zone information from user space as well so include them in a uapi header. Signed-off-by: Shaun Tancheff --- block/blk-lib.c | 4

[PATCH v2 4/4] Integrate ZBC command requests with zone cache.

2016-08-21 Thread Shaun Tancheff
Finish zones having no other analog are sent directly to the device. On successful completion each zone action will update the zone cache as appropriate. Signed-off-by: Shaun Tancheff --- block/blk-lib.c | 16 -- drivers/scsi/sd.c | 42 +++- drivers/scsi/sd.h | 22 +- drivers

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

2016-08-21 Thread Shaun Tancheff
when the WP indicates that 2000 blocks in the zone are in use and the discard indicated 1000 blocks can be unmapped the discard should fail as a Reset WP will unmap all the 2000 blocks in the zone. Signed-off-by: Shaun Tancheff --- drivers/scsi/sd.c | 45 ++--- drivers/scsi/sd.h

[PATCH v2 0/4] Integrate bio/request ZBC ops with zone cache

2016-08-21 Thread Shaun Tancheff
heff/linux/tree/v4.8-rc2%2Bbiof.v9 g...@github.com:stancheff/linux.git v4.8-rc2+biof.v9 v2: - Fully integrated bio <-> zone cache [<-> device] - Added discard -> write same for conventional zones. - Merged disparate constants into a canonical set. Shaun Tancheff (4): E

[PATCH v2 1/4] Enable support for Seagate HostAware drives

2016-08-21 Thread Shaun Tancheff
Seagate drives report a SAME code of 0 due to having: - Zones of different types (CMR zones at the low LBA space). - Zones of different size (A terminating 'runt' zone in the high lba space). Support loading the zone topology into the zone cache. Signed-off-by: Shau

[PATCH v8 2/2] Add ioctl to issue ZBC/ZAC commands via block layer

2016-08-21 Thread Shaun Tancheff
Add support for ZBC ioctl's BLKREPORT - Issue Report Zones to device. BLKZONEACTION - Issue a Zone Action (Close, Finish, Open, or Reset) Signed-off-by: Shaun Tancheff --- v8: - Changed ioctl for zone actions to a single ioctl that takes a structure including the zone,

[PATCH v8 1/2] Add bio/request flags to issue ZBC/ZAC commands

2016-08-21 Thread Shaun Tancheff
eport zones currently defaults to reporting on all zones. It expected that support for the zone option flag will piggy back on streamid support. The report option flag is useful as it can reduce the number of zones in each report, but not critical. Signed-off-by: Shaun Tancheff --- v8: - Added Finish

[PATCH v8 0/2] Block layer support ZAC/ZBC commands

2016-08-21 Thread Shaun Tancheff
op from flags. - Fixed memory leak in blkdev_issue_zone_report failing to put_bio(). - Documented opt in blkdev_issue_zone_report. - Moved include/uapi/linux/fs.h changes to patch 3 - Fixed commit message for first patch in series. Shaun Tancheff (2): Add bio/request flags to issue ZBC/ZAC co

Re: [PATCH v6 0/2] Block layer support ZAC/ZBC commands

2016-08-15 Thread Shaun Tancheff
On Tue, Aug 9, 2016 at 11:38 PM, Damien Le Moal wrote: > Shaun, > > On 8/10/16 12:58, Shaun Tancheff wrote: >> >> On Tue, Aug 9, 2016 at 3:09 AM, Damien Le Moal >> wrote: >>>> >>>> On Aug 9, 2016, at 15:47, Hannes Reinecke wrote: >> >&

Re: [PATCH v6 0/2] Block layer support ZAC/ZBC commands

2016-08-15 Thread Shaun Tancheff
On Mon, Aug 15, 2016 at 11:00 PM, Damien Le Moal wrote: > > Shaun, > >> On Aug 14, 2016, at 09:09, Shaun Tancheff wrote: > […] >>>> >>> No, surely not. >>> But one of the _big_ advantages for the RB tree is blkdev_discard(). >>> Withou

Re: [PATCH v6 0/2] Block layer support ZAC/ZBC commands

2016-08-14 Thread Shaun Tancheff
On Tue, Aug 9, 2016 at 1:47 AM, Hannes Reinecke wrote: > On 08/05/2016 10:35 PM, Shaun Tancheff wrote: >> On Tue, Aug 2, 2016 at 8:29 PM, Damien Le Moal >> wrote: >>> Hannes, Shaun, >>> >>> Let me add some more comments. >>> >>>> On

Re: [RFC] libata-scsi: make sure Maximum Write Same Length is not too large

2016-08-12 Thread Shaun Tancheff
locks() wrapper. Ah, I think I am understanding now. When the sector size is 4K the minimum page sent with WRITE SAME will be 4K. If so, we also need to fix the write_same SATL code that is working under the assumption of a 512 byte sector sector as the largest guaranteed amount of data in the

Re: [PATCH 3/5] sd: Implement support for ZBC devices

2016-08-11 Thread Shaun Tancheff
== BLK_ZONE_OFFLINE) { > + /* let the drive fail the command */ > + sd_zbc_debug_ratelimit(sdkp, > + "zone %zu offline\n", > + zone->start); > + goto out; > +

[PATCH] Update WRITE_SAME timeout in sd_setup_discard_cmnd

2016-08-11 Thread Shaun Tancheff
In sd_setup_discard_cmnd() there are a some discard methods that fall back to using WRITE_SAME. It appears that those paths using WRITE_SAME should also use the SD_WRITE_SAME_TIMEOUT instead of the default SD_TIMEOUT. Signed-off-by: Shaun Tancheff --- I don't have a use case that break

Re: [RFC] libata-scsi: make sure Maximum Write Same Length is not too large

2016-08-11 Thread Shaun Tancheff
On Thu, Aug 11, 2016 at 3:26 AM, wrote: > From: Tom Yan > > Currently we advertise Maximum Write Same Length based on the > maximum number of sectors that one-block TRIM payload can cover. > The field are used to derived discard_max_bytes and > write_same_max_bytes limits in the block layer, whi

Re: [PATCH v6 0/2] Block layer support ZAC/ZBC commands

2016-08-09 Thread Shaun Tancheff
0466-98-3593 (ext. 513593) > 1 kirihara-cho, Fujisawa, > Kanagawa, 252-0888 Japan > www.hgst.com > > Western Digital Corporation (and its subsidiaries) E-mail Confidentiality > Notice & Disclaimer: > > This e-mail and any files transmitted with it may contain co

Re: [PATCH v6 0/2] Block layer support ZAC/ZBC commands

2016-08-09 Thread Shaun Tancheff
On Tue, Aug 9, 2016 at 1:47 AM, Hannes Reinecke wrote: > On 08/05/2016 10:35 PM, Shaun Tancheff wrote: >> On Tue, Aug 2, 2016 at 8:29 PM, Damien Le Moal >> wrote: >>>> On Aug 2, 2016, at 23:35, Hannes Reinecke wrote: >>>> On 08/01/2016 07:07 PM, Shaun Ta

Re: [PATCH v6 0/2] Block layer support ZAC/ZBC commands

2016-08-05 Thread Shaun Tancheff
On Tue, Aug 2, 2016 at 8:29 PM, Damien Le Moal wrote: > Hannes, Shaun, > > Let me add some more comments. > >> On Aug 2, 2016, at 23:35, Hannes Reinecke wrote: >> >> On 08/01/2016 07:07 PM, Shaun Tancheff wrote: >>> On Mon, Aug 1, 2016 at 4:41 AM, Chri

Re: [PATCH 37/45] drivers: use req op accessor

2016-08-04 Thread Shaun Tancheff
On Thu, Aug 4, 2016 at 10:46 AM, Christoph Hellwig wrote: > On Wed, Aug 03, 2016 at 07:30:29PM -0500, Shaun Tancheff wrote: >> I think the translation in loop.c is suspicious here: >> >> "if use DIO && not (a flush_flag or discard_flag)" >> shoul

Re: [PATCH 37/45] drivers: use req op accessor

2016-08-03 Thread Shaun Tancheff
d83 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -1659,8 +1659,9 @@ static int loop_queue_rq(struct blk_mq_hw_ctx *hctx, if (lo->lo_state != Lo_bound) return -EIO; - if (lo->use_dio && (!(cmd->rq->cmd_flags & REQ_FLUSH) || -

[PATCH 2/2] Enable support for Seagate HostAware drives (testing).

2016-08-03 Thread Shaun Tancheff
Seagate drives report a SAME code of 0 due to having: - Zones of different types (CMR zones at the low LBA space). - Zones of different size (A terminating 'runt' zone in the high lba space). Support loading the zone topology into the sd_zbc zone cache. Signed-off-by: Shaun Tan

[PATCH 1/2] bio/zbc support for zone cache

2016-08-03 Thread Shaun Tancheff
Signed-off-by: Shaun Tancheff Cc: Hannes Reinecke Cc: Damien Le Moal Cc: Dan Williams Cc: Sagi Grimberg Cc: Mike Christie Cc: Toshi Kani Cc: Kent Overstreet Cc: Ming Lei --- block/blk-lib.c| 3 +- block/blk-zoned.c | 190 + block

[PATCH 0/2] Bio flags use zone cache when available.

2016-08-03 Thread Shaun Tancheff
sd: Implement new RESET_WP provisioning mode sd: configure ZBC devices ... Cc: Hannes Reinecke Cc: Damien Le Moal Shaun Tancheff (2): bio/zbc support for zone cache Enable support for Seagate HostAware drives (testing). block/blk-lib.c| 3 +- block/bl

Re: [PATCH v6 0/2] Block layer support ZAC/ZBC commands

2016-08-01 Thread Shaun Tancheff
ps://urldefense.proofpoint.com/v2/url?u=http-3A__vger.kernel.org_majordomo-2Dinfo.html&d=CwIBAg&c=IGDlg0lD0b-nebmJJ0Kp8A&r=Wg5NqlNlVTT7Ugl8V50qIHLe856QW0qfG3WVYGOrWzA&m=0ZPyN4vfYZXSmuCmIm3wpExF1K28PYO9KmgcqDsfQBg&s=aiguzw5_op7woZCZ5Qi7c36b16SxiWTJXshN0dG3Xyo&e= -- Shaun T

Re: [PATCH 1/5] sd: configure ZBC devices

2016-08-01 Thread Shaun Tancheff
return; > + } It's a bit unfortunate that you abort here. The current Seagate Host Aware drives must report a same code of 0 here due to the final 'runt' zone and are therefore not supported by your RB-Tree in the following patches. > + /* Read the zone l

[PATCH v6 0/2] Block layer support ZAC/ZBC commands

2016-07-29 Thread Shaun Tancheff
d bit for ata-passthrough flag. V2: - Changed bi_rw to op_flags clarify sepeartion of bio op from flags. - Fixed memory leak in blkdev_issue_zone_report failing to put_bio(). - Documented opt in blkdev_issue_zone_report. - Moved include/uapi/linux/fs.h changes to patch 3 - Fixed commit messag

[PATCH v6 1/2] Add bio/request flags to issue ZBC/ZAC commands

2016-07-29 Thread Shaun Tancheff
er of zones in each report, but not critical. Signed-off-by: Shaun Tancheff --- v5: - In sd_setup_zone_action_cmnd, remove unused vars and fix switch indent - In blk-lib fix documentation v4: - Rebase on linux-next tag next-20160617. - Change bio flags to bio op's V3: - Rebase on Mike

[PATCH v6 2/2] Add ioctl to issue ZBC/ZAC commands via block layer

2016-07-29 Thread Shaun Tancheff
Add support for ZBC ioctl's BLKREPORT- Issue Report Zones to device. BLKOPENZONE - Issue Zone Action: Open Zone command. BLKCLOSEZONE - Issue Zone Action: Close Zone command. BLKRESETZONE - Issue Zone Action: Reset Zone command. Signed-off-by: Shaun Tancheff --- v6: -

Re: [PATCH v3] Add support for SCT Write Same

2016-06-21 Thread Shaun Tancheff
On Tue, Jun 21, 2016 at 9:43 PM, Martin K. Petersen wrote: >>>>>> "Shaun" == Shaun Tancheff writes: > > Shaun> SATA drives may support write same via SCT. This is useful for > Shaun> setting the drive contents to a specific pattern (0's). > >

[PATCH v5 1/2] Add bio/request flags for using ZBC/ZAC commands

2016-06-20 Thread Shaun Tancheff
e for that operation. Report zones currently defaults to reporting on all zones. It expected that support for the zone option flag will piggy back on streamid support. The report option flag is useful as it can reduce the number of zones in each report, but not critical. Signed-off-by: Shaun Tan

[PATCH v5 2/2] Add ioctl to issue ZBC/ZAC commands via block layer

2016-06-20 Thread Shaun Tancheff
Add New ioctl types BLKREPORT- Issue Report Zones to device. BLKOPENZONE - Issue an Zone Action: Open Zone command. BLKCLOSEZONE - Issue an Zone Action: Close Zone command. BLKRESETZONE - Issue an Zone Action: Reset Zone command. Signed-off-by: Shaun Tancheff --- v4

[PATCH v5 0/2] Block layer support ZAC/ZBC commands

2016-06-20 Thread Shaun Tancheff
to put_bio(). - Documented opt in blkdev_issue_zone_report. - Moved include/uapi/linux/fs.h changes to patch 3 - Fixed commit message for first patch in series. Shaun Tancheff (2): Add bio/request flags for using ZBC/ZAC commands Add ioctl to issue ZBC/ZAC commands via block layer M

[PATCH v3] Add support for SCT Write Same

2016-06-20 Thread Shaun Tancheff
TRIM but fail to zero blocks reliably. For example a file-system or DM target could issue a write same w/o unmap followed by an trim. Signed-off-by: Shaun Tancheff --- v3: - Demux UNMAP/TRIM from WRITE SAME v2: - Remove fugly ata hacking from sd.c --- drivers/ata/libata-scsi.c

[PATCH v3] Add support for Write Same via SCT

2016-06-20 Thread Shaun Tancheff
...@github.com:stancheff/linux.git branch: v4.7-rc2+sct-write-same.v3 v3: - Demux UNMAP/TRIM from WRITE SAME - Add offset from scatterlist to page address. v2: - Remove fugly ata hacking from sd.c Shaun Tancheff (1): Add support for SCT Write Same drivers/ata/libata-scsi.c | 80

[PATCH v4 0/2] Block layer support ZAC/ZBC commands

2016-06-19 Thread Shaun Tancheff
ry leak in blkdev_issue_zone_report failing to put_bio(). - Documented opt in blkdev_issue_zone_report. - Moved include/uapi/linux/fs.h changes to patch 3 - Fixed commit message for first patch in series. Shaun Tancheff (2): Add bio/request flags for using ZBC/ZAC commands Add ioctl to iss

[PATCH v4 2/2] Add ioctl to issue ZBC/ZAC commands via block layer

2016-06-19 Thread Shaun Tancheff
Add New ioctl types BLKREPORT- Issue Report Zones to device. BLKOPENZONE - Issue an Zone Action: Open Zone command. BLKCLOSEZONE - Issue an Zone Action: Close Zone command. BLKRESETZONE - Issue an Zone Action: Reset Zone command. Signed-off-by: Shaun Tancheff --- v4

[PATCH v4 1/2] Add bio/request flags for using ZBC/ZAC commands

2016-06-19 Thread Shaun Tancheff
e for that operation. Report zones currently defaults to reporting on all zones. It expected that support for the zone option flag will piggy back on streamid support. The report option flag is useful as it can reduce the number of zones in each report, but not critical. Signed-off-by: Shaun Tan

Re: [PATCH v3 3/3] Add ata pass-through path for ZAC commands.

2016-06-10 Thread Shaun Tancheff
On Fri, Jun 10, 2016 at 2:19 AM, Hannes Reinecke wrote: > On 06/10/2016 09:10 AM, Shaun Tancheff wrote: >> The current generation of HBA SAS adapters support connecting SATA >> drives and perform SCSI<->ATA translations in hardware. >> Unfortunately the ZBC commands a

[PATCH v3 1/3] Add bio/request flags for using ZBC/ZAC commands

2016-06-10 Thread Shaun Tancheff
can reduce the number of zones in each report, but not critical. Signed-off-by: Shaun Tancheff --- V3: - Rebase on Mike Cristie's separate bio operations - Update blkzoned_api.h to include report zones PARTIAL bit. V2: - Changed bi_rw to op_flags clarify sepeartion of bio op from flags.

[PATCH v3 1/3] Add bio/request flags for using ZBC/ZAC commands

2016-06-10 Thread Shaun Tancheff
can reduce the number of zones in each report, but not critical. Signed-off-by: Shaun Tancheff --- V3: - Rebase on Mike Cristie's separate bio operations - Update blkzoned_api.h to include report zones PARTIAL bit. V2: - Changed bi_rw to op_flags clarify sepeartion of bio op from flags.

[PATCH v3 2/3] Add ioctl to issue ZBC/ZAC commands via block layer

2016-06-10 Thread Shaun Tancheff
Add New ioctl types BLKREPORT- Issue Report Zones to device. BLKOPENZONE - Issue an Zone Action: Open Zone command. BLKCLOSEZONE - Issue an Zone Action: Close Zone command. BLKRESETZONE - Issue an Zone Action: Reset Zone command. Signed-off-by: Shaun Tancheff --- block

[PATCH v3 0/3] Block layer support ZAC/ZBC commands

2016-06-10 Thread Shaun Tancheff
eartion of bio op from flags. - Fixed memory leak in blkdev_issue_zone_report failing to put_bio(). - Documented opt in blkdev_issue_zone_report. - Moved include/uapi/linux/fs.h changes to patch 3 - Fixed commit message for first patch in series. Shaun Tancheff (3): Add bio/request flags for

[PATCH v3 3/3] Add ata pass-through path for ZAC commands.

2016-06-10 Thread Shaun Tancheff
ds the meaning of REQ_META to direct ZBC commands to construct ZAC equivalent ATA pass through commands. Note also that this approach expects the initiator to deal with the little endian result due to bypassing the normal translation layers. Signed-off-by: Shaun Tancheff --- So this patch isn'

Re: [PATCH v2] Add support for SCT Write Same

2016-06-09 Thread Shaun Tancheff
low the SCT path else fail with the current error (unmap is not set). In this way if you device supports both TRIM and SCT then you can WRITE SAME or TRIM. > - Shouldn't we still translate discard command to TRIM? Maybe we >need a check of the operation in the request st

[PATCH v2] Add support for Write Same via SCT

2016-06-08 Thread Shaun Tancheff
data by mapping discard operations to reset write pointer operations. Conventional zones that do not support reset write pointer can still honor the discard zeroes data by issuing a write same over the zone. v2: - Remove fugly ata hacking from sd.c Shaun Tancheff (1): Add support for SCT Write

[PATCH v2] Add support for SCT Write Same

2016-06-08 Thread Shaun Tancheff
SATA drives may support write same via SCT. This is useful for setting the drive contents to a specific pattern (0's). Signed-off-by: Shaun Tancheff --- v2: - Remove fugly ata hacking from sd.c --- drivers/ata/libata-scsi.c | 34 ++ drivers/scsi

Re: [PATCH] Add support for SCT Write Same

2016-06-08 Thread Shaun Tancheff
On Wed, Jun 8, 2016 at 10:39 PM, Martin K. Petersen wrote: > > >>>>> "Shaun" == Shaun Tancheff writes: > > Shaun, > > Shaun> SATA drives may support write same via SCT. This is useful for > Shaun> setting the drive contents to a specific patt

[PATCH v2 3/4] Add ioctl to issue ZBC/ZAC commands via block layer

2016-06-07 Thread Shaun Tancheff
Add New ioctl types BLKREPORT- Issue Report Zones to device. BLKOPENZONE - Issue an Zone Action: Open Zone command. BLKCLOSEZONE - Issue an Zone Action: Close Zone command. BLKRESETZONE - Issue an Zone Action: Reset Zone command. Signed-off-by: Shaun Tancheff --- V2

[PATCH v2 4/4] Add ata pass-through path for ZAC commands.

2016-06-07 Thread Shaun Tancheff
ds the meaning of REQ_META to direct ZBC commands to construct ZAC equivalent ATA pass through commands. Note also that this approach expects the initiator to deal with the little endian result due to bypassing the normal translation layers. Signed-off-by: Shaun Tancheff --- v2: - Added REQ_M

[PATCH v2 2/4] Add bio/request flags for using ZBC/ZAC commands

2016-06-07 Thread Shaun Tancheff
can reduce the number of zones in each report, but not critical. Signed-off-by: Shaun Tancheff --- V2: - Changed bi_rw to op_flags clarify sepeartion of bio op from flags. - Fixed memory leak in blkdev_issue_zone_report failing to put_bio(). - Documented opt in blkdev_issue_zone_report. - Remov

[PATCH v2 0/4] Block layer support ZAC/ZBC commands

2016-06-07 Thread Shaun Tancheff
emory leak in blkdev_issue_zone_report failing to put_bio(). - Documented opt in blkdev_issue_zone_report. - Moved include/uapi/linux/fs.h changes to patch 3 - Fixed commit message for first patch in series. Shaun Tancheff (4): Losing bits on request.cmd_flags Add bio/request flags for usin

  1   2   >