[ANNOUNCE]: SCST 3.3 pre-release freeze

2017-08-31 Thread Vladislav Bolkhovitin
Hi All, I'm glad to announce SCST 3.3 pre-release code freeze in the SCST SVN branch 3.3.x. You can get it by command: $ svn co https://scst.svn.sourceforge.net/svnroot/scst/branches/3.3.x It is going to be released after few weeks of testing, if no significant issues found. SCST is

Re: [PATCH 8/9] block: allow to allocate req with REQF_PREEMPT when queue is frozen

2017-08-31 Thread Ming Lei
On Thu, Aug 31, 2017 at 10:50:25PM +, Bart Van Assche wrote: > On Fri, 2017-09-01 at 01:27 +0800, Ming Lei wrote: > > @@ -1413,9 +1414,17 @@ static struct request *blk_old_get_request(struct > > request_queue *q, > > /* create ioc upfront */ > > create_io_context(gfp_mask, q->node); >

Re: [PATCH 3/9] blk-mq: rename blk_mq_freeze_queue as blk_freeze_queue

2017-08-31 Thread Ming Lei
On Thu, Aug 31, 2017 at 10:35:50PM +, Bart Van Assche wrote: > On Fri, 2017-09-01 at 01:27 +0800, Ming Lei wrote: > > This APIs will be used by legacy path too. > > Hello Ming, > > Had you already considered to combine patches 2/9 and 3/9 into a single patch? Either way is fine for me, and

Re: [PATCH 6/9] blk-mq: rename blk_mq_freeze_queue_wait as blk_freeze_queue_wait

2017-08-31 Thread Ming Lei
On Thu, Aug 31, 2017 at 10:37:46PM +, Bart Van Assche wrote: > On Fri, 2017-09-01 at 01:27 +0800, Ming Lei wrote: > > The only change on legacy is that blk_drain_queue() is run > > from blk_freeze_queue(), which is called in blk_cleanup_queue(). > > > > So this patch removes the explicite

Re: [PATCH 5/9] block: introduce blk_drain_queue()

2017-08-31 Thread Ming Lei
On Thu, Aug 31, 2017 at 10:34:49PM +, Bart Van Assche wrote: > On Fri, 2017-09-01 at 01:27 +0800, Ming Lei wrote: > > So that we can support legacy version of freezing queue, > > which is required by safe SCSI quiescing. > > > > Signed-off-by: Ming Lei > > --- > >

Re: [PATCH 1/9] percpu-refcount: introduce percpu_ref_is_dead()

2017-08-31 Thread Ming Lei
On Thu, Aug 31, 2017 at 11:07:30PM +, Bart Van Assche wrote: > On Fri, 2017-09-01 at 01:27 +0800, Ming Lei wrote: > > Inside block layer, we need to support to allocate request with > > RQF_PREEMPT even though queue is frozen. > > Hello Ming, > > Can patch 8/9 be reworked such that it

Re: [PATCH 0/9] block/scsi: safe SCSI quiescing

2017-08-31 Thread Ming Lei
On Thu, Aug 31, 2017 at 08:31:54PM +0200, Oleksandr Natalenko wrote: > Tested against v4.13-rc7. With this patchset it looks like I/O doesn't hang, > but once (just once, not each time) I've got the following stacktrace on > resume: That looks not bad, and thanks for your test! Could you try

Re: [PATCH V2 1/2] scsi: sd: Fix sd_config_write_same()

2017-08-31 Thread Martin K. Petersen
Damien, > + if (sdkp->max_ws_blocks && > + sdkp->physical_block_size > logical_block_size) { > + /* > + * Reporting a maximum number of blocks that is not aligned > + * on the device physical size would cause a large write same > + *

Re: [PATCH V2 2/2] scsi: sd: Use sectors_to_logical()

2017-08-31 Thread Martin K. Petersen
Damien, > Replace open coded conversions. I have a pending sd.c cleanup that already does this. I may slip your patch in and rework my series on top of it. We'll see. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH v4 00/14] mpt3sas driver NVMe support:

2017-08-31 Thread Martin K. Petersen
Hi Suganath, > Let me explain - NVME device fast path is possible in two ways. IEEE > SGL and PRP SGL. Due to h/w constraint we choose IEEE SGL only for > smaller IO size. Both above is true h/w Fast Path and no firmware > involvement. > Agree with you. We are planning to see if we can keep

Re: [PATCH v3 0/4] Improve requeuing behavior

2017-08-31 Thread Martin K. Petersen
Bart, > The conclusion of a recent discussion is that .jiffies_at_alloc and > .retries should be set once at the start of a lifetime of a SCSI > request instead of every time a request is requeued. This patch series > realizes that and also ensures that a request is unprepared and > reprepared

[PATCH V2 2/2] scsi: sd: Use sectors_to_logical()

2017-08-31 Thread Damien Le Moal
Replace open coded conversions. Signed-off-by: Damien Le Moal --- drivers/scsi/sd.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index e7d1eed4afa7..84fab90fe2cb 100644 --- a/drivers/scsi/sd.c

[PATCH V2 1/2] scsi: sd: Fix sd_config_write_same()

2017-08-31 Thread Damien Le Moal
Reporting a maximum number of blocks that is not aligned on the device physical size would cause a large write same request to be split into physically unaligned chunks by __blkdev_issue_write_zeroes() and __blkdev_issue_write_same(), even if the caller of these functions took care to align its

[PATCH V2 0/2] sd fixes and cleanup

2017-08-31 Thread Damien Le Moal
A couple of patches in this small series. The first patch addresses a problem with large write same (or zeroout) block layer calls being split into commands that are not aligned on the device physical block size. This will work on regular disks but is not optimal. The commands will however fail

[PATCH 2/2] scsi: sd: Use sectors_to_logical()

2017-08-31 Thread Damien Le Moal
Replace open coded conversions. Signed-off-by: Damien Le Moal --- drivers/scsi/sd.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index f6c205200c5b..a32bf434cb3d 100644 --- a/drivers/scsi/sd.c

[PATCH 1/2] scsi: sd: Fix sd_config_write_same()

2017-08-31 Thread Damien Le Moal
Reporting a maximum number of blocks that is not aligned on the device physical size would cause a large write same request to be split into physically unaligned chunks by __blkdev_issue_write_zeroes() and __blkdev_issue_write_same(), even if the caller of these functions took care to align its

[PATCH 0/2] sd fixes and cleanup

2017-08-31 Thread Damien Le Moal
A couple of patches in this small series. The first patch addresses a problem with large write same (or zeroout) block layer calls being split into commands that are not aligned on the device physical block size. This will work on regular disks but is not optimal. The commands will however fail

Re: [PATCH 19/31] timer: Remove open-coded casts for .data and .function

2017-08-31 Thread Tyrel Datwyler
On 08/31/2017 04:29 PM, Kees Cook wrote: > This standardizes the callback and data prototypes in several places that > perform casting, in an effort to remove more open-coded .data and > .function uses in favor of setup_timer(). > > Cc: Samuel Ortiz > Cc: Tyrel Datwyler

Re: [PATCH 19/31] timer: Remove open-coded casts for .data and .function

2017-08-31 Thread Tyrel Datwyler
On 08/31/2017 04:29 PM, Kees Cook wrote: > This standardizes the callback and data prototypes in several places that > perform casting, in an effort to remove more open-coded .data and > .function uses in favor of setup_timer(). > > Cc: Samuel Ortiz > Cc: Tyrel Datwyler

[PATCH] Remove Scsi_Host.uspace_req_q

2017-08-31 Thread Bart Van Assche
A patch I wrote myself several years ago removed SCSI target support from the code under drivers/scsi. That patch removed the code that sets uspace_req_q to a non-NULL value. Hence also remove the code that depends on uspace_req_q != NULL. References: commit 066465251303 ("tgt: removal")

[PATCH 19/31] timer: Remove open-coded casts for .data and .function

2017-08-31 Thread Kees Cook
This standardizes the callback and data prototypes in several places that perform casting, in an effort to remove more open-coded .data and .function uses in favor of setup_timer(). Cc: Samuel Ortiz Cc: Tyrel Datwyler Cc: Benjamin Herrenschmidt

[PATCH 29/31] scsi/bnx2i: Initialize timer

2017-08-31 Thread Kees Cook
There was a seemingly missing call to setup_timer() in one handler, so add setup_timer() here to remove the open-coded initialization. Cc: qlogic-storage-upstr...@qlogic.com Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc:

[PATCH 18/31] scsi/aic7xxx: Clean up timer usage

2017-08-31 Thread Kees Cook
stat_timer only ever assigns the same function and data, so consolidate to a setup_timer() call and drop everything else used to pass things around. reset_timer is unused; remove it. Cc: Hannes Reinecke Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen"

Re: [PATCH 1/9] percpu-refcount: introduce percpu_ref_is_dead()

2017-08-31 Thread Bart Van Assche
On Fri, 2017-09-01 at 01:27 +0800, Ming Lei wrote: > Inside block layer, we need to support to allocate request with > RQF_PREEMPT even though queue is frozen. Hello Ming, Can patch 8/9 be reworked such that it doesn't need the new percpu_ref_is_dead() helper function, e.g. by checking

Re: [PATCH 8/9] block: allow to allocate req with REQF_PREEMPT when queue is frozen

2017-08-31 Thread Bart Van Assche
On Fri, 2017-09-01 at 01:27 +0800, Ming Lei wrote: > @@ -1413,9 +1414,17 @@ static struct request *blk_old_get_request(struct > request_queue *q, > /* create ioc upfront */ > create_io_context(gfp_mask, q->node); > > - ret = blk_queue_enter(q, !(gfp_mask &

Re: [PATCH 6/9] blk-mq: rename blk_mq_freeze_queue_wait as blk_freeze_queue_wait

2017-08-31 Thread Bart Van Assche
On Fri, 2017-09-01 at 01:27 +0800, Ming Lei wrote: > The only change on legacy is that blk_drain_queue() is run > from blk_freeze_queue(), which is called in blk_cleanup_queue(). > > So this patch removes the explicite __blk_drain_queue() in > blk_cleanup_queue(). Hello Ming, Shouldn't the

Re: [PATCH 3/9] blk-mq: rename blk_mq_freeze_queue as blk_freeze_queue

2017-08-31 Thread Bart Van Assche
On Fri, 2017-09-01 at 01:27 +0800, Ming Lei wrote: > This APIs will be used by legacy path too. Hello Ming, Had you already considered to combine patches 2/9 and 3/9 into a single patch? Thanks, Bart.

Re: [PATCH 5/9] block: introduce blk_drain_queue()

2017-08-31 Thread Bart Van Assche
On Fri, 2017-09-01 at 01:27 +0800, Ming Lei wrote: > So that we can support legacy version of freezing queue, > which is required by safe SCSI quiescing. > > Signed-off-by: Ming Lei > --- > block/blk-core.c | 16 > include/linux/blkdev.h | 1 + > 2

Re: [PATCH 0/9] block/scsi: safe SCSI quiescing

2017-08-31 Thread Oleksandr Natalenko
Tested against v4.13-rc7. With this patchset it looks like I/O doesn't hang, but once (just once, not each time) I've got the following stacktrace on resume: === [ 55.577173] ata1.00: Security Log not supported [ 55.580690] ata1.00: configured for UDMA/100 [ 55.582257] [ cut

Re: [PATCH 0/9] block/scsi: safe SCSI quiescing

2017-08-31 Thread Oleksandr Natalenko
Since I'm in CC, does this series aim to replace 2 patches I've tested before: blk-mq: add requests in the tail of hctx->dispatch blk-mq: align to legacy's implementation of blk_execute_rq ? On čtvrtek 31. srpna 2017 19:27:19 CEST Ming Lei wrote: > The current SCSI quiesce isn't safe and easy

Re: [PATCH 0/9] block/scsi: safe SCSI quiescing

2017-08-31 Thread Ming Lei
On Thu, Aug 31, 2017 at 07:34:06PM +0200, Oleksandr Natalenko wrote: > Since I'm in CC, does this series aim to replace 2 patches I've tested before: > > blk-mq: add requests in the tail of hctx->dispatch > blk-mq: align to legacy's implementation of blk_execute_rq > > ? Yeah, this solution is

[PATCH 1/9] percpu-refcount: introduce percpu_ref_is_dead()

2017-08-31 Thread Ming Lei
Inside block layer, we need to support to allocate request with RQF_PREEMPT even though queue is frozen. So introduce this helper for checking if queue is frozen. Cc: Tejun Heo Signed-off-by: Ming Lei --- include/linux/percpu-refcount.h | 17

[PATCH 8/9] block: allow to allocate req with REQF_PREEMPT when queue is frozen

2017-08-31 Thread Ming Lei
REQF_PREEMPT is a bit special because it is required to be dispatched to lld even when SCSI device is quiesced. So this patch introduces __blk_get_request() to allow block layer to allocate request when queue is frozen, since we will freeze queue before quiescing SCSI device in the following

[PATCH 9/9] SCSI: freeze block queue when SCSI device is put into quiesce

2017-08-31 Thread Ming Lei
Simply quiesing SCSI device and waiting for completeion of IO dispatched to SCSI queue isn't safe, it is easy to use up requests because all these allocated requests can't be dispatched when device is put in QIUESCE. Then no request can be allocated for RQF_PREEMPT, and system may hang somewhere,

[PATCH 7/9] block: tracking request allocation with q_usage_counter

2017-08-31 Thread Ming Lei
This usage is basically same with blk-mq, so that we can support to freeze queue easily. Signed-off-by: Ming Lei --- block/blk-core.c | 8 1 file changed, 8 insertions(+) diff --git a/block/blk-core.c b/block/blk-core.c index 7a9f93889669..a84672f4db32 100644 ---

[PATCH 6/9] blk-mq: rename blk_mq_freeze_queue_wait as blk_freeze_queue_wait

2017-08-31 Thread Ming Lei
The only change on legacy is that blk_drain_queue() is run from blk_freeze_queue(), which is called in blk_cleanup_queue(). So this patch removes the explicite __blk_drain_queue() in blk_cleanup_queue(). Signed-off-by: Ming Lei --- block/blk-core.c | 2 --

[PATCH 5/9] block: introduce blk_drain_queue()

2017-08-31 Thread Ming Lei
So that we can support legacy version of freezing queue, which is required by safe SCSI quiescing. Signed-off-by: Ming Lei --- block/blk-core.c | 16 include/linux/blkdev.h | 1 + 2 files changed, 17 insertions(+) diff --git a/block/blk-core.c

[PATCH 4/9] blk-mq: only run hw queues for blk-mq

2017-08-31 Thread Ming Lei
This patch just makes it explicitely. Signed-off-by: Ming Lei --- block/blk-mq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 8cf1f7cbef2b..4c532d8612e1 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -125,7

[PATCH 3/9] blk-mq: rename blk_mq_freeze_queue as blk_freeze_queue

2017-08-31 Thread Ming Lei
This APIs will be used by legacy path too. Signed-off-by: Ming Lei --- block/bfq-iosched.c | 2 +- block/blk-cgroup.c | 4 ++-- block/blk-mq.c | 17 - block/blk-mq.h | 1 - block/elevator.c | 2 +-

[PATCH 2/9] blk-mq: rename blk_mq_unfreeze_queue as blk_unfreeze_queue

2017-08-31 Thread Ming Lei
We will support to freeze queue on block legacy path too. Signed-off-by: Ming Lei --- block/blk-cgroup.c | 4 ++-- block/blk-mq.c | 10 +- block/elevator.c | 2 +- drivers/block/loop.c | 8 drivers/nvme/host/core.c | 4 ++--

[PATCH 0/9] block/scsi: safe SCSI quiescing

2017-08-31 Thread Ming Lei
The current SCSI quiesce isn't safe and easy to trigger I/O deadlock. Once SCSI device is put into QUIESCE, no new request except for RQF_PREEMPT can be dispatched to SCSI successfully, and scsi_device_quiesce() just simply waits for completion of I/Os dispatched to SCSI stack. It isn't enough at

Re: [PATCH RESEND] libsas: Fixup device_del() inversion

2017-08-31 Thread John Garry
On 31/08/2017 10:20, Hannes Reinecke wrote: (resending to include linux-scsi) When removing the HBA or port there's a device_del() inversion in sas_deform_port(). If there's only one phy it will call sas_unregister_domain_devices(), which in turn might remove any phys and end_devices

Re: [PATCH v4 3/3] Rework handling of scsi_device.vpd_pg8[03]

2017-08-31 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH v4 2/3] Rework the code for caching Vital Product Data (VPD)

2017-08-31 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH v3 4/4] scsi-mq: Always unprepare before requeuing a request

2017-08-31 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH v3 3/4] Show .retries and .jiffies_at_alloc in debugfs

2017-08-31 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH v3 2/4] Improve requeuing behavior

2017-08-31 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH v3 1/4] Call scsi_initialize_rq() also for filesystem requests

2017-08-31 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH v2 1/3] Call scsi_initialize_rq() also for filesystem requests

2017-08-31 Thread h...@lst.de
On Wed, Aug 30, 2017 at 09:13:00PM +, Bart Van Assche wrote: > On Wed, 2017-08-30 at 10:29 +0200, Christoph Hellwig wrote: > > Looks good except for the subject, which will need a little update: > > Hello Christoph, > > Thanks for the review. Sorry but I don't see what's wrong with the

[PATCH RESEND] libsas: Fixup device_del() inversion

2017-08-31 Thread Hannes Reinecke
(resending to include linux-scsi) When removing the HBA or port there's a device_del() inversion in sas_deform_port(). If there's only one phy it will call sas_unregister_domain_devices(), which in turn might remove any phys and end_devices asynchronously via the DISCE_DESTRUCT event. But then it

[PATCH 0/3] fcoe: Fixup device_del() inversion

2017-08-31 Thread Hannes Reinecke
Hi all, when shutting down an FCoE target system one is greeted with a flood of kernel warnings about sysfs group 81eff0e0 not found for kobject 'XXX' Reason here is that the fcoe driver tries to remove devices from a workqueue, but the NETDEV_UNREGISTER notification expects any calls

[PATCH 2/3] fcoe: separate out fcoe_vport_remove()

2017-08-31 Thread Hannes Reinecke
Separate out fcoe_vport_remove() from fcoe_destroy_work(). No functional change. Signed-off-by: Hannes Reinecke --- drivers/scsi/fcoe/fcoe.c | 55 +--- 1 file changed, 33 insertions(+), 22 deletions(-) diff --git

[PATCH 1/3] fcoe: move fcoe_interface_remove() out of fcoe_interface_cleanup()

2017-08-31 Thread Hannes Reinecke
No functional change. Signed-off-by: Hannes Reinecke --- drivers/scsi/fcoe/fcoe.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 85f9a3e..135bdcf 100644 --- a/drivers/scsi/fcoe/fcoe.c +++

[PATCH 3/3] fcoe: open-code fcoe_destroy_work() for NETDEV_UNREGISTER

2017-08-31 Thread Hannes Reinecke
When a NETDEV_UNREGISTER notification is received the network device is _deleted_ after the callback returns. So we cannot use a workqueue here, as this would cause an inversion when removing the device as the netdev is already gone. This manifests with a nasty warning during shutdown: sysfs

Re: [PATCH v3 4/4] scsi-mq: Always unprepare before requeuing a request

2017-08-31 Thread Johannes Thumshirn
Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB

Re: [PATCH v3 3/4] Show .retries and .jiffies_at_alloc in debugfs

2017-08-31 Thread Johannes Thumshirn
Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB

Re: [PATCH v3 2/4] Improve requeuing behavior

2017-08-31 Thread Johannes Thumshirn
Thanks, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham

Re: [PATCH v3 1/4] Call scsi_initialize_rq() also for filesystem requests

2017-08-31 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham