blk-merge: BIO front merge size check for chunked devices

2016-02-01 Thread Damien Le Moal
_pos(rq)), + return min(blk_max_size_offset(q, offset), blk_queue_get_max_sectors(q, rq->cmd_flags)); } -- Damien Le Moal, System Software Group, WW Research, HGST, a Western Digital company Western Digital Corporation (and its subsidiaries) E-mail Confidentiality Notice & Disclaimer: This e-mail and

Re: [Lsf-pc] [LSF/MM ATTEND] Online Logical Head Depop and SMR disks chunked writepages

2016-02-23 Thread Damien Le Moal
>On Tue 23-02-16 05:31:13, Damien Le Moal wrote: >> >> >On 02/22/16 18:56, Damien Le Moal wrote: >> >> 2) Write back of dirty pages to SMR block devices: >> >> >> >> Dirty pages of a block device inode are currently processed using the &g

Re: [Lsf-pc] [LSF/MM ATTEND] Online Logical Head Depop and SMR disks chunked writepages

2016-02-28 Thread Damien Le Moal
>On Wed 24-02-16 01:53:24, Damien Le Moal wrote: >> >> >On Tue 23-02-16 05:31:13, Damien Le Moal wrote: >> >> >> >> >On 02/22/16 18:56, Damien Le Moal wrote: >> >> >> 2) Write back of dirty pages to SMR block devices: >> >&

Re: [Lsf-pc] [LSF/MM ATTEND] Online Logical Head Depop and SMR disks chunked writepages

2016-02-28 Thread Damien Le Moal
>On 02/29/2016 10:02 AM, Damien Le Moal wrote: >> >>> On Wed 24-02-16 01:53:24, Damien Le Moal wrote: >>>> >>>>> On Tue 23-02-16 05:31:13, Damien Le Moal wrote: >>>>>> >>>>>>> On 02/22/16 18:

Re: [Lsf-pc] [LSF/MM ATTEND] Online Logical Head Depop and SMR disks chunked writepages

2016-02-29 Thread Damien Le Moal
From: Jan Kara <j...@suse.cz> Date: Monday, February 29, 2016 at 22:40 To: Damien Le Moal <damien.lem...@hgst.com> Cc: Jan Kara <j...@suse.cz>, "linux-bl...@vger.kernel.org" <linux-bl...@vger.kernel.org>, Bart Van Assche <bart.vanass

Re: [LSF/MM ATTEND] Online Logical Head Depop and SMR disks chunked writepages

2016-02-22 Thread Damien Le Moal
>On 02/22/16 18:56, Damien Le Moal wrote: >> 2) Write back of dirty pages to SMR block devices: >> >> Dirty pages of a block device inode are currently processed using the >> generic_writepages function, which can be executed simultaneously >> by multiple

Re: [PATCH] libata: Set longer timeout for SETFEATURES_SPINUP

2016-03-18 Thread Damien Le Moal
>On 03/18/2016 05:49 AM, Damien Le Moal wrote: >> >> libata: Set longer timeout for SETFEATURES_SPINUP >> >> For SATA drives with power-up in standby (PUIS) feature set, >> SETFEATURES_SPINUP execution may be required to get >> complete IDENTIFY

Re: [PATCH 6/9] block: Add 'zoned' sysfs queue attribute

2016-04-06 Thread Damien Le Moal
y super nice. Could we just have the zoned files contain a single “0” for non-SMR disks ? Or at least have the file empty and read return 0 Bytes. That would allow applications to easily and cleanly detect if they are dealing with a SMR disk (or not) instead of assuming that “-EINVAL” means “not SMR”, whi

[PATCH] libata: Set longer timeout for SETFEATURES_SPINUP

2016-03-19 Thread Damien Le Moal
n-up drive */ + SETFEATURES_SPINUP_TIMEOUT = 3, SETFEATURES_SATA_ENABLE = 0x10, /* Enable use of SATA feature */ SETFEATURES_SATA_DISABLE = 0x90, /* Disable use of SATA feature */ -------- Damien Le Moal, Ph.D. Sr. Manager, System Software Group, HGST Research, HGST,

Re: [PATCHv3 00/14] libata: ZAC support

2016-04-25 Thread Damien Le Moal
c. >The full patchset can be found at: > >git.kernel.org/hare/scsi-devel/h/zbc.v6 I do not see a zbc.v6 branch in your scsi-devel tree... Cheers. -------- Damien Le Moal, Ph.D. Sr. Manager, System Software Group, HGST Research, HGST, a Western Digital company damien.lem.

Re: [PATCH 4/6] block: Add 'zoned' sysfs queue attribute

2016-07-24 Thread Damien Le Moal
applications than using something like libzbc which will be sending SG_IOs to retrieve the zone information from the disk. Best regards. -------- Damien Le Moal, Ph.D. Sr. Manager, System Software Group, HGST Research, HGST, a Western Digital brand damien.lem...@hgst.com (+81) 0

Re: [PATCH 4/6] block: Add 'zoned' sysfs queue attribute

2016-07-24 Thread Damien Le Moal
lock device) does not sound ideal. Back to my previous reply, having the sysfs zoned file specifying just the disk zone size and having an ioctl to retrieve the detailed zone information looks to me much more sensible. Best regards. Damien Le Moal, Ph.D. Sr. Manager, Sy

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

2016-08-02 Thread Damien Le Moal
ormation on their zone configuration can be obtained, lets treat those as regular drives. 2) Add ioctls for zone management: Report zones (get information from RB tree), reset zone (simple wrapper to ioctl for block discard), open zone, close zone and finish zone. That will allow mkfs like tools t

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

2016-08-09 Thread Damien Le Moal
Shaun, On 8/10/16 12:58, Shaun Tancheff wrote: On Tue, Aug 9, 2016 at 3:09 AM, Damien Le Moal <damien.lem...@hgst.com> wrote: On Aug 9, 2016, at 15:47, Hannes Reinecke <h...@suse.de> wrote: [trim] Since disk type == 0 for everything that isn't HM so I would prefer the sysfs

Re: [PATCH 1/3] block: add flag for single-threaded submission

2016-07-21 Thread Damien Le Moal
he same hctx, which I think means simply that we need to allow only a single queue for a ZBC device. If one day we get a fast SSD supporting ZBC/ZAC commands, this may impact performance though... I may be completely wrong about this though. Cheers. Damien Le Moal,

Re: [PATCH 6/6] block: Add 'BLK_MQ_RQ_QUEUE_DONE' return value

2016-07-19 Thread Damien Le Moal
ged, 5 insertions(+) Reviewed-by: Damien Le Moal <damien.lem...@hgst.com> Tested-by: Damien Le Moal <damien.lem...@hgst.com> -- Damien Le Moal, Ph.D. Sr. Manager, System Software Group, HGST Research, HGST, a Western Digital brand damien.lem...@hgst.com (+81) 0466-98-3593 (ext. 513593) 1 kiri

Re: [PATCH 1/3] block: add flag for single-threaded submission

2016-07-19 Thread Damien Le Moal
ck/blk-core.c | 2 ++ include/linux/blkdev.h | 2 ++ 2 files changed, 4 insertions(+) Reviewed-by: Damien Le Moal <damien.lem...@hgst.com> Tested-by: Damien Le Moal <damien.lem...@hgst.com> -- Damien Le Moal, Ph.D. Sr. Manager, System Software Group, HGST Research, HGST, a Wes

Re: [PATCH 2/5] sd: Implement new RESET_WP provisioning mode

2016-07-19 Thread Damien Le Moal
(u32)SD_MAX_WS10_BLOCKS); I am still wondering if setting discard_zeroes_data to 1 is the right choice here since nothing will happen for conventional zones (no zeroing, no reset, nothing). discard_zeroes_data=0 may be a safer choice, even though I have not hit any issue wi

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

2016-07-19 Thread Damien Le Moal
GFP_KERNEL); Christoph suggested that GFP_ATOMIC is more appropriate here instead of GFP_NOWAIT. Reviewed-by: Damien Le Moal <damien.lem...@hgst.com> Tested-by: Damien Le Moal <damien.lem...@hgst.com> -- Damien Le Moal, Ph.D. Sr. Manager, System Software Group, HGST Research, HGS

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

2016-07-19 Thread Damien Le Moal
i/sd.h | 12 + include/scsi/scsi_proto.h | 17 +++ 3 files changed, 144 insertions(+), 5 deletions(-) Reviewed-by: Damien Le Moal <damien.lem...@hgst.com> Tested-by: Damien Le Moal <damien.lem...@hgst.com> -- Damien Le Moal, Ph.D. Sr. Manager, System Software Group, HGST Researc

Re: [PATCH 3/6] block: Implement support for zoned block devices

2016-07-19 Thread Damien Le Moal
| 5 block/blk-zoned.c | 70 ++ include/linux/blkdev.h | 47 + 5 files changed, 132 insertions(+) create mode 100644 block/blk-zoned.c Reviewed-by: Damien Le Moal <damien.lem...@hgst.com> Tested-by: Da

Re: [PATCH 1/6] blk-sysfs: Add 'chunk_sectors' to sysfs attributes

2016-07-19 Thread Damien Le Moal
On 7/19/16 22:20, Hannes Reinecke wrote: The queue limits already have a 'chunk_sectors' setting, so we should be presenting it via sysfs. Signed-off-by: Hannes Reinecke <h...@suse.de> --- block/blk-sysfs.c | 11 +++ 1 file changed, 11 insertions(+) Reviewed-by: Damien L

Re: [PATCH 2/6] block: update chunk_sectors in blk_stack_limits()

2016-07-19 Thread Damien Le Moal
On 7/19/16 22:20, Hannes Reinecke wrote: Signed-off-by: Hannes Reinecke <h...@suse.com> --- block/blk-settings.c | 4 1 file changed, 4 insertions(+) Reviewed-by: Damien Le Moal <damien.lem...@hgst.com> Tested-by: Damien Le Moal <damien.lem...@hgst.com> -- Damien

Re: [PATCH 2/3] sd: enable single-threaded I/O submission for zoned devices

2016-07-19 Thread Damien Le Moal
ien Le Moal <damien.lem...@hgst.com> Tested-by: Damien Le Moal <damien.lem...@hgst.com> -- Damien Le Moal, Ph.D. Sr. Manager, System Software Group, HGST Research, HGST, a Western Digital brand damien.lem...@hgst.com (+81) 0466-98-3593 (ext. 513593) 1 kirihara-cho, Fujisawa, Kanaga

Re: [PATCH 5/6] block: Introduce BLKPREP_DONE

2016-07-19 Thread Damien Le Moal
ged, 7 insertions(+), 1 deletion(-) Reviewed-by: Damien Le Moal <damien.lem...@hgst.com> Tested-by: Damien Le Moal <damien.lem...@hgst.com> -- Damien Le Moal, Ph.D. Sr. Manager, System Software Group, HGST Research, HGST, a Western Digital brand damien.lem...@hgst.com (+81) 0466-98-35

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

2016-08-09 Thread Damien Le Moal
tell the difference with direct-to-drive SG_IO accesses. But unlike these, the zone ioctls keep the zone information RB-tree cache up to date. > > I will be updating my patchset accordingly. I need to cleanup my code and rebase on top of 4.8-rc1. Let me do this and I will send everything

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

2016-08-15 Thread Damien Le Moal
ng the length field makes the code generic and following the standard, which has no restriction on the zone sizes. We could do some memory optimisation using different types of blk_zone sturcts, the types mapping to the SAME value: drives with constant zone size can use a blk_zone type without the le

Re: [PATCH v4] sd: Check for unaligned partial completion

2017-02-15 Thread Damien Le Moal
this late in the RC cycle. Should I keep the fix in its current place and defer the move to sd_completed_bytes to a later patch for 4.11 ? > Also, I am no fan of perpetuating the arcane SCSI logging stuff now that > we have tracing. So just make it a regular sd_printk(). Sure, will do. Thank you. --

Re: [PATCH v4] sd: Check for unaligned partial completion

2017-02-15 Thread Damien Le Moal
Bart, On 2/16/17 10:10, Bart Van Assche wrote: > On Thu, 2017-02-16 at 09:54 +0900, Damien Le Moal wrote: >> On 2/16/17 01:42, Bart Van Assche wrote: >>> An additional concern: what if the size of the Data-Out buffer is not a >>> multiple of the logical block si

Re: [PATCH v4] sd: Check for unaligned partial completion

2017-02-15 Thread Damien Le Moal
Bart, On 2/16/17 12:28, Bart Van Assche wrote: > On Thu, 2017-02-16 at 11:52 +0900, Damien Le Moal wrote: >> Thanks for the pointers. I checked libiscsi tests. And from what is done >> there, it seems to me that it is basically impossible to distinguished >> between a bu

Re: [PATCH v4] sd: Check for unaligned partial completion

2017-02-15 Thread Damien Le Moal
Bart, On 2/16/17 11:52, Damien Le Moal wrote: > Bart, > > On 2/16/17 10:10, Bart Van Assche wrote: >> On Thu, 2017-02-16 at 09:54 +0900, Damien Le Moal wrote: >>> On 2/16/17 01:42, Bart Van Assche wrote: >>>> An additional concern: what if the size of the Da

Re: [PATCH v5] sd: Check for unaligned partial completion

2017-02-21 Thread Damien Le Moal
lly in favor of just patching mpt3sas since it's clearly > broken (a disk can't write a partial sector). But I don't think a device > driver should know how to special case REPORT ZONES or similar. That's > clearly SBC/ZBC territory, so I prefer the sd_completed_bytes() > approach. OK.

Re: [PATCH v5] sd: Check for unaligned partial completion

2017-02-20 Thread Damien Le Moal
Bart, On 2/21/17 02:34, Bart Van Assche wrote: > On 02/16/2017 04:20 PM, Damien Le Moal wrote: >> Move the partial completion alignement check of mpt3sas to a generic >> implementation in sd_done so that the check ignores REQ_TYPE_FS >> requests with special payload size han

Re: [PATCH v5] sd: Check for unaligned partial completion

2017-02-20 Thread Damien Le Moal
Martin, On 2/21/17 11:35, Martin K. Petersen wrote: >>>>>> "Damien" == Damien Le Moal <damien.lem...@wdc.com> writes: > > Hi Damien, > > Damien> Move the partial completion alignement check of mpt3sas to a > Damien> generic imple

[PATCH v5] sd: Check for unaligned partial completion

2017-02-16 Thread Damien Le Moal
also being properly aligned. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> Fixes: f2e767bb5d6e ("mpt3sas: Force request partial completion alignment") --- Changes from v4: - As suggested by Bart, make sure resid does not exceed good_bytes - Use sd_printk for message instead

Re: [PATCH v5] sd: Check for unaligned partial completion

2017-02-19 Thread Damien Le Moal
so a huge chunk of the market). Is there any possibility to get this added to 4.10.0 ? Best regards. -- Damien Le Moal, Ph.D. Sr. Manager, System Software Research Group, Western Digital Corporation damien.lem...@wdc.com (+81) 0466-98-3593 (ext. 513593) 1 kirihara-cho, Fujisawa, Kanagawa,

Re: [PATCH v5] sd: Check for unaligned partial completion

2017-02-20 Thread Damien Le Moal
uest operation may map to different commands depending on the device type (e.g. REQ_OP_DISCARD which can become unmap or write same in SCSI). Martin, Which approach do you prefer ? Keeping everything contained to mpt3sas (so basically just fixing the problematic patch), or cleaning up ever

Re: [PATCH v5] sd: Check for unaligned partial completion

2017-02-22 Thread Damien Le Moal
Martin, On 2/23/17 13:44, Damien Le Moal wrote: > I do not see the problematic resid correction code in the mpt3sas driver > in 4.11/scsi-queue branch. Is this expected ? Did the mpt3sas driver > updates removed it ? > > It looks like that branch is based on 4.10.0-rc2. The mpt3sa

Re: [PATCH v5] sd: Check for unaligned partial completion

2017-02-22 Thread Damien Le Moal
Martin, On 2/22/17 13:24, Martin K. Petersen wrote: >>>>>> "Damien" == Damien Le Moal <damien.lem...@wdc.com> writes: > > Damien, > > Damien> I think we would still need the check for REQ_TYPE_FS to avoid > Damien> interfering with SG_I

Re: [PATCH 1/1] mpt3sas: Ignore unaligned completion length for ZBC_IN

2017-02-13 Thread Damien Le Moal
Bart, On 2/14/17 03:57, Bart Van Assche wrote: > On Mon, 2017-02-13 at 14:11 +0900, Damien Le Moal wrote: >> The ZBC_IN command (REPORT ZONES) reply length is always a multiple of >> 64B and thus may not be aligned on the device LBA size. >> For this command, retry due to the

Re: [PATCH 1/1] mpt3sas: Ignore unaligned completion length for ZBC_IN

2017-02-13 Thread Damien Le Moal
the type for requests issued internally (scsi_execute) of from things like the SG driver, so in essence, all requests not derived from a BIO... Is this correct ? If yes, then setting the BLOCK_TYPE_PC for REQ_OP_ZONE_REPORT (and REQ_OP_ZONE_RESET while at it) would break this model, wouldn't i

Re: [PATCH 1/1] mpt3sas: Ignore unaligned completion length for ZBC_IN

2017-02-13 Thread Damien Le Moal
Christoph, On 2/14/17 15:18, h...@lst.de wrote: > On Tue, Feb 14, 2017 at 02:21:37PM +0900, Damien Le Moal wrote: >>> I think we want to keep the knowledge of which requests have a request size >>> that should be a multiple of the logical block size in the block layer core &g

Re: [PATCH 1/1] mpt3sas: Ignore unaligned completion length for ZBC_IN

2017-02-13 Thread Damien Le Moal
Bart, On 2/14/17 14:11, Bart Van Assche wrote: > On Tue, 2017-02-14 at 13:42 +0900, Damien Le Moal wrote: >> I think so. But my understanding of REQ_TYPE_BLOCK_PC is that it is the >> type for requests issued internally (scsi_execute) of from things like >> the SG drive

[PATCH v3] sd: Check for unaligned partial completion

2017-02-14 Thread Damien Le Moal
he partial completion alignement check of mpt3sas to sd_done so that the check comes after good_bytes & resid corrections of done in that function depending on the request command to avoid false positive. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- Changes from v2

[PATCH v4] sd: Check for unaligned partial completion

2017-02-14 Thread Damien Le Moal
e handling are ignored. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- Changes from v3: - Moved check to initial switch-case so that commands with special payload handling are ignored. Changes from v2: - Fixed good_bytes calculation after correction of unaligned resid It shou

Re: [PATCH v4] sd: Check for unaligned partial completion

2017-02-14 Thread Damien Le Moal
upport that was newly added to 4.10. So we need a fix for that and your issue combined before Linus releases 4.10 stable this weekend. Thanks. Best regards. -- Damien Le Moal, Ph.D. Sr. Manager, System Software Research Group, Western Digital Corporation damien.lem...@wdc.com (+81) 0466-98-359

[PATCH 1/1] mpt3sas: Ignore unaligned completion length for ZBC_IN

2017-02-12 Thread Damien Le Moal
The ZBC_IN command (REPORT ZONES) reply length is always a multiple of 64B and thus may not be aligned on the device LBA size. For this command, retry due to the unaligned completion length is incorrect so do not check alignment of the reply length. Signed-off-by: Damien Le Moal <damien.

Re: [PATCH v4] sd: Check for unaligned partial completion

2017-02-15 Thread Damien Le Moal
Bart, On 2/16/17 00:10, Bart Van Assche wrote: > On Wed, 2017-02-15 at 11:12 +0900, Damien Le Moal wrote: >> +resid = round_up(resid, sector_size); >> +if (resid < good_bytes) >> +good_bytes -= resid; >

Re: [PATCH v4] sd: Check for unaligned partial completion

2017-02-15 Thread Damien Le Moal
Bart, On 2/16/17 01:42, Bart Van Assche wrote: > On Wed, 2017-02-15 at 11:12 +0900, Damien Le Moal wrote: >> diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c >> index 1f5d92a..d05a328 100644 >> --- a/drivers/scsi/sd.c >> +++ b/drivers/scsi/sd.c >> @@ -1790,6 +17

[PATCH 2/2] sd_zbc: Remove superfluous assignments

2017-02-28 Thread Damien Le Moal
initialized in sd_zbc_read_zones() but that initialization is not necessary. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- drivers/scsi/sd_zbc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c index 789c970..cf2c6a7 100644

[PATCH 3/3] mpt3sas: Do not check resid for non medium access commands

2017-02-28 Thread Damien Le Moal
From: Bart Van Assche Commit f2e767bb5d6e ("mpt3sas: Force request partial completion alignment") introduced a forced alignment of resid to the device logical block size to fix bogus HBA firmware sometimes returning an unaligned value. This fix however did not

[PATCH 1/2] sd: Rework ZBC integration

2017-02-28 Thread Damien Le Moal
eventual problems with bogus hardware. Signed-off-by: Damien Le Moal <damien.lem...@wdc.com> --- drivers/scsi/sd.c | 36 ++ drivers/scsi/sd.h | 11 +++--- drivers/scsi/sd_zbc.c | 101 +- 3 files changed, 84 insertions(

[PATCH 0/2] Improve ZBC integration

2017-02-28 Thread Damien Le Moal
mands"). The second patch, from Bart, cleans up unused variable assignments in sd_zbc_read_zones(). Bart Van Assche (1): sd_zbc: Remove superfluous assignments Damien Le Moal (1): sd: Rework ZBC integration drivers/scsi/sd.c | 36 ++--- drivers/scsi/sd.h | 11 +++--- dr

[PATCH 2/3] block: Separate zone requests from medium access requests

2017-02-28 Thread Damien Le Moal
From: Bart Van Assche Use blk_rq_accesses_medium() instead of !blk_rq_is_passthrough() to ensure that code that is intended for normal medium access requests, e.g. DISCARD, READ and WRITE requests, is not applied to REQ_OP_ZONE_REPORT requests nor to REQ_OP_ZONE_RESET

[PATCH 0/3] Separate zone requests from medium access requests

2017-02-28 Thread Damien Le Moal
This series introduces blk_rq_accesses_medium(), which is equivalent to !blk_rq_is_passthrough() minus the zone request operations REQ_OP_ZONE_REPORT and REQ_OP_ZONE_RESET. This new helper allows avoiding problems due to the non-standard nature of these commands (report zones does no operate on

[PATCH 1/3] block: Introduce blk_rq_accesses_medium()

2017-02-28 Thread Damien Le Moal
From: Bart Van Assche A medium access request is defined as an internal regular request that operates on a whole number of logical blocks of the storage medium. These include REQ_OP_READ, REQ_OP_WRITE, REQ_OP_FLUSH, REQ_OP_DISCARD, REQ_OP_SECURE_ERASE,

[PATCH v6] sd: Check for unaligned partial completion

2017-03-01 Thread Damien Le Moal
ch case so that the report and reset zone commands are ignored. In addition, as sd_done() is not called for passthrough requests, resid corrections are not done as intended by the initial mpt3sas patch. Fixes: f2e767bb5d6e ("mpt3sas: Force request partial completion alignment") Signed-off-by: Damien

Re: [PATCH 0/3] Separate zone requests from medium access requests

2017-03-01 Thread Damien Le Moal
Martin, On 3/1/17 12:21, Martin K. Petersen wrote: >>>>>> "Damien" == Damien Le Moal <damien.lem...@wdc.com> writes: > > Damien, > > Damien> The problem remains that the mpt3sas driver needs fixing. As you > Damien> suggest, we can do that

Re: [PATCH 0/3] Separate zone requests from medium access requests

2017-02-28 Thread Damien Le Moal
() defined. We could move that to include/scsi/scsi.h (or scsi_proto.h) and use it in place of blk_rq_accesses_medium() in the mpt3sas driver to not force unaligned resid corrections for zone commands. Would that be acceptable ? Best regards. -- Damien Le Moal, Ph.D. Sr. Manager, System Software Resea

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 <damien.lem...@hgst.com> > wrote: >> >> Shaun, >> >> On 8/22/16 13:31, Shaun Tancheff wrote: >> [...] >>> -int sd_zbc_setup

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

2016-08-22 Thread Damien Le Moal
FFLINE) { > - /* let the drive fail the command */ > - sd_zbc_debug_ratelimit(sdkp, > -"zone %zu offline\n", > -zone->start); > - goto out; > - } > - > - if (b

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

2016-09-29 Thread Damien Le Moal
nition of REQ_OP_BITS. Signed-off-by: Shaun Tancheff <shaun.tanch...@seagate.com> Signed-off-by: Damien Le Moal <damien.lem...@hgst.com> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com> --- block/blk-core.c

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

2016-09-29 Thread Damien Le Moal
From: Hannes Reinecke <h...@suse.de> The queue limits already have a 'chunk_sectors' setting, so we should be presenting it via sysfs. Signed-off-by: Hannes Reinecke <h...@suse.de> [Damien: Updated Documentation/ABI/testing/sysfs-block] Signed-off-by: Damien Le Moal <damien.

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

2016-09-29 Thread Damien Le Moal
ed-off-by: Shaun Tancheff <shaun.tanch...@seagate.com> Signed-off-by: Damien Le Moal <damien.lem...@hgst.com> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com> --- block/blk-zoned.c | 93

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

2016-09-29 Thread Damien Le Moal
n 512B sectors) of the zones of the device. Signed-off-by: Hannes Reinecke <h...@suse.de> [Damien: * Removed the zone cache * Implement report zones operation based on earlier proposal by Shaun Tancheff <shaun.tanch...@seagate.com>] Signed-off-by: Damien Le Moal <d

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

2016-09-29 Thread Damien Le Moal
t-processing based on code from Shaun Tancheff <shaun.tanch...@seagate.com> * Removed confusing use of 512B sector units in functions interface] Signed-off-by: Damien Le Moal <damien.lem...@hgst.com> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-b

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

2016-09-29 Thread Damien Le Moal
and bdev_is_zoned return a boolean for callers to test if a block device is zoned. The zoned attribute is also exported as a string to applications via sysfs. BLK_ZONED_NONE shows as "none", BLK_ZONED_HA as "host-aware" and BLK_ZONED_HM as "host-managed". Signed-off-by: Damien L

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

2016-09-29 Thread Damien Le Moal
From: Hannes Reinecke <h...@suse.de> Signed-off-by: Hannes Reinecke <h...@suse.com> Signed-off-by: Damien Le Moal <damien.lem...@hgst.com> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com> Reviewed-b

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

2016-09-29 Thread Damien Le Moal
rom v2: * Use kcalloc to allocate zone information array for ioctl * Use kcalloc to allocate zone information array for ioctl * Export GPL the functions blkdev_report_zones and blkdev_reset_zones * Shuffled uapi definitions from patch 7 into patch 5 Damien Le Moal (1): block: Add 'zoned' queue

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

2016-10-05 Thread Damien Le Moal
From: Hannes Reinecke <h...@suse.de> The queue limits already have a 'chunk_sectors' setting, so we should be presenting it via sysfs. Signed-off-by: Hannes Reinecke <h...@suse.de> [Damien: Updated Documentation/ABI/testing/sysfs-block] Signed-off-by: Damien Le Moal <damien.

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

2016-10-05 Thread Damien Le Moal
From: Hannes Reinecke <h...@suse.de> Signed-off-by: Hannes Reinecke <h...@suse.com> Signed-off-by: Damien Le Moal <damien.lem...@hgst.com> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com> Reviewed-b

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

2016-10-05 Thread Damien Le Moal
n 512B sectors) of the zones of the device. Signed-off-by: Hannes Reinecke <h...@suse.de> [Damien: * Removed the zone cache * Implement report zones operation based on earlier proposal by Shaun Tancheff <shaun.tanch...@seagate.com>] Signed-off-by: Damien Le Moal <d

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

2016-10-05 Thread Damien Le Moal
t-processing based on code from Shaun Tancheff <shaun.tanch...@seagate.com> * Removed confusing use of 512B sector units in functions interface] Signed-off-by: Damien Le Moal <damien.lem...@hgst.com> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-b

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

2016-10-05 Thread Damien Le Moal
and bdev_is_zoned return a boolean for callers to test if a block device is zoned. The zoned attribute is also exported as a string to applications via sysfs. BLK_ZONED_NONE shows as "none", BLK_ZONED_HA as "host-aware" and BLK_ZONED_HM as "host-managed". Signed-off-by: Damien L

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

2016-10-05 Thread Damien Le Moal
ed-off-by: Shaun Tancheff <shaun.tanch...@seagate.com> Signed-off-by: Damien Le Moal <damien.lem...@hgst.com> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com> Reviewed-by: Hannes Reinecke <h...@suse.com> ---

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

2016-10-05 Thread Damien Le Moal
nition of REQ_OP_BITS. Signed-off-by: Shaun Tancheff <shaun.tanch...@seagate.com> Signed-off-by: Damien Le Moal <damien.lem...@hgst.com> Reviewed-by: Christoph Hellwig <h...@lst.de> Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com> Reviewed-by: Hannes Reinecke &

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

2016-10-05 Thread Damien Le Moal
set_zones * Shuffled uapi definitions from patch 7 into patch 5 Damien Le Moal (1): block: Add 'zoned' queue limit Hannes Reinecke (4): blk-sysfs: Add 'chunk_sectors' to sysfs attributes block: update chunk_sectors in blk_stack_limits() block: Implement support for zoned block devices sd: Implemen

[PATCH 6/9] block: Add 'BLKPREP_DONE' return value

2016-09-19 Thread Damien Le Moal
h Hellwig <h...@lst.de> Signed-off-by: Damien Le Moal <damien.lem...@hgst.com> --- block/blk-core.c| 42 ++ drivers/scsi/scsi_lib.c | 1 + include/linux/blkdev.h | 1 + 3 files changed, 28 insertions(+), 16 deletions(-) diff --git a/bloc

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

2016-09-19 Thread Damien Le Moal
fields and use CPU endianness) * Changed report ioctl to operate on single zone instead of an array of blkzone structures. Signed-off-by: Shaun Tancheff <shaun.tanch...@seagate.com> Signed-off-by: Damien Le Moal <damien.lem...@hgst.com> --- block/blk-zoned.c

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

2016-09-19 Thread Damien Le Moal
pacity of conventional zones at the beginning of the LBA range (i.e. devices with rc_basis et to 0). Signed-off-by: Hannes Reinecke <h...@suse.de> Signed-off-by: Damien Le Moal <damien.lem...@hgst.com> --- drivers/scsi/Makefile |1 + drivers/scsi/sd.c | 147 --

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

2016-09-19 Thread Damien Le Moal
From: Hannes Reinecke <h...@suse.de> Signed-off-by: Hannes Reinecke <h...@suse.com> Signed-off-by: Damien Le Moal <damien.lem...@hgst.com> --- block/blk-settings.c | 4 1 file changed, 4 insertions(+) diff --git a/block/blk-settings.c b/block/blk-settings.c index b1d5b

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

2016-09-19 Thread Damien Le Moal
ock in place of a regular spinlock * Request zone operations to the underlying block device driver through BIO operations with the operation codes REQ_OP_ZONE_*. Signed-off-by: Damien Le Moal <damien.lem...@hgst.com> --- block/Kconfig | 8 ++ block/Makefile | 1 +

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

2016-09-19 Thread Damien Le Moal
From: Hannes Reinecke <h...@suse.de> The queue limits already have a 'chunk_sectors' setting, so we should be presenting it via sysfs. Signed-off-by: Hannes Reinecke <h...@suse.de> Signed-off-by: Damien Le Moal <damien.lem...@hgst.com> --- block/blk-sysfs.c | 11 +++

[PATCH 0/9] ZBC / Zoned block device support

2016-09-19 Thread Damien Le Moal
on raw block devices (e.g. mkfs.xxx) to discover a device zone layout and manipulate zone state. Damien Le Moal (1): block: Add 'zoned' queue limit Hannes Reinecke (6): blk-sysfs: Add 'chunk_sectors' to sysfs attributes block: update chunk_sectors in blk_stack_limits() block: Implement

[PATCH 7/9] block: Add 'BLK_MQ_RQ_QUEUE_DONE' return value

2016-09-19 Thread Damien Le Moal
From: Hannes Reinecke <h...@suse.de> Add a return value BLK_MQ_RQ_QUEUE_DONE to terminate a request without error. Signed-off-by: Hannes Reinecke <h...@suse.com> Signed-off-by: Damien Le Moal <damien.lem...@hgst.com> --- block/blk-mq.c | 1 + drivers/scsi/scsi_lib.

[PATCH 4/9] block: Define zoned block device operations

2016-09-19 Thread Damien Le Moal
tor and size are aigned on a zone). REQ_OP_ZONE_REPORT is not sent directly to the device and is processed in sd_zbc.c using the device zone work in order to parse the report reply and manage changes to the zone information cache of the device. Signed-off-by: Damien Le Moal <damien.lem...@hgst.

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

2016-09-19 Thread Damien Le Moal
sysfs. BLK_ZONED_NONE shows as "none", BLK_ZONED_HA as "host-aware" and BLK_ZONED_HM as "host-managed". Signed-off-by: Damien Le Moal <damien.lem...@hgst.com> --- block/blk-settings.c | 1 + block/blk-sysfs.c | 18 ++ include/linux/blkdev

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

2016-08-25 Thread Damien Le Moal
w what you think. If we drop this, we can get a clean and full ZBC support patch set ready in no time at all. Best regards. -- Damien Le Moal, Ph.D. Sr. Manager, System Software Group, HGST Research, HGST, a Western Digital brand damien.lem...@hgst.com (+81) 0466-98-3593 (ext. 513593) 1 ki

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

2016-09-27 Thread Damien Le Moal
Martin, On 9/28/16 12:54, Martin K. Petersen wrote: >>>>>> "Damien" == Damien Le Moal <damien.lem...@hgst.com> writes: > > Purely cosmetic: Looks like whitespace is a bit funky (spaces instead of > tabs several places). Also a few typos. > >

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

2016-09-27 Thread Damien Le Moal
n 512B sectors) of the zones of the device. Signed-off-by: Hannes Reinecke <h...@suse.de> [Damien: * Removed the zone cache * Implement report zones operation based on earlier proposal by Shaun Tancheff <shaun.tanch...@seagate.com>] Signed-off-by: Damien Le Moal <d

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

2016-09-27 Thread Damien Le Moal
ed-off-by: Shaun Tancheff <shaun.tanch...@seagate.com> Signed-off-by: Damien Le Moal <damien.lem...@hgst.com> --- block/blk-zoned.c | 93 +++ block/ioctl.c | 4 ++ include/linux/blkdev.h| 22 ++ include/uap

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

2016-09-27 Thread Damien Le Moal
* 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 <shaun.tanch...@seagate.com>] Signed-off-by: Damien Le Moal <damien.lem...@h

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

2016-09-27 Thread Damien Le Moal
nition of REQ_OP_BITS. Signed-off-by: Shaun Tancheff <shaun.tanch...@seagate.com> Signed-off-by: Damien Le Moal <damien.lem...@hgst.com> --- block/blk-core.c | 4 include/linux/blk_types.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/block/blk-core.c b/bloc

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

2016-09-27 Thread Damien Le Moal
rt GPL the functions blkdev_report_zones and blkdev_reset_zones * Shuffled uapi definitions from patch 7 into patch 5 Damien Le Moal (1): block: Add 'zoned' queue limit Hannes Reinecke (4): blk-sysfs: Add 'chunk_sectors' to sysfs attributes block: update chunk_sectors in blk_stack_limits()

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

2016-09-27 Thread Damien Le Moal
and bdev_is_zoned return a boolean for callers to test if a block device is zoned. The zoned attribute is also exported as a string to applications via sysfs. BLK_ZONED_NONE shows as "none", BLK_ZONED_HA as "host-aware" and BLK_ZONED_HM as "host-managed". Signed-off-by: Damien L

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

2016-09-27 Thread Damien Le Moal
From: Hannes Reinecke <h...@suse.de> The queue limits already have a 'chunk_sectors' setting, so we should be presenting it via sysfs. Signed-off-by: Hannes Reinecke <h...@suse.de> Signed-off-by: Damien Le Moal <damien.lem...@hgst.com> --- block/blk-sysfs.c | 11 +++

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

2016-09-27 Thread Damien Le Moal
From: Hannes Reinecke <h...@suse.de> Signed-off-by: Hannes Reinecke <h...@suse.com> Signed-off-by: Damien Le Moal <damien.lem...@hgst.com> --- block/blk-settings.c | 4 1 file changed, 4 insertions(+) diff --git a/block/blk-settings.c b/block/blk-settings.c index b1d5b

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

2016-09-28 Thread Damien Le Moal
* Use kcalloc to allocate zone information array for ioctl * Export GPL the functions blkdev_report_zones and blkdev_reset_zones * Shuffled uapi definitions from patch 7 into patch 5 Damien Le Moal (1): block: Add 'zoned' queue limit Hannes Reinecke (4): blk-sysfs: Add 'chunk_sectors' to

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

2016-09-28 Thread Damien Le Moal
From: Hannes Reinecke <h...@suse.de> The queue limits already have a 'chunk_sectors' setting, so we should be presenting it via sysfs. Signed-off-by: Hannes Reinecke <h...@suse.de> [Damien: Updated Documentation/ABI/testing/sysfs-block] Signed-off-by: Damien Le Moal <damien.

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

2016-09-28 Thread Damien Le Moal
and bdev_is_zoned return a boolean for callers to test if a block device is zoned. The zoned attribute is also exported as a string to applications via sysfs. BLK_ZONED_NONE shows as "none", BLK_ZONED_HA as "host-aware" and BLK_ZONED_HM as "host-managed". Signed-off-by: Damien L

  1   2   3   4   >