Re: [PATCH V2 0/2] block/scsi/dm-rq: fix leak of request private data in dm-mpath

2019-07-26 Thread Benjamin Block
, see the following link: > > https://lore.kernel.org/linux-block/f122e8f2-5ede-2d83-9ca0-bc713ce66...@huawei.com/T/#t > > V2: > - run .cleanup_rq() in blk_mq_free_request(), as suggested by Mike -- With Best Regards, Benjamin Block / Linux on IBM Z Kernel Development IBM Syste

Re: [PATCH 0/3] zfcp: fixes for the zFCP device driver

2019-07-12 Thread Benjamin Block
x. Applied the series to 5.3/scsi-fixes. Thanks! > Thanks Martin. -- With Best Regards, Benjamin Block / Linux on IBM Z Kernel Development IBM Systems & Technology Group / IBM Deutschland Research & Development GmbH Vorsitz. AufsR.: Matthias Hartmann / Geschäfts

[PATCH 3/3] zfcp: fix GCC compiler warning emitted with -Wmaybe-uninitialized

2019-07-02 Thread Benjamin Block
extended and no explicit case be introduced. See also v5.0 commit 399b6c8bc9f7 ("scsi: zfcp: drop old default switch case which might paper over missing case"). Signed-off-by: Benjamin Block Reviewed-by: Jens Remus Reviewed-by: Steffen Maier --- drivers/s390/scsi/zfcp_erp.c

[PATCH 2/3] zfcp: fix request object use-after-free in send path causing wrong traces

2019-07-02 Thread Benjamin Block
-free in send path causing seqno errors" ). To fix this add a new variable that caches the request-ID before sending the request. This won't change during the hand-off to the FCP channel, and so it's safe to trace this cached request-ID later, instead of using the request object. Sig

[PATCH 1/3] zfcp: fix request object use-after-free in send path causing seqno errors

2019-07-02 Thread Benjamin Block
he same kind less likely, add comments to all closely related code-paths. Signed-off-by: Benjamin Block Fixes: f9eca0227600 ("scsi: zfcp: drop duplicate fsf_command from zfcp_fsf_req which is also in QTCB header") Cc: #5.0+ Reviewed-by: Steffen Maier Reviewed-by: Jens Remus ---

[PATCH 0/3] zfcp: fixes for the zFCP device driver

2019-07-02 Thread Benjamin Block
cycle. Or should I not have send them in that case? Sorry, this step of the process was a bit unclear to me. The first patch is the "most urgent" of the three, although nothing too terrible happens if we hit it. Reviews are welcome from everyone, obviously. Benjamin Block (3): zf

Re: [PATCH V3 09/15] s390: zfcp_fc: use sg helper to operate scatterlist

2019-06-16 Thread Benjamin Block
e-allocated one > isn't enough for the whole request. > > Cc: Steffen Maier > Cc: Benjamin Block > Cc: Martin Schwidefsky > Cc: Heiko Carstens > Cc: linux-s...@vger.kernel.org > Signed-off-by: Ming Lei > --- > drivers/s390/scsi/zfcp_fc.c | 4 ++-- > 1 fi

Re: [PATCH V2 09/15] s390: zfcp_fc: use sg helper to operate sgl

2019-06-13 Thread Benjamin Block
On Thu, Jun 13, 2019 at 03:13:29PM +0800, Ming Lei wrote: > The current way isn't safe for chained sgl, so use sg helper to > operate sgl. > > Cc: Steffen Maier > Cc: Benjamin Block > Cc: Martin Schwidefsky > Cc: Heiko Carstens > Cc: linux-s...@vger.kernel.

Re: [PATCH 07/10] zfcp: implicitly refresh port-data diagnostics when reading SysFS

2019-04-10 Thread Benjamin Block
On Tue, Apr 09, 2019 at 06:50:50PM +0200, Benjamin Block wrote: > This patch adds implicit updates to the SysFS entries that read the > diagnostic data stored in the "caching buffer" for Exchange Port Data. > > An update is triggered once the buffer is older than ZFCP_DIAG_

[PATCH 01/10] zfcp: signal incomplete or error for sync exchange config/port data

2019-04-09 Thread Benjamin Block
Reviewed-by: Steffen Maier Signed-off-by: Benjamin Block --- drivers/s390/scsi/zfcp_def.h | 1 + drivers/s390/scsi/zfcp_fsf.c | 52 -- drivers/s390/scsi/zfcp_scsi.c | 4 ++-- drivers/s390/scsi/zfcp_sysfs.c | 4 ++-- 4 files changed, 50 insertions(+), 1

[PATCH 02/10] zfcp: remove option to pass NULL to sync exchange config/port data

2019-04-09 Thread Benjamin Block
received with the commands. Hence to cleanup and simplify the code a bit, remove the optional part and make it mandatory. Reviewed-by: Steffen Maier Signed-off-by: Benjamin Block --- drivers/s390/scsi/zfcp_fsf.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a

[PATCH 07/10] zfcp: implicitly refresh port-data diagnostics when reading SysFS

2019-04-09 Thread Benjamin Block
eviewed-by: Steffen Maier Signed-off-by: Benjamin Block --- drivers/s390/scsi/zfcp_diag.c | 136 + drivers/s390/scsi/zfcp_diag.h | 11 drivers/s390/scsi/zfcp_sysfs.c | 5 ++ 3 files changed, 152 insertions(+) diff --git a/drivers/s390/scsi/zfcp_diag.c

