Re: [RFC 3/8] nvmet: Use p2pmem in nvme target

2017-04-05 Thread Sagi Grimberg
I hadn't done this yet but I think a simple closest device in the tree would solve the issue sufficiently. However, I originally had it so the user has to pick the device and I prefer that approach. But if the user picks the device, then why bother restricting what he picks? Because the user

Re: [RFC 6/8] nvmet: Be careful about using iomem accesses when dealing with p2pmem

2017-04-05 Thread Sagi Grimberg
Note that the nvme completion queues are still on the host memory, so this means we have lost the ordering between data and completions as they go to different pcie targets. Hmm, in this simple up/down case with a switch, I think it might actually be OK. Transactions might not complete at

Re: 4.11.0-rc5-00011-g08e4e0d oops in mpt3sas driver

2017-04-05 Thread Brad Campbell
On 06/04/17 08:30, Brad Campbell wrote: G'day All, This is a vaguely current git head kernel compiled yesterday. Oopsed and rebooted itself, and then oopsed and rebooted again. There was no sign of a raid rebuild in the kernel logs, and it's a staging machine so there is nothing running after

4.11.0-rc5-00011-g08e4e0d oops in mpt3sas driver

2017-04-05 Thread Brad Campbell
G'day All, This is a vaguely current git head kernel compiled yesterday. Oopsed and rebooted itself, and then oopsed and rebooted again. There was no sign of a raid rebuild in the kernel logs, and it's a staging machine so there is nothing running after a reboot that goes near these disks.

Re: [PATCH] Make checking the scsi_device_get() return value mandatory

2017-04-05 Thread Bart Van Assche
On Thu, 2017-04-06 at 08:27 +0800, kbuild test robot wrote: > All warnings (new ones prefixed by >>): > >drivers//scsi/osd/osd_uld.c: In function 'osd_probe': > > > drivers//scsi/osd/osd_uld.c:467:2: warning: ignoring return value of > > > 'scsi_device_get', declared with attribute

Re: [PATCH] Make checking the scsi_device_get() return value mandatory

2017-04-05 Thread kbuild test robot
Hi Bart, [auto build test WARNING on scsi/for-next] [also build test WARNING on v4.11-rc5 next-20170405] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Bart-Van-Assche/Make-checking

[PATCH 21/24] scsi: Lock down the eata driver

2017-04-05 Thread David Howells
When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a

[PATCH v3 2/2] scsi: storvsc: Add support for FC rport.

2017-04-05 Thread Cathy Avery
Included in the current storvsc driver for Hyper-V is the ability to access luns on an FC fabric via a virtualized fiber channel adapter exposed by the Hyper-V host. The driver also attaches to the FC transport to allow host and port names to be published under /sys/class/fc_host/hostX. Current

[PATCH v3 1/2] scsi: scsi_transport_fc: Add dummy initiator role to rport

2017-04-05 Thread Cathy Avery
This patch allows scsi drivers that expose virturalized fibre channel devices but that do not expose rports to successfully rescan the scsi bus via echo "- - -" > /sys/class/scsi_host/hostX/scan. Drivers can create a pseudo rport and indicate FC_PORT_ROLE_FCP_DUMMY_INITIATOR as the rport's role in

[PATCH v3 0/2] scsi: storvsc: Add support for FC rport

2017-04-05 Thread Cathy Avery
The updated patch set provides a way for drivers ( specifically storvsc in this case ) that expose virturalized fc devices but that do not expose rports to be manually scanned. This is done via creating a pseudo rport in storvsc and a corresponding dummy initiator rport role in the fc transport.

Re: ->retries fixups V2

2017-04-05 Thread Jens Axboe
On 04/05/2017 12:16 PM, Christoph Hellwig wrote: > On Wed, Apr 05, 2017 at 12:06:53PM -0600, Jens Axboe wrote: >> On Wed, Apr 05 2017, Christoph Hellwig wrote: >>> This series fixes a few lose bits in terms of how nvme uses ->retries, >>> including fixing it for non-PCIe transports. While at it I

Re: ->retries fixups V2