[PATCH 05/10] zfcp: support retrieval of SFP Data via Exchange Port Data

2019-04-09 Thread Benjamin Block
-by: Steffen Maier Signed-off-by: Benjamin Block --- drivers/s390/scsi/zfcp_fsf.c | 6 -- drivers/s390/scsi/zfcp_fsf.h | 21 - 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index e23bb0948740

[PATCH 03/10] zfcp: diagnostics buffer caching and use for exchange port data

2019-04-09 Thread Benjamin Block
when the data is too old and needs to be updated. Buffer-updates are made during the normal response path of the corresponding command. With this patch only the output of the Exchange Port Data command is captured. Reviewed-by: Steffen Maier Signed-off-by: Benjamin Block --- drivers/s390/scsi

[PATCH 09/10] zfcp: introduce SysFS interface to read the local B2B-Credit

2019-04-09 Thread Benjamin Block
red during completion of a previous Exchange Config Data command). Implicit updating will follow later in this series. Reviewed-by: Steffen Maier Signed-off-by: Benjamin Block --- drivers/s390/scsi/zfcp_sysfs.c | 40 1 file changed, 40 insertions(+) di

[PATCH 10/10] zfcp: implicitly refresh config-data diagnostics when reading SysFS

2019-04-09 Thread Benjamin Block
: Steffen Maier Signed-off-by: Benjamin Block --- drivers/s390/scsi/zfcp_diag.c | 37 + drivers/s390/scsi/zfcp_diag.h | 1 + drivers/s390/scsi/zfcp_sysfs.c | 5 + 3 files changed, 43 insertions(+) diff --git a/drivers/s390/scsi/zfcp_diag.c b/drivers/s390

[PATCH 08/10] zfcp: move maximum age of diagnostic buffers into a module-parameter

2019-04-09 Thread Benjamin Block
userspace accesses can also be completely removed. This parameter affects all diagnostic buffers in the same way. Reviewed-by: Steffen Maier Signed-off-by: Benjamin Block --- drivers/s390/scsi/zfcp_diag.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/s390

[PATCH 04/10] zfcp: add diagnostics buffer for exchange config data

2019-04-09 Thread Benjamin Block
In the same vein as the previous patch, add diagnostic data capture for the Exchange Config Data command. Reviewed-by: Steffen Maier Signed-off-by: Benjamin Block --- drivers/s390/scsi/zfcp_diag.c | 14 -- drivers/s390/scsi/zfcp_diag.h | 7 +++ drivers/s390/scsi/zfcp_fsf.c

[PATCH 00/10] zfcp: support retrieval of local RDP data

2019-04-09 Thread Benjamin Block
, I can point it out on the list once I have something that has at least a minimum set of functionality. Benjamin Block (10): zfcp: signal incomplete or error for sync exchange config/port data zfcp: remove option to pass NULL to sync exchange config/port data zfcp: diagnostics buffer

[PATCH 06/10] zfcp: introduce SysFS interface for diagnostics of local SFP transceiver

2019-04-09 Thread Benjamin Block
Maier Signed-off-by: Benjamin Block --- drivers/s390/scsi/zfcp_aux.c | 4 +++ drivers/s390/scsi/zfcp_diag.c | 42 + drivers/s390/scsi/zfcp_diag.h | 18 +++ drivers/s390/scsi/zfcp_ext.h | 1 + drivers/s390/scsi/zfcp_sysfs.c | 71 +++

[PATCH v2 1/2] scsi: replace GFP_ATOMIC with GFP_KERNEL for allocations in scsi_scan.c

2019-02-21 Thread Benjamin Block
ances of reclaim. Signed-off-by: Benjamin Block --- drivers/scsi/scsi_scan.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index dd0d516f65e2..53380e07b40e 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers

[PATCH v2 2/2] scsi: whitespace cleanup in scsi_scan.c

2019-02-21 Thread Benjamin Block
Noticed during editing that vim would remove some trailing spaces. Signed-off-by: Benjamin Block --- drivers/scsi/scsi_scan.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index 53380e07b40e..7e1a6c3dd42c

Re: [PATCH] scsi: replace GFP_ATOMIC with GFP_KERNEL for sdev allocation

2019-02-20 Thread Benjamin Block
On Wed, Feb 20, 2019 at 11:11:31AM -0800, Bart Van Assche wrote: > On Wed, 2019-02-20 at 19:48 +0100, Benjamin Block wrote: > > We had a test-report where, under memory pressure, adding LUNs to the > > systems would fail (the tests add LUNs strictly in sequence): > > Hi Ben

[PATCH] scsi: replace GFP_ATOMIC with GFP_KERNEL for sdev allocation

2019-02-20 Thread Benjamin Block
es no sleeping, as far as I could see. Additionally, the code that allocates the block queue for the device later (scsi_mq_alloc_queue()) already uses GFP_KERNEL. So replace it, and give the allocation a bit of a better chance to succeed, with more ways of reclaim. Signed-off-by: Benjamin

Re: Question on handling managed IRQs when hotplugging CPUs

2019-02-06 Thread Benjamin Block
amp;m=154831889001973&w=2 discusses some of them > also. > Especially the TMFs send via SCSI EH are a bit of a pain I guess, because they are entirely managed by the device drivers, but depending on the device driver they might not even qualify for the problem Hannes is seeing. -- With Best Rega