2017-04-05 Thread Christoph Hellwig
On Wed, Apr 05, 2017 at 12:06:53PM -0600, Jens Axboe wrote: > On Wed, Apr 05 2017, Christoph Hellwig wrote: > > This series fixes a few lose bits in terms of how nvme uses ->retries, > > including fixing it for non-PCIe transports. While at it I noticed that > > nvme and scsi use the field in

Re: [PATCH v2] scsi: sd: Fix capacity calculation with 32-bit sector_t

2017-04-05 Thread Bart Van Assche
On Wed, 2017-04-05 at 06:15 -0400, Martin K. Petersen wrote: > We previously made sure that the reported disk capacity was less than > 0x blocks when the kernel was not compiled with large sector_t > support (CONFIG_LBDAF). However, this check assumed that the capacity > was reported in

Re: ->retries fixups V2

2017-04-05 Thread Jens Axboe
On Wed, Apr 05 2017, Christoph Hellwig wrote: > This series fixes a few lose bits in terms of how nvme uses ->retries, > including fixing it for non-PCIe transports. While at it I noticed that > nvme and scsi use the field in entirely different ways, and no other > driver uses it at all. So I

Re: [PATCH 2/5] nvme: cleanup nvme_req_needs_retry

2017-04-05 Thread Sagi Grimberg
Reviewed-by: Sagi Grimberg

Re: [PATCH 4/5] nvme: move the retries count to struct nvme_request

2017-04-05 Thread Sagi Grimberg
Reviewed-by: Sagi Grimberg

Re: [PATCH 3/5] nvme: mark nvme_max_retries static

2017-04-05 Thread Sagi Grimberg
Reviewed-by: Sagi Grimberg

Re: [PATCH 1/5] nvme: move ->retries setup to nvme_setup_cmd

2017-04-05 Thread Sagi Grimberg
Reviewed-by: Sagi Grimberg

Re: [PATCH 5/5] block, scsi: move the retries field to struct scsi_request

2017-04-05 Thread Sagi Grimberg
Reviewed-by: Sagi Grimberg

[PATCH 02/27] block: renumber REQ_OP_WRITE_ZEROES

2017-04-05 Thread Christoph Hellwig
Make life easy for implementations that needs to send a data buffer to the device (e.g. SCSI) by numbering it as a data out command. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke ---

[PATCH 03/27] block: implement splitting of REQ_OP_WRITE_ZEROES bios

2017-04-05 Thread Christoph Hellwig
Copy and past the REQ_OP_WRITE_SAME code to prepare to implementations that limit the write zeroes size. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke --- block/blk-merge.c | 17

always use REQ_OP_WRITE_ZEROES for zeroing offload V2

2017-04-05 Thread Christoph Hellwig
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_zeroes_data, and also switches WRITE SAME based zeroing in SCSI to this new

[PATCH 01/27] sd: split sd_setup_discard_cmnd

2017-04-05 Thread Christoph Hellwig
Split sd_setup_discard_cmnd into one function per provisioning type. While this creates some very slight duplication of boilerplate code it keeps the code modular for additions of new provisioning types, and for reusing the write same functions for the upcoming scsi implementation of the Write

[PATCH 07/27] dm: support REQ_OP_WRITE_ZEROES

2017-04-05 Thread Christoph Hellwig
Copy & paste from the REQ_OP_WRITE_SAME code. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- drivers/md/dm-core.h | 1 + drivers/md/dm-io.c| 8 ++-- drivers/md/dm-linear.c| 1 + drivers/md/dm-mpath.c |

[PATCH 04/27] sd: implement REQ_OP_WRITE_ZEROES

2017-04-05 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke --- drivers/scsi/sd.c | 31 ++- drivers/scsi/sd_zbc.c | 1 + 2 files changed, 27 insertions(+), 5 deletions(-)

[PATCH 08/27] dm kcopyd: switch to use REQ_OP_WRITE_ZEROES

2017-04-05 Thread Christoph Hellwig
It seems like the code currently passes whatever it was using for writes to WRITE SAME. Just switch it to WRITE ZEROES, although that doesn't need any payload. Untested, and confused by the code, maybe someone who understands it better than me can help.. Signed-off-by: Christoph Hellwig

Re: [PATCH v2] scsi: ses: don't get power status of SES device slot on probe

2017-04-05 Thread Mauricio Faria de Oliveira
On 04/05/2017 01:23 PM, Song Liu wrote: Reviewed-by: Song Liu Thanks for reviewing, Song Liu. It's good to know this patch doesn't break anything for you. cheers, -- Mauricio Faria de Oliveira IBM Linux Technology Center

[PATCH 24/27] drbd: implement REQ_OP_WRITE_ZEROES

2017-04-05 Thread Christoph Hellwig
It seems like DRBD assumes its on the wire TRIM request always zeroes data. Use that fact to implement REQ_OP_WRITE_ZEROES. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- drivers/block/drbd/drbd_main.c | 3 ++- drivers/block/drbd/drbd_nl.c

[PATCH 16/27] zram: implement REQ_OP_WRITE_ZEROES

2017-04-05 Thread Christoph Hellwig
Just the same as discard if the block size equals the system page size. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- drivers/block/zram/zram_drv.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git

[PATCH 13/27] block_dev: use blkdev_issue_zerout for hole punches

2017-04-05 Thread Christoph Hellwig
This gets us support for non-discard efficient write of zeroes (e.g. NVMe) and prepares for removing the discard_zeroes_data flag. Also remove a pointless discard support check, which is done in blkdev_issue_discard already. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K.

[PATCH 05/27] md: support REQ_OP_WRITE_ZEROES

2017-04-05 Thread Christoph Hellwig
Copy & paste from the REQ_OP_WRITE_SAME code. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- drivers/md/linear.c| 1 + drivers/md/md.h| 7 +++ drivers/md/multipath.c | 1 + drivers/md/raid0.c | 2 ++ drivers/md/raid1.c | 4

[PATCH 06/27] dm io: discards don't take a payload

2017-04-05 Thread Christoph Hellwig
Fix up do_region to not allocate a bio_vec for discards. We've got rid of the discard payload allocated by the caller years ago. Obviously this wasn't actually harmful given how long it's been there, but it's still good to avoid the pointless allocation. Signed-off-by: Christoph Hellwig

[PATCH 26/27] scsi: sd: Separate zeroout and discard command choices

2017-04-05 Thread Christoph Hellwig
From: "Martin K. Petersen" Now that zeroout and discards are distinct operations we need to separate the policy of choosing the appropriate command. Create a zeroing_mode which can be one of: write: Zeroout assist not present, use regular WRITE

[PATCH 25/27] block: remove the discard_zeroes_data flag

2017-04-05 Thread Christoph Hellwig
Now that we use the proper REQ_OP_WRITE_ZEROES operation everywhere we can kill this hack. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke --- Documentation/ABI/testing/sysfs-block | 10

[PATCH 21/27] mmc: remove the discard_zeroes_data flag

2017-04-05 Thread Christoph Hellwig
mmc only supports discarding on large alignments, so the zeroing code would always fall back to explicit writings of zeroes. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- drivers/mmc/core/queue.c | 2 -- 1 file changed, 2 deletions(-) diff --git

[PATCH 22/27] block: stop using discards for zeroing

2017-04-05 Thread Christoph Hellwig
Now that we have REQ_OP_WRITE_ZEROES implemented for all devices that support efficient zeroing, we can remove the call to blkdev_issue_discard. This means we only have two ways of zeroing left and can simplify the code. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K.

[PATCH 12/27] block: add a new BLKDEV_ZERO_NOFALLBACK flag

2017-04-05 Thread Christoph Hellwig
This avoids fallbacks to explicit zeroing in (__)blkdev_issue_zeroout if the caller doesn't want them. Also clean up the convoluted check for the return condition that this new flag is added to. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen

[PATCH 20/27] rsxx: remove the discard_zeroes_data flag

2017-04-05 Thread Christoph Hellwig
rsxx only supports discarding on large alignments, so the zeroing code would always fall back to explicit writings of zeroes. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- drivers/block/rsxx/dev.c | 1 - 1 file changed, 1 deletion(-) diff --git

[PATCH 09/27] block: stop using blkdev_issue_write_same for zeroing

2017-04-05 Thread Christoph Hellwig
We'll always use the WRITE ZEROES code for zeroing now. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke --- block/blk-lib.c | 4 1 file changed, 4 deletions(-) diff --git

[PATCH 10/27] block: add a flags argument to (__)blkdev_issue_zeroout

2017-04-05 Thread Christoph Hellwig
Turn the existing discard flag into a new BLKDEV_ZERO_UNMAP flag with similar semantics, but without referring to diѕcard. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke --- block/blk-lib.c

[PATCH 14/27] sd: implement unmapping Write Zeroes

2017-04-05 Thread Christoph Hellwig
Try to use a write same with unmap bit variant if the device supports it and the caller allows for it. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke --- drivers/scsi/sd.c | 9 + 1

[PATCH 11/27] block: add a REQ_NOUNMAP flag for REQ_OP_WRITE_ZEROES

2017-04-05 Thread Christoph Hellwig
If this flag is set logical provisioning capable device should release space for the zeroed blocks if possible, if it is not set devices should keep the blocks anchored. Also remove an out of sync kerneldoc comment for a static function that would have become even more out of data with this

[PATCH 19/27] rbd: remove the discard_zeroes_data flag

2017-04-05 Thread Christoph Hellwig
rbd only supports discarding on large alignments, so the zeroing code would always fall back to explicit writings of zeroes. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- drivers/block/rbd.c | 1 - 1 file changed, 1 deletion(-) diff --git

[PATCH 18/27] brd: remove discard support

2017-04-05 Thread Christoph Hellwig
It's just a in-driver reimplementation of writing zeroes to the pages, which fails if the discards aren't page aligned. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- drivers/block/brd.c | 54 -

[PATCH 17/27] loop: implement REQ_OP_WRITE_ZEROES

2017-04-05 Thread Christoph Hellwig
It's identical to discard as hole punches will always leave us with zeroes on reads. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- drivers/block/loop.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/block/loop.c

[PATCH 15/27] nvme: implement REQ_OP_WRITE_ZEROES

2017-04-05 Thread Christoph Hellwig
But now for the real NVMe Write Zeroes yet, just to get rid of the discard abuse for zeroing. Also rename the quirk flag to be a bit more self-explanatory. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke

[PATCH 23/27] drbd: make intelligent use of blkdev_issue_zeroout

2017-04-05 Thread Christoph Hellwig
drbd always wants its discard wire operations to zero the blocks, so use blkdev_issue_zeroout with the BLKDEV_ZERO_UNMAP flag instead of reinventing it poorly. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- drivers/block/drbd/drbd_debugfs.c | 3

[PATCH 27/27] scsi: sd: Remove LBPRZ dependency for discards

2017-04-05 Thread Christoph Hellwig
From: "Martin K. Petersen" Separating discards and zeroout operations allows us to remove the LBPRZ block zeroing constraints from discards and honor the device preferences for UNMAP commands. If supported by the device, we'll also choose UNMAP over one of the WRITE

[PATCH 2/5] nvme: cleanup nvme_req_needs_retry

2017-04-05 Thread Christoph Hellwig
Don't pass the status explicitly but derive it from the requeust, and unwind the complex condition to be more readable. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn --- drivers/nvme/host/core.c | 16 +++- 1 file changed, 11

[PATCH 4/5] nvme: move the retries count to struct nvme_request

2017-04-05 Thread Christoph Hellwig
The way NVMe uses this field is entirely different from the older SCSI/BLOCK_PC usage, so move it into struct nvme_request. Also reduce the size of the file to a unsigned char so that we leave space for additional smaller fields that will appear soon. Signed-off-by: Christoph Hellwig

[PATCH 3/5] nvme: mark nvme_max_retries static

2017-04-05 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn --- drivers/nvme/host/core.c | 3 +-- drivers/nvme/host/nvme.h | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index

[PATCH 5/5] block, scsi: move the retries field to struct scsi_request

2017-04-05 Thread Christoph Hellwig
Instead of bloating the generic struct request with it. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn --- block/scsi_ioctl.c | 8 drivers/scsi/osd/osd_initiator.c | 2 +- drivers/scsi/osst.c| 2 +-

[PATCH 1/5] nvme: move ->retries setup to nvme_setup_cmd

2017-04-05 Thread Christoph Hellwig
->retries is counting the number of times a command is resubmitted, and be cleared on the first time we see the command. We currently don't do that for non-PCIe command, which is easily fixed by moving the setup to common code. Signed-off-by: Christoph Hellwig ---

->retries fixups V2

2017-04-05 Thread Christoph Hellwig
This series fixes a few lose bits in terms of how nvme uses ->retries, including fixing it for non-PCIe transports. While at it I noticed that nvme and scsi use the field in entirely different ways, and no other driver uses it at all. So I decided to move it into the nvme_request and

[PATCH 27/38] Annotate hardware config module parameters in drivers/scsi/

2017-04-05 Thread David Howells
When the kernel is running in secure boot mode, we lock down the kernel to prevent userspace from modifying the running kernel image. Whilst this includes prohibiting access to things like /dev/mem, it must also prevent access by means of configuring driver modules in such a way as to cause a

[PATCH] Make checking the scsi_device_get() return value mandatory

2017-04-05 Thread Bart Van Assche
Now that all scsi_device_get() callers check the return value of this function, make checking that return value mandatory. Signed-off-by: Bart Van Assche Cc: Hannes Reinecke Cc: Johannes Thumshirn --- include/scsi/scsi_device.h | 2

Re: [PATCH] osd_uld: Check scsi_device_get() return value

2017-04-05 Thread Boaz Harrosh
On 03/30/2017 08:17 PM, Bart Van Assche wrote: > scsi_device_get() can fail. Hence check its return value. > > Signed-off-by: Bart Van Assche > Cc: Boaz Harrosh Cool thanks ACK-by: Boaz Harrosh > --- >

Re: [PATCH v2] scsi: ses: don't get power status of SES device slot on probe

2017-04-05 Thread Song Liu
> On Apr 5, 2017, at 8:18 AM, Mauricio Faria de Oliveira > wrote: > > The commit 08024885a2a3 ("ses: Add power_status to SES device slot") > introduced the 'power_status' attribute to enclosure components and > the associated callbacks. > > There are 2 callbacks

Re: problem with discard granularity in sd

2017-04-05 Thread David Buckley
Hi Martin, I really appreciate the response. Here is the VPD page data you asked for: Logical block provisioning VPD page (SBC): Unmap command supported (LBPU): 1 Write same (16) with unmap bit supported (LBWS): 1 Write same (10) with unmap bit supported (LBWS10): 1 Logical block

RE: [RFC 4/8] p2pmem: Add debugfs "stats" file

2017-04-05 Thread Steve Wise
> > > + p2pmem_debugfs_root = debugfs_create_dir("p2pmem", NULL); > > + if (!p2pmem_debugfs_root) > > + pr_info("could not create debugfs entry, continuing\n"); > > + > > Why continue? I think it'd be better to just fail it. > Because not having debugfs support isn't fatal to

RE: [RFC 2/8] cxgb4: setup pcie memory window 4 and create p2pmem region

2017-04-05 Thread Steve Wise
> > > > +static void setup_memwin_p2pmem(struct adapter *adap) > > +{ > > + unsigned int mem_base = t4_read_reg(adap, > CIM_EXTMEM2_BASE_ADDR_A); > > + unsigned int mem_size = t4_read_reg(adap, > CIM_EXTMEM2_ADDR_SIZE_A); > > + > > + if (!use_p2pmem) > > + return; > > This is

Re: [PATCH] csiostor: switch to pci_alloc_irq_vectors

2017-04-05 Thread Varun Prakash
On Wed, Apr 05, 2017 at 08:26:57AM +0200, Christoph Hellwig wrote: > On Tue, Apr 04, 2017 at 01:49:44PM +0530, Varun Prakash wrote: > > On Tue, Apr 04, 2017 at 08:46:14AM +0200, Christoph Hellwig wrote: > > > Does this one work better? > > > > > > > csiostor driver is triggering following warning

Re: [PATCH v2] scsi: ses: don't get power status of SES device slot on probe

2017-04-05 Thread Dan Williams
On Wed, Apr 5, 2017 at 8:18 AM, Mauricio Faria de Oliveira wrote: > The commit 08024885a2a3 ("ses: Add power_status to SES device slot") > introduced the 'power_status' attribute to enclosure components and > the associated callbacks. > > There are 2 callbacks

Re: [PATCH 4/5] nvme: move the retries count to struct nvme_request

2017-04-05 Thread Christoph Hellwig
On Wed, Apr 05, 2017 at 11:14:30AM -0400, Keith Busch wrote: > On Wed, Apr 05, 2017 at 04:18:55PM +0200, Christoph Hellwig wrote: > > The way NVMe uses this field is entirely different from the older > > SCSI/BLOCK_PC usage, so move it into struct nvme_request. > > > > Also reduce the size of the

[PATCH v2] scsi: ses: don't get power status of SES device slot on probe

2017-04-05 Thread Mauricio Faria de Oliveira
The commit 08024885a2a3 ("ses: Add power_status to SES device slot") introduced the 'power_status' attribute to enclosure components and the associated callbacks. There are 2 callbacks available to get the power status of a device: 1) ses_get_power_status() for 'struct

Re: [PATCHv5 8/8] scsi: inline command aborts

2017-04-05 Thread Christoph Hellwig
I think this also need to remove the abort_work field from struct scsi_cmnd. > } > > #ifdef CONFIG_SCSI_LOGGING > diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c > index 53e3343..2355100 100644 > --- a/drivers/scsi/scsi_error.c > +++ b/drivers/scsi/scsi_error.c > @@ -115,11

Re: [PATCH 4/5] nvme: move the retries count to struct nvme_request

2017-04-05 Thread Keith Busch
On Wed, Apr 05, 2017 at 04:18:55PM +0200, Christoph Hellwig wrote: > The way NVMe uses this field is entirely different from the older > SCSI/BLOCK_PC usage, so move it into struct nvme_request. > > Also reduce the size of the file to a unsigned char so that we leave space > for additional

Re: [PATCHv5 7/8] scsi: make asynchronous aborts mandatory

2017-04-05 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCHv5 6/8] scsi: make scsi_eh_scmd_add() always succeed

2017-04-05 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCHv5 5/8] scsi: make eh_eflags persistent

2017-04-05 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCHv5 3/8] scsi: always send command aborts

2017-04-05 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCHv5 1/8] scsi_error: count medium access timeout only once per EH run

2017-04-05 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCHv5 2/8] sd: Return SUCCESS in sd_eh_action() after device offline

2017-04-05 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH] scsi: ses: don't get power status of SES device slot on probe

2017-04-05 Thread Mauricio Faria de Oliveira
On 04/05/2017 11:41 AM, Dan Williams wrote: On Wed, Apr 5, 2017 at 6:13 AM, Mauricio Faria de Oliveira wrote: 1) imagine .get_power_status couldn't update the 'power_status' field (it's a bit unlikely with the in-tree ses driver, but in the case that

Re: [PATCH 1/5] nvme: move ->retries setup to nvme_setup_cmd

2017-04-05 Thread Christoph Hellwig
On Wed, Apr 05, 2017 at 04:43:34PM +0200, Johannes Thumshirn wrote: > On Wed, Apr 05, 2017 at 04:18:52PM +0200, Christoph Hellwig wrote: > > This way we get the behavior right for the non-PCIe transports. > > Could you please share a bit of your minds inner workings for us mere mortals? It's

Re: always use REQ_OP_WRITE_ZEROES for zeroing offload V2

2017-04-05 Thread Christoph Hellwig
Looks like the mail server crapped out under the load.. I'll resend tomorrow morning, in the meantime the git url below works. On Wed, Apr 05, 2017 at 04:21:38PM +0200, Christoph Hellwig wrote: > This series makes REQ_OP_WRITE_ZEROES the only zeroing offload > supported by the block layer, and

Re: [PATCH 5/5] block, scsi: move the retries field to struct scsi_request

2017-04-05 Thread Johannes Thumshirn
On Wed, Apr 05, 2017 at 04:18:56PM +0200, Christoph Hellwig wrote: > Instead of bloating the generic struct request with it. > > Signed-off-by: Christoph Hellwig > --- Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn

Re: [PATCH 2/5] nvme: cleanup nvme_req_needs_retry

2017-04-05 Thread Johannes Thumshirn
On Wed, Apr 05, 2017 at 04:18:53PM +0200, Christoph Hellwig wrote: > Don't pass the status explicitly but derive it from the requeust, > and unwind the complex condition to be more readable. > > Signed-off-by: Christoph Hellwig > --- Looks good, Reviewed-by: Johannes Thumshirn

Re: [PATCH 4/5] nvme: move the retries count to struct nvme_request

2017-04-05 Thread Johannes Thumshirn
On Wed, Apr 05, 2017 at 04:18:55PM +0200, Christoph Hellwig wrote: > The way NVMe uses this field is entirely different from the older > SCSI/BLOCK_PC usage, so move it into struct nvme_request. > > Also reduce the size of the file to a unsigned char so that we leave space > for additional

Re: [PATCH 3/5] nvme: mark nvme_max_retries static

2017-04-05 Thread Johannes Thumshirn
On Wed, Apr 05, 2017 at 04:18:54PM +0200, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig > --- Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de

Re: [PATCH 1/5] nvme: move ->retries setup to nvme_setup_cmd

2017-04-05 Thread Johannes Thumshirn
On Wed, Apr 05, 2017 at 04:18:52PM +0200, Christoph Hellwig wrote: > This way we get the behavior right for the non-PCIe transports. Could you please share a bit of your minds inner workings for us mere mortals? Thanks, Johannes -- Johannes Thumshirn

Re: [PATCH] scsi: ses: don't get power status of SES device slot on probe

2017-04-05 Thread Dan Williams
On Wed, Apr 5, 2017 at 6:13 AM, Mauricio Faria de Oliveira wrote: > Hi Dan, > > Thanks for reviewing. > > On 04/04/2017 06:07 PM, Dan Williams wrote: >>> >>> @@ -594,6 +594,10 @@ static ssize_t get_component_power_status(struct >>> device *cdev, >>> >>> if

Re: [PATCH 27/39] Annotate hardware config module parameters in drivers/scsi/

2017-04-05 Thread David Howells
Finn Thain wrote: > I can see how base addresses and IO ports are relevant, but the irq > parameter changes below don't protect the kernel image AFAICT. What's the > rationale for those changes? I think it should be stated here. Easier grepping for one. But I'm

[PATCH 16/27] zram: implement REQ_OP_WRITE_ZEROES

2017-04-05 Thread Christoph Hellwig
Just the same as discard if the block size equals the system page size. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- drivers/block/zram/zram_drv.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git

[PATCH 14/27] sd: implement unmapping Write Zeroes

2017-04-05 Thread Christoph Hellwig
Try to use a write same with unmap bit variant if the device supports it and the caller allows for it. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke --- drivers/scsi/sd.c | 9 + 1

[PATCH 13/27] block_dev: use blkdev_issue_zerout for hole punches

2017-04-05 Thread Christoph Hellwig
This gets us support for non-discard efficient write of zeroes (e.g. NVMe) and prepares for removing the discard_zeroes_data flag. Also remove a pointless discard support check, which is done in blkdev_issue_discard already. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K.

[PATCH 12/27] block: add a new BLKDEV_ZERO_NOFALLBACK flag

2017-04-05 Thread Christoph Hellwig
This avoids fallbacks to explicit zeroing in (__)blkdev_issue_zeroout if the caller doesn't want them. Also clean up the convoluted check for the return condition that this new flag is added to. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen

[PATCH 11/27] block: add a REQ_NOUNMAP flag for REQ_OP_WRITE_ZEROES

2017-04-05 Thread Christoph Hellwig
If this flag is set logical provisioning capable device should release space for the zeroed blocks if possible, if it is not set devices should keep the blocks anchored. Also remove an out of sync kerneldoc comment for a static function that would have become even more out of data with this

[PATCH 10/27] block: add a flags argument to (__)blkdev_issue_zeroout

2017-04-05 Thread Christoph Hellwig
Turn the existing discard flag into a new BLKDEV_ZERO_UNMAP flag with similar semantics, but without referring to diѕcard. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke --- block/blk-lib.c

[PATCH 09/27] block: stop using blkdev_issue_write_same for zeroing

2017-04-05 Thread Christoph Hellwig
We'll always use the WRITE ZEROES code for zeroing now. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke --- block/blk-lib.c | 4 1 file changed, 4 deletions(-) diff --git

[PATCH 01/27] sd: split sd_setup_discard_cmnd

2017-04-05 Thread Christoph Hellwig
Split sd_setup_discard_cmnd into one function per provisioning type. While this creates some very slight duplication of boilerplate code it keeps the code modular for additions of new provisioning types, and for reusing the write same functions for the upcoming scsi implementation of the Write

always use REQ_OP_WRITE_ZEROES for zeroing offload V2

2017-04-05 Thread Christoph Hellwig
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_zeroes_data, and also switches WRITE SAME based zeroing in SCSI to this new

[PATCH 02/27] block: renumber REQ_OP_WRITE_ZEROES

2017-04-05 Thread Christoph Hellwig
Make life easy for implementations that needs to send a data buffer to the device (e.g. SCSI) by numbering it as a data out command. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke ---

[PATCH 04/27] sd: implement REQ_OP_WRITE_ZEROES

2017-04-05 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke --- drivers/scsi/sd.c | 31 ++- drivers/scsi/sd_zbc.c | 1 + 2 files changed, 27 insertions(+), 5 deletions(-)

[PATCH 05/27] md: support REQ_OP_WRITE_ZEROES

2017-04-05 Thread Christoph Hellwig
Copy & paste from the REQ_OP_WRITE_SAME code. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- drivers/md/linear.c| 1 + drivers/md/md.h| 7 +++ drivers/md/multipath.c | 1 + drivers/md/raid0.c | 2 ++ drivers/md/raid1.c | 4

[PATCH 03/27] block: implement splitting of REQ_OP_WRITE_ZEROES bios

2017-04-05 Thread Christoph Hellwig
Copy and past the REQ_OP_WRITE_SAME code to prepare to implementations that limit the write zeroes size. Signed-off-by: Christoph Hellwig Reviewed-by: Martin K. Petersen Reviewed-by: Hannes Reinecke --- block/blk-merge.c | 17

[PATCH 06/27] dm io: discards don't take a payload

2017-04-05 Thread Christoph Hellwig
Fix up do_region to not allocate a bio_vec for discards. We've got rid of the discard payload allocated by the caller years ago. Obviously this wasn't actually harmful given how long it's been there, but it's still good to avoid the pointless allocation. Signed-off-by: Christoph Hellwig

[PATCH 07/27] dm: support REQ_OP_WRITE_ZEROES

2017-04-05 Thread Christoph Hellwig
Copy & paste from the REQ_OP_WRITE_SAME code. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- drivers/md/dm-core.h | 1 + drivers/md/dm-io.c| 8 ++-- drivers/md/dm-linear.c| 1 + drivers/md/dm-mpath.c |

[PATCH 08/27] dm kcopyd: switch to use REQ_OP_WRITE_ZEROES

2017-04-05 Thread Christoph Hellwig
It seems like the code currently passes whatever it was using for writes to WRITE SAME. Just switch it to WRITE ZEROES, although that doesn't need any payload. Untested, and confused by the code, maybe someone who understands it better than me can help.. Signed-off-by: Christoph Hellwig

[PATCH 17/27] loop: implement REQ_OP_WRITE_ZEROES

2017-04-05 Thread Christoph Hellwig
It's identical to discard as hole punches will always leave us with zeroes on reads. Signed-off-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- drivers/block/loop.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/block/loop.c

  1   2   >