Re: [LSF/MM TOPIC] SCSI Error Handling and HBA Recovery

2019-01-24 Thread Benjamin Block
ansport recovery.. So e.g. EH wants to send a TUR (in EH) to a rport for which we just now do recovery for, then EH will fail, because we can't physically service that TUR right then, and EH will escalate, possibly with bad timing till it forces us through adapter recovery, which then faults

Re: [PATCH 6/8] bsg-lib: handle bidi requests without block layer help

2018-11-14 Thread Benjamin Block
On Wed, Nov 14, 2018 at 04:48:57PM +0100, Christoph Hellwig wrote: > On Tue, Nov 13, 2018 at 03:35:20PM +0100, Benjamin Block wrote: > > This seems like a non-obvious user-breakage. So apart from removing the > > in-kernel stuff that uses bidirectional commands you also forbid >

Re: [PATCH 6/8] bsg-lib: handle bidi requests without block layer help

2018-11-13 Thread Benjamin Block
every using them? That seems wrong to me. There is other SCSI Command Sets than OSD that provide bidirectional commands, even SBC has some (i.e. X*WRITE*, COMPARE AND WRITE). -- With Best Regards, Benjamin Block / Linux on IBM Z Kernel Development IBM Systems & Technol

Re: [PATCH 5/8] bsg: refactor bsg_ioctl

2018-11-13 Thread Benjamin Block
> 1 file changed, 72 insertions(+), 86 deletions(-) > Looks fine to me. Did ran the same small test-tool I ran against Jens' patches, nothing broke. Reviewed-by: Benjamin Block Tested-by: Benjamin Block -- With Best Regards, Benjamin Block / Linux on IBM Z Kernel Develop

Re: [PATCH] bsg: convert to use blk-mq

2018-10-26 Thread Benjamin Block
On Fri, Oct 26, 2018 at 10:08:30AM -0600, Jens Axboe wrote: > On 10/26/18 10:06 AM, Benjamin Block wrote: > > On Thu, Oct 25, 2018 at 05:12:59PM -0600, Jens Axboe wrote: > >> On 10/23/18 12:07 PM, Jens Axboe wrote: > >>> On 10/23/18 11:40 AM, Benjamin Block wrote: &

Re: [PATCH] bsg: convert to use blk-mq

2018-10-26 Thread Benjamin Block
On Thu, Oct 25, 2018 at 05:12:59PM -0600, Jens Axboe wrote: > On 10/23/18 12:07 PM, Jens Axboe wrote: > > On 10/23/18 11:40 AM, Benjamin Block wrote: > >> > >> So I tried 4.19.0 with only the two patches from you: > >> http://git.kernel.dk/cgit/lin

Re: [PATCH] bsg: convert to use blk-mq

2018-10-23 Thread Benjamin Block
On Mon, Oct 22, 2018 at 06:38:36AM -0600, Jens Axboe wrote: > On 10/22/18 4:03 AM, Benjamin Block wrote: > > On Fri, Oct 19, 2018 at 09:50:53AM -0600, Jens Axboe wrote: > > > > Ok so, that gets past the stage where we initialize the queues. Simple > > SCSI-I/O also

Re: [PATCH] bsg: convert to use blk-mq

2018-10-22 Thread Benjamin Block
On Mon, Oct 22, 2018 at 06:38:36AM -0600, Jens Axboe wrote: > On 10/22/18 4:03 AM, Benjamin Block wrote: > > On Fri, Oct 19, 2018 at 09:50:53AM -0600, Jens Axboe wrote: > >> On 10/19/18 9:01 AM, Benjamin Block wrote: > >>> On Wed, Oct 17, 2018 at 10:01:16AM -0600, Jen

Re: [PATCH] bsg: convert to use blk-mq

2018-10-22 Thread Benjamin Block
On Fri, Oct 19, 2018 at 09:50:53AM -0600, Jens Axboe wrote: > On 10/19/18 9:01 AM, Benjamin Block wrote: > > On Wed, Oct 17, 2018 at 10:01:16AM -0600, Jens Axboe wrote: > >> On 10/17/18 9:55 AM, Benjamin Block wrote: > >>> On Tue, Oct 16, 2018 at 08:43:01AM -0600, Jen

Re: [PATCH] bsg: convert to use blk-mq

2018-10-19 Thread Benjamin Block
On Fri, Oct 19, 2018 at 09:50:53AM -0600, Jens Axboe wrote: > On 10/19/18 9:01 AM, Benjamin Block wrote: > > On Wed, Oct 17, 2018 at 10:01:16AM -0600, Jens Axboe wrote: > >> On 10/17/18 9:55 AM, Benjamin Block wrote: > >>> On Tue, Oct 16, 2018 at 08:43:01AM -0600, Jen

Re: [PATCH] bsg: convert to use blk-mq

2018-10-19 Thread Benjamin Block
On Wed, Oct 17, 2018 at 10:01:16AM -0600, Jens Axboe wrote: > On 10/17/18 9:55 AM, Benjamin Block wrote: > > On Tue, Oct 16, 2018 at 08:43:01AM -0600, Jens Axboe wrote: > >> Requires a few changes to the FC transport class as well. > >> > >> Cc: Johannes Thumshi

Re: [PATCH] bsg: convert to use blk-mq

2018-10-17 Thread Benjamin Block
On Tue, Oct 16, 2018 at 08:43:01AM -0600, Jens Axboe wrote: > Requires a few changes to the FC transport class as well. > > Cc: Johannes Thumshirn > Cc: Benjamin Block > Cc: linux-scsi@vger.kernel.org > Signed-off-by: Jens Axboe > --- > block/bsg-lib.

Re: [PATCH 9/9] bsg: split handling of SCSI CDBs vs transport requeues

2017-10-24 Thread Benjamin Block
n the source. Driver makes use of it, but only reading as far as I could make out after browsing the code for a bit. I did a quick test with that change in place and that seems to work fine now. As far as my tests go, they behave as they did before.

Re: [PATCH 9/9] bsg: split handling of SCSI CDBs vs transport requeues

2017-10-20 Thread Benjamin Block
On Fri, Oct 20, 2017 at 06:26:30PM +0200, Christoph Hellwig wrote: > On Thu, Oct 19, 2017 at 05:59:33PM +0200, Benjamin Block wrote: > > > +#define ptr64(val) ((void __user *)(uintptr_t)(val)) > > > > Better to reflect the special property, that it is a user pointer, in &

Re: [PATCH 9/9] bsg: split handling of SCSI CDBs vs transport requeues

2017-10-19 Thread Benjamin Block
ex 736a1f4f9676..4889bd432382 100644 > --- a/drivers/scsi/scsi_transport_sas.c > +++ b/drivers/scsi/scsi_transport_sas.c > @@ -228,7 +228,6 @@ static int sas_bsg_initialize(struct Scsi_Host *shost, > struct sas_rphy *rphy) >*/ > blk_queue_bounce_limit(q, BLK_BOUNCE_

Re: [PATCH 8/9] block: pass full fmode_t to blk_verify_command

2017-10-16 Thread Benjamin Block
mand(cmd, filp->f_mode & FMODE_WRITE); > + return blk_verify_command(cmd, filp->f_mode); > } > > static int > diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h > index 02fa42d24b52..75fe9d45ead1 100644 > --- a/include/linux/blkdev.h > +++ b/inc

Re: [PATCH 7/9] bsg-lib: remove bsg_job.req

2017-10-16 Thread Benjamin Block
g-lib.h b/include/linux/bsg-lib.h > index 402223c95ce1..08762d297cbd 100644 > --- a/include/linux/bsg-lib.h > +++ b/include/linux/bsg-lib.h > @@ -40,7 +40,6 @@ struct bsg_buffer { > struct bsg_job { > struct scsi_request sreq; > struct device *dev; > - stru

Re: [PATCH 6/9] bsg-lib: introduce a timeout field in struct bsg_job

2017-10-16 Thread Benjamin Block
x b1be0233ce35..402223c95ce1 100644 > --- a/include/linux/bsg-lib.h > +++ b/include/linux/bsg-lib.h > @@ -44,6 +44,8 @@ struct bsg_job { > > struct kref kref; > > + unsigned int timeout; > + > /* Transpo

[PATCH v2 1/1] bsg-lib: fix use-after-free under memory-pressure

2017-10-01 Thread Benjamin Block
iously done in bsg_init_rq(), and will also do it when the request is taken from the emergency-pool of the backing mempool. Fixes: 50b4d485528d ("bsg-lib: fix kernel panic resulting from missing allocation of reply-buffer") Cc: # 4.11+ Reviewed-by: Christoph Hellwig Signed-off-

Re: [PATCH 1/1] bsg-lib: fix use-after-free under memory-pressure

2017-09-25 Thread Benjamin Block
g names and name the new helper bsg_initialize_rq; > OK, I can change that. Beste Grüße / Best regards, - Benjamin Block > > Except for that the patch looks fine to me: > > Reviewed-by: Christoph Hellwig > -- Linux on

Re: Is the possible cross-talking between unrelated file-descriptors on bsg-device by design?

2017-09-21 Thread Benjamin Block
On Tue, Sep 19, 2017 at 02:16:26PM -0400, Douglas Gilbert wrote: > On 2017-09-19 10:56 AM, Benjamin Block wrote: > > Hello linux-block, > > > > I wrote some tests recently to test patches against bsg.c and bsg-lib.c, > > and while writing those I noticed something str

[PATCH 1/1] bsg-lib: fix use-after-free under memory-pressure

2017-09-21 Thread Benjamin Block
ssing allocation of reply-buffer") Cc: # 4.11+ Signed-off-by: Benjamin Block --- Notes: I did test this on zFCP with FC CT commands send via the ioctl() and write() system-call. That did work fine. But I would very much appreciate if anyone could run this against an other HBA or e

Is the possible cross-talking between unrelated file-descriptors on bsg-device by design?

2017-09-19 Thread Benjamin Block
ng talk short question, is that intended? Beste Grüße / Best regards, - Benjamin Block -- Linux on z Systems Development / IBM Systems & Technology Group IBM Deutschland Research & Deve

Re: [PATCH 1/2] bsg-lib: fix kernel panic resulting from missing allocation of reply-buffer

2017-09-06 Thread Benjamin Block
On Wed, Sep 06, 2017 at 08:07:43AM -0600, Jens Axboe wrote: > On 09/06/2017 07:44 AM, Christoph Hellwig wrote: > > From: Benjamin Block > > > > Since we split the scsi_request out of struct request bsg fails to > > provide a reply-buffer for the drivers. This was d

Re: [PATCH v2 1/1] bsg-lib: fix kernel panic resulting from missing allocation of reply-buffer

2017-08-24 Thread Benjamin Block
t doesn't really itself destroy the job-struct anymore. If there are other thing amiss I can change that along with them, if it bothers poeple. Beste Grüße / Best regards, - Benjamin Block

[PATCH v2 0/1] bsg: fix regression resulting in panics when sending commands via BSG

2017-08-23 Thread Benjamin Block
' for-next. Reviews are more than welcome :) Beste Grüße / Best regards, - Benjamin Block Benjamin Block (1): bsg-lib: fix kernel panic resulting from missing allocation of reply

[PATCH v2 1/1] bsg-lib: fix kernel panic resulting from missing allocation of reply-buffer

2017-08-23 Thread Benjamin Block
n of a buffer for the reply-data. This means, struct bsg_job is not allocated separately anymore, but as part of struct request allocation - similar to struct scsi_cmd. Reflect this in the function names that used to handle creation/destruction of struct bsg_job. Reported-by: Steffen Maier Suggested-

Re: [RFC PATCH 1/6] bsg: fix kernel panic resulting from missing allocation of a reply-buffer

2017-08-14 Thread Benjamin Block
On Sun, Aug 13, 2017 at 04:39:40PM +0200, Christoph Hellwig wrote: > On Fri, Aug 11, 2017 at 06:01:42PM +0200, Benjamin Block wrote: > > When the BSG interface is used with bsg-lib, and the user sends a > > Bidirectional command - so when he gives an input- and output-buffer > &g

Re: [RFC PATCH 1/6] bsg: fix kernel panic resulting from missing allocation of a reply-buffer

2017-08-14 Thread Benjamin Block
ta, which is used as reply buffer in bsg. > > Reported-by: Steffen Maier > Signed-off-by: Benjamin Block > Fixes: 82ed4db499b8 ("block: split scsi_request out of struct request") > Cc: #4.11+ > --- > block/bsg-lib.c | 51 > +++

Re: [RFC PATCH 1/6] bsg: fix kernel panic resulting from missing allocation of a reply-buffer

2017-08-11 Thread Benjamin Block
On Fri, Aug 11, 2017 at 05:35:53PM +0200, Christoph Hellwig wrote: > On Fri, Aug 11, 2017 at 05:32:03PM +0200, Benjamin Block wrote: > > So when the bsg interface is used with something different than the > > bsg-lib request queue? > > Yes. > > > I haven't act

Re: [RFC PATCH 1/6] bsg: fix kernel panic resulting from missing allocation of a reply-buffer

2017-08-11 Thread Benjamin Block
On Fri, Aug 11, 2017 at 04:36:49PM +0200, Christoph Hellwig wrote: > On Fri, Aug 11, 2017 at 03:49:29PM +0200, Benjamin Block wrote: > > On Fri, Aug 11, 2017 at 11:14:15AM +0200, Christoph Hellwig wrote: > > > But patch 1 still creates an additional copy of the sense data for &

Re: [RFC PATCH 1/6] bsg: fix kernel panic resulting from missing allocation of a reply-buffer

2017-08-11 Thread Benjamin Block
n Sep 17 00:00:00 2001 > From: Christoph Hellwig > Date: Fri, 11 Aug 2017 11:03:29 +0200 > Subject: bsg-lib: allocate sense data for each request > > Since we split the scsi_request out of the request the driver is supposed > to provide storage fo

Re: [RFC PATCH 1/6] bsg: fix kernel panic resulting from missing allocation of a reply-buffer

2017-08-10 Thread Benjamin Block
On Fri, Aug 11, 2017 at 12:10:38AM +0200, Benjamin Block wrote: > On Thu, Aug 10, 2017 at 11:32:17AM +0200, Christoph Hellwig wrote: > > We can't use an on-stack buffer for the sense data, as drivers will > > dma to it. So we should reuse the SCSI init_rq_fn() for the B

Re: [RFC PATCH 5/6] bsg: reduce unnecessary arguments for bsg_map_hdr()

2017-08-10 Thread Benjamin Block
On Thu, Aug 10, 2017 at 11:35:31AM +0200, Christoph Hellwig wrote: > On Wed, Aug 09, 2017 at 04:11:19PM +0200, Benjamin Block wrote: > > Since struct bsg_command is now used in every calling case, we don't > > need separation of arguments anymore that are contained in the

Re: [RFC PATCH 4/6] bsg: refactor ioctl to use regular BSG-command infrastructure for SG_IO

2017-08-10 Thread Benjamin Block
On Thu, Aug 10, 2017 at 10:24:56AM +0200, Johannes Thumshirn wrote: > On Wed, Aug 09, 2017 at 04:11:18PM +0200, Benjamin Block wrote: > > + return 0 == (bc->hdr.flags & BSG_FLAG_Q_AT_TAIL); > > return !(bc->hdr.flags & BSG_FLAG_Q_AT_TAIL); and make the function r

Re: [RFC PATCH 1/6] bsg: fix kernel panic resulting from missing allocation of a reply-buffer

2017-08-10 Thread Benjamin Block
uld be best if we fix the possible panics every user of this is gonna experience and after that we can still think about improving it further beyond what the rest of the patch set already does, if that is necessary. Beste Grüße / Best regard

[RFC PATCH 1/6] bsg: fix kernel panic resulting from missing allocation of a reply-buffer

2017-08-09 Thread Benjamin Block
(null) INFO: lockdep is turned off. Last Breaking-Event-Address: [<03ff801e41d6>] zfcp_fc_ct_job_handler+0x3e/0x48 [zfcp] Kernel panic - not syncing: Fatal exception in interrupt To prevent this, allocate a buffer when the BSG blk-request is setup, and before it is queued for LLD processi

[RFC PATCH 0/6] bsg: fix regression resulting in panics when sending commands via BSG and some sanity cleanups

2017-08-09 Thread Benjamin Block
390/zfcp-hbaapi.html) and some custom code to test the read/write interface of BSG. Reviews are more than welcome :) Beste Grüße / Best regards, - Benjamin Block Benjamin Block (6): bsg: fix kernel

[RFC PATCH 3/6] bsg: scsi-transport: add compile-tests to prevent reply-buffer overflows

2017-08-09 Thread Benjamin Block
. To make it easier to notice accidental violations add an explicit compile- time check that tests whether the implementations' reply buffer is at most as large as bsg_job's. To do so, we have to move the size-define from bsg.c to a common header. Signed-off-by: Benjamin Blo

[RFC PATCH 6/6] bsg: reduce unnecessary arguments for blk_complete_sgv4_hdr_rq()

2017-08-09 Thread Benjamin Block
Since struct bsg_command is now used in every calling case, we don't need separation of arguments anymore that are contained in the same bsg_command. Signed-off-by: Benjamin Block --- block/bsg.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/

[RFC PATCH 5/6] bsg: reduce unnecessary arguments for bsg_map_hdr()

2017-08-09 Thread Benjamin Block
Since struct bsg_command is now used in every calling case, we don't need separation of arguments anymore that are contained in the same bsg_command. Signed-off-by: Benjamin Block --- block/bsg.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/block/bs

[RFC PATCH 4/6] bsg: refactor ioctl to use regular BSG-command infrastructure for SG_IO

2017-08-09 Thread Benjamin Block
SG_IO. A complete unification is not possible, as it then would also enqueue SG_IO commands in the BGS devices's command list, but this is only for the read- and write-calls. Signed-off-by: Benjamin Block --- block/bsg.c | 60 1 fi

[RFC PATCH 2/6] bsg: assign sense_len instead of fixed SCSI_SENSE_BUFFERSIZE

2017-08-09 Thread Benjamin Block
ply. * * ... */ Signed-off-by: Benjamin Block --- block/bsg-lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/bsg-lib.c b/block/bsg-lib.c index c4513b23f57a..c7c2c6bbb5ae 100644 --- a/block/bsg-lib.c +++ b/block/bsg-lib.c @@ -147,8 +147,8 @@ static int bsg_create_

Re: [PATCH 00/22] zfcp fixes and cleanups

2017-08-08 Thread Benjamin Block
, if this goes into 4.14 as one series. So if it is OK with you, just apply the complete series for that. Thanks. Beste Grüße / Best regards, - Benjamin Block -- Linux on z Systems Development / IBM Systems &am

[PATCH 22/22] zfcp: early returns for traces disabled via level

2017-07-28 Thread Benjamin Block
Martin Peschke [ma...@linux.vnet.ibm.com: rebase, reword, default level 3 branch prediction] Signed-off-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Benjamin Block --- drivers/s390/scsi/zfcp_dbf.c | 54 +--- 1 file changed, 46 insertions(+), 8 deleti

[PATCH 17/22] zfcp: fix kernel doc comment typos for struct zfcp_dbf_scsi

2017-07-28 Thread Benjamin Block
From: Steffen Maier Improves commit 250a1352b95e ("[SCSI] zfcp: Redesign of the debug tracing for SCSI records.") Signed-off-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Benjamin Block --- drivers/s390/scsi/zfcp_dbf.h | 6 +++--- 1 file changed, 3 insertions(+), 3

[PATCH 05/22] zfcp: fix queuecommand for scsi_eh commands when DIX enabled

2017-07-28 Thread Benjamin Block
evices offline with the following kernel message: "kernel: sd H:0:T:L: Device offlined - not ready after error recovery" Signed-off-by: Steffen Maier Fixes: ef3eb71d8ba4 ("[SCSI] zfcp: Introduce experimental support for DIF/DIX") Cc: #2.6.36+ Reviewed-by: Benjamin Block Signe

[PATCH 01/22] zfcp: replace zfcp_qdio_sbale_count by sg_nents

2017-07-28 Thread Benjamin Block
From: LABBE Corentin The zfcp_qdio_sbale_count function do the same work than sg_nents(). So replace it by sg_nents() for removing duplicate code. Signed-off-by: LABBE Corentin Signed-off-by: Steffen Maier Signed-off-by: Benjamin Block --- drivers/s390/scsi/zfcp_fsf.c | 3 +-- drivers

[PATCH 18/22] zfcp: clean up redundant code with fall through in link down SRB switch case

2017-07-28 Thread Benjamin Block
From: Martin Peschke Signed-off-by: Martin Peschke [ma...@linux.vnet.ibm.com: re-worded short description for more details] Signed-off-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Benjamin Block --- drivers/s390/scsi/zfcp_fsf.c | 2 -- 1 file changed, 2 deletions(-) diff

[PATCH 16/22] zfcp: use endianness conversions with common FC(P) struct fields

2017-07-28 Thread Benjamin Block
cted __be64 [usertype] fl_wwnn drivers/s390/scsi/zfcp_fc.h:269:46: warning: restricted __be32 degrades to integer drivers/s390/scsi/zfcp_fc.h:270:29: error: incompatible types in comparison expression (different base types) Signed-off-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Ben

[PATCH 20/22] zfcp: clean up a member of struct zfcp_qdio that was assigned but never used

2017-07-28 Thread Benjamin Block
ly assigned a now no longer used struct field. Signed-off-by: Martin Peschke [ma...@linux.vnet.ibm.com: reword, added git history] Signed-off-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Benjamin Block --- drivers/s390/scsi/zfcp_fsf.c | 1 - drivers/s390/scsi/zfcp_qdio.h | 2 --

[PATCH 00/22] zfcp fixes and cleanups

2017-07-28 Thread Benjamin Block
are driver fixes that are all marked for stable as well The set applies to the fixes branch of James' scsi.git. Beste Grüße / Best regards, - Benjamin Block Benjamin Block (2): zfcp: con

[PATCH 21/22] zfcp: clean up unnecessary module_param_named() with no_auto_port_rescan

2017-07-28 Thread Benjamin Block
From: Martin Peschke Improves commit 43f60cbd56c4 ("[SCSI] zfcp: No automatic port_rescan on events") Signed-off-by: Martin Peschke [ma...@linux.vnet.ibm.com: reword, underscore in description to match sysfs] Signed-off-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by

[PATCH 11/22] zfcp: trace HBA FSF response by default on dismiss or timedout late response

2017-07-28 Thread Benjamin Block
nd returns early. All other FSF request types are handled separately and as described above. Signed-off-by: Steffen Maier Fixes: 8a36e4532ea1 ("[SCSI] zfcp: enhancement of zfcp debug features") Fixes: 2e261af84cdb ("[SCSI] zfcp: Only collect FSF/HBA debug data for matching trace levels&qu

[PATCH 15/22] zfcp: use common code fcp_cmnd and fcp_resp with union in fsf_qtcb_bottom_io

2017-07-28 Thread Benjamin Block
change is possible since v2.6.33 commit 4318e08c84e4 ("[SCSI] zfcp: Update FCP protocol related code"). Signed-off-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Benjamin Block --- drivers/s390/scsi/zfcp_dbf.c | 3 +-- drivers/s390/scsi/zfcp_dbf.h | 2 +- drivers

[PATCH 04/22] zfcp: convert bool-definitions to use 'true' instead of '1'

2017-07-28 Thread Benjamin Block
Better form and cleans remaining warnings. Found with scripts/coccinelle/misc/boolinit.cocci. Signed-off-by: Benjamin Block --- drivers/s390/scsi/zfcp_qdio.c | 2 +- drivers/s390/scsi/zfcp_scsi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/s390/scsi

[PATCH 07/22] zfcp: fix capping of unsuccessful GPN_FT SAN response trace records

2017-07-28 Thread Benjamin Block
("[SCSI] zfcp: Redesign of the debug tracing for SAN records.") Cc: #2.6.38+ Reviewed-by: Benjamin Block Signed-off-by: Benjamin Block --- drivers/s390/scsi/zfcp_dbf.c | 10 +- drivers/s390/scsi/zfcp_fsf.c | 4 ++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff -

[PATCH 06/22] zfcp: add handling for FCP_RESID_OVER to the fcp ingress path

2017-07-28 Thread Benjamin Block
et at once. Reported-by: Luke M. Hopkins Reviewed-by: Steffen Maier Fixes: 553448f6c483 ("[SCSI] zfcp: Message cleanup") Fixes: ea127f975424 ("[PATCH] s390 (7/7): zfcp host adapter.") (tglx/history.git) Cc: #2.6.33+ Signed-off-by: Benjamin Block --- drivers/s390/scsi/zfcp_fc.h

[PATCH 19/22] zfcp: clean up no longer existent prototype from zfcp API header

2017-07-28 Thread Benjamin Block
ffen Maier Reviewed-by: Benjamin Block Signed-off-by: Benjamin Block --- drivers/s390/scsi/zfcp_ext.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/s390/scsi/zfcp_ext.h b/drivers/s390/scsi/zfcp_ext.h index 9afdbc32b23f..a9e968717dd9 100644 --- a/drivers/s390/scsi/zfcp_ext.h +++ b/dr

[PATCH 10/22] zfcp: fix payload with full FCP_RSP IU in SCSI trace records

2017-07-28 Thread Benjamin Block
^^==FCP_RSP_LEN_VALID 0008 ==FCP_RSP_LEN ^==FCP_RSP_INFO Signed-off-by: Steffen Maier Fixes: 250a1352b95e ("[SCSI] zfcp: Redesign of the debug traci

[PATCH 08/22] zfcp: fix passing fsf_req to SCSI trace on TMF to correlate with HBA

2017-07-28 Thread Benjamin Block
these cases it's correct to pass NULL for fsf_req to _zfcp_dbf_scsi(). Signed-off-by: Steffen Maier Fixes: 8a36e4532ea1 ("[SCSI] zfcp: enhancement of zfcp debug features") Cc: #2.6.38+ Reviewed-by: Benjamin Block Signed-off-by: Benjamin Block --- drivers/s390/scsi/zfcp_dbf.h |

[PATCH 09/22] zfcp: fix missing trace records for early returns in TMF eh handlers

2017-07-28 Thread Benjamin Block
sue a TMF and has to return FAILED. Signed-off-by: Steffen Maier Fixes: a1dbfddd02d2 ("[SCSI] zfcp: Pass return code from fc_block_scsi_eh to scsi eh") Fixes: 63caf367e1c9 ("[SCSI] zfcp: Improve reliability of SCSI eh handlers in zfcp") Cc: #2.6.38+ Reviewed-by: Benja

[PATCH 14/22] zfcp: clarify that we don't need "link" test on failed open port

2017-07-28 Thread Benjamin Block
From: Steffen Maier Signed-off-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Benjamin Block --- drivers/s390/scsi/zfcp_fsf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c index c10b4b9f1574

[PATCH 12/22] zfcp: trace high part of "new" 64 bit SCSI LUN

2017-07-28 Thread Benjamin Block
Y successful with code 0x0 scsi 2:0:0:4630896905707208721: scsi scan: peripheral device type of 31, \ no device added Signed-off-by: Steffen Maier Fixes: 9cb78c16f5da ("scsi: use 64-bit LUNs") Cc: #3.17+ Reviewed-by: Benjamin Block Reviewed-by: Jens Remus Signed-off-by: Benjamin Block --- dr

[PATCH 03/22] zfcp: Remove unneeded linux/miscdevice.h include

2017-07-28 Thread Benjamin Block
ep sysfs files)") commit 1b33ef23946a ("zfcp: remove access control tables interface (port leftovers)")] Signed-off-by: Corentin Labbe Signed-off-by: Benjamin Block --- drivers/s390/scsi/zfcp_aux.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/

[PATCH 13/22] zfcp: more fitting constant for fc_ct_hdr.ct_reason on port scan response

2017-07-28 Thread Benjamin Block
ld use the latter from fc_gs.h. See also its use in libfc's fc_disc_gpn_ft_resp(). Signed-off-by: Steffen Maier Reviewed-by: Benjamin Block Signed-off-by: Benjamin Block --- drivers/s390/scsi/zfcp_fc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/s390/s

[PATCH 02/22] zfcp: use setup_timer instead of init_timer

2017-07-28 Thread Benjamin Block
From: Lukáš Korenčik Use initialization with setup_timer function instead of using init_timer function and data fields. It improves readability. Signed-off-by: Lukáš Korenčik Signed-off-by: Jiri Slaby Signed-off-by: Benjamin Block --- drivers/s390/scsi/zfcp_erp.c | 5 ++--- 1 file changed

[PATCH] MAINTAINERS: Add myself to S390 ZFCP DRIVER as a co-maintainer

2017-07-28 Thread Benjamin Block
I have been working with Steffen on zFCP for quite a while now and we decided adding me as a co-maintainer might be a good thing. Acked-by: Steffen Maier Signed-off-by: Benjamin Block --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index

Re: A bug in scsi_alloc_target of drivers/scsi/scsi_scan.c

2017-05-16 Thread Benjamin Block
ed in 12fb8c1574d7d in 2010, see the commit message there. Beste Grüße / Best regards, - Benjamin Block > > diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c > index 81d

Re: [RFC] scsi: generate uevent for SCSI sense code

2017-05-16 Thread Benjamin Block
_device(dev); > + return snprintf(buf, 20, "0x%04lx\n", > + (sdev->sense_event_filter & > + SCSI_SENSE_EVENT_FILTER_MASK)); > +} > + > +static ssize_t > +sdev_store_sense_event_filter(struct device *dev, >

Re: [PATCH v3 3/4] sd: Make synchronize cache upon shutdown asynchronous

2017-04-18 Thread Benjamin Block
Hej Bart, sry for the late'ish reply, had a long weekend. On Thu, Apr 13, 2017 at 12:28:54AM +, Bart Van Assche wrote: > On Wed, 2017-04-12 at 16:41 +0200, Benjamin Block wrote: > > On Mon, Apr 10, 2017 at 10:54:01AM -0700, Bart Van Assche wrote: > > > [ ... ] &

Re: [PATCH v4 0/6] Avoid that scsi-mq and dm-mq queue processing stalls sporadically

2017-04-13 Thread Benjamin Block
On Wed, Apr 12, 2017 at 06:11:25PM +, Bart Van Assche wrote: > On Wed, 2017-04-12 at 12:55 +0200, Benjamin Block wrote: > > On Fri, Apr 07, 2017 at 11:16:48AM -0700, Bart Van Assche wrote: > > > The six patches in this patch series fix the queue lockup I reported > >

Re: [PATCH v2 3/4] sd: Make synchronize cache upon shutdown asynchronous

2017-04-12 Thread Benjamin Block
> sd_printk(KERN_NOTICE, sdkp, "Synchronizing SCSI cache\n"); > - sd_sync_cache(sdkp); > + if (stop_disk) > + sd_sync_cache(sdkp); > + else > + sd_sync_cache_async(sdkp); That makes the function-document

Re: [PATCH v4 0/6] Avoid that scsi-mq and dm-mq queue processing stalls sporadically

2017-04-12 Thread Benjamin Block
ar stuff happening. Beste Grüße / Best regards, - Benjamin Block -- Linux on z Systems Development / IBM Systems & Technology Group IBM Deutschland Research &

Re: [PATCHv6 0/8] SCSI EH cleanup

2017-04-06 Thread Benjamin Block
. Beste Grüße / Best regards, - Benjamin Block -- Linux on z Systems Development / IBM Systems & Technology Group IBM Deutschland Research & Development GmbH Vorsitz. AufsR.:

  1   2   >