Re: [PATCH 3/3] bnx2i: Add bnx2i iSCSI driver.

2008-05-22 Thread Christoph Hellwig
+struct bnx2i_async_msg { +#if defined(__BIG_ENDIAN) + u8 op_code; + u8 reserved1; + u16 reserved0; +#elif defined(__LITTLE_ENDIAN) + u16 reserved0; + u8 reserved1; + u8 op_code; +#endif + u32 reserved2; + u32 exp_cmd_sn; + u32 max_cmd_sn; +

Re: [4.10, panic, regression] iscsi: null pointer deref at iscsi_tcp_segment_done+0x20d/0x2e0

2017-01-04 Thread Christoph Hellwig
On Sat, Dec 24, 2016 at 02:17:26PM +0100, Hannes Reinecke wrote: > Christoph, do you have a pointer to your patchset? Here is a pointer to the current one after splitting it into properly bisectable chunks. Besides proper changelogs the biggest item left is fixing up dm-mpath to not allocate its

Re: [4.10, panic, regression] iscsi: null pointer deref at iscsi_tcp_segment_done+0x20d/0x2e0

2016-12-23 Thread Christoph Hellwig
se buffer handling a lot less wasteful. --- >From 0a77bc424ed907c1e99b4756bb498370b498183a Mon Sep 17 00:00:00 2001 From: Christoph Hellwig <h...@lst.de> Date: Fri, 23 Dec 2016 10:57:06 +0100 Subject: virtio_blk: avoid DMA to stack for the sense buffer Most users of BLOCK_PC request

Re: [4.10, panic, regression] iscsi: null pointer deref at iscsi_tcp_segment_done+0x20d/0x2e0

2016-12-24 Thread Christoph Hellwig
On Fri, Dec 23, 2016 at 07:45:45PM -0700, Jens Axboe wrote: > It's not that it's technically hard to fix up, it's more that it's a > pain in the ass to have to do it. For instance, for blk_execute_rq(), we > either should enforce that the caller allocates it dynamically and then > free it, or we

Re: [4.10, panic, regression] iscsi: null pointer deref at iscsi_tcp_segment_done+0x20d/0x2e0

2016-12-24 Thread Christoph Hellwig
On Fri, Dec 23, 2016 at 11:42:45AM -0800, Linus Torvalds wrote: > Ugh. This patch is nasty. It's the same SCSI has done for ages - except that is uses a separate kmalloc for the sense buffer. > I think we should just fix blk_execute_rq() instead. As you found out below it's not just

Re: [4.10, panic, regression] iscsi: null pointer deref at iscsi_tcp_segment_done+0x20d/0x2e0

2016-12-22 Thread Christoph Hellwig
On Wed, Dec 21, 2016 at 03:19:15PM -0800, Linus Torvalds wrote: > Looking around a bit, the only even halfway suspicious scatterlist > initialization thing I see is commit f9d03f96b988 ("block: improve > handling of the magic discard payload") which used to have a magic > hack wrt !bio->bi_vcnt,

Re: [4.10, panic, regression] iscsi: null pointer deref at iscsi_tcp_segment_done+0x20d/0x2e0

2016-12-22 Thread Christoph Hellwig
On Thu, Dec 22, 2016 at 05:30:46PM +1100, Dave Chinner wrote: > > For "normal" bios the for_each_segment loop iterates over bi_vcnt, > > so it will be ignored anyway. That being said both I and the lists > > got CCed halfway through the thread and I haven't seen the original > > report, so I'm

Re: [4.10, panic, regression] iscsi: null pointer deref at iscsi_tcp_segment_done+0x20d/0x2e0

2016-12-24 Thread Christoph Hellwig
On Sat, Dec 24, 2016 at 02:17:26PM +0100, Hannes Reinecke wrote: > Christoph, do you have a pointer to your patchset? > Not that I'll be able to do any meaningful work until next year, but having > a look would be nice. Just to get a feeling where you want to head to; I > might be able to work

Re: [PATCH 02/22] nvmet: Make use of the new sg_map helper function

2017-04-13 Thread Christoph Hellwig
On Thu, Apr 13, 2017 at 04:05:15PM -0600, Logan Gunthorpe wrote: > This is a straight forward conversion in two places. Should kmap fail, > the code will return an INVALD_DATA error in the completion. It really should be using nvmet_copy_from_sgl to make things safer, as we don't want to rely on

Re: [PATCH 01/22] scatterlist: Introduce sg_map helper functions

2017-04-14 Thread Christoph Hellwig
> diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c > index 0007b79..b95934b 100644 > --- a/drivers/dma-buf/dma-buf.c > +++ b/drivers/dma-buf/dma-buf.c > @@ -37,6 +37,9 @@ > > #include > > +/* Prevent the highmem.h macro from aliasing ops->kunmap_atomic */ > +#undef

Re: [PATCH 03/22] libiscsi: Make use of new the sg_map helper function

2017-04-14 Thread Christoph Hellwig
On Thu, Apr 13, 2017 at 04:05:16PM -0600, Logan Gunthorpe wrote: > Convert the kmap and kmap_atomic uses to the sg_map function. We now > store the flags for the kmap instead of a boolean to indicate > atomicitiy. We also propogate a possible kmap error down and create > a new

Re: [PATCH 09/22] dm-crypt: Make use of the new sg_map helper in 4 call sites

2017-04-14 Thread Christoph Hellwig
On Thu, Apr 13, 2017 at 04:05:22PM -0600, Logan Gunthorpe wrote: > Very straightforward conversion to the new function in all four spots. I think the right fix here is to switch dm-crypt to the ahash API that takes a scatterlist. -- You received this message because you are subscribed to the

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

2017-08-16 Thread Christoph Hellwig
On Mon, Aug 14, 2017 at 06:32:17PM +0200, Benjamin Block wrote: > > - blk_end_request_all(rq, BLK_STS_OK); > > - > > put_device(job->dev); /* release reference for the request */ > > > > kfree(job->request_payload.sg_list); > > kfree(job->reply_payload.sg_list); > > - kfree(job);

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

2017-08-13 Thread Christoph Hellwig
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 > (most users of our interface will likely do that, if they wanna get the > transport-level

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

2017-08-11 Thread Christoph Hellwig
:00 2001 From: Christoph Hellwig <h...@lst.de> 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 for the sense buffer. The bsg-lib code failed to do s

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

2017-08-11 Thread Christoph Hellwig
My point was that we now gurantee that that the sense data is not a stack pointer an a driver can DMA to it. Now for BSG the sense data is "just" abused as reply, but the point still stands - we don't want to pass a possible stack pointer to drivers in a data buffer because we want to allow DMA

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

2017-08-10 Thread Christoph Hellwig
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 BSG queues and/or implement the same scheme. -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsubscribe from this

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

2017-08-10 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig <h...@lst.de> -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscr...@googlegro

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

2017-08-10 Thread Christoph Hellwig
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 return > bool? I have to admit,

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

2017-08-10 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig <h...@lst.de> -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To unsubscribe from this group and stop receiving emails from it, send an email to open-iscsi+unsubscr...@googlegro

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

2017-08-10 Thread Christoph Hellwig
*bc, > + fmode_t has_write_perm) I wish we could just rename the argument to mode and pass on the whole file->f_mode while you are cleaning up this code. That should be a separate patch, though. Reviewed-by: Christoph Hellwig <h...@lst.de> -- You received this message because

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

2017-08-11 Thread Christoph Hellwig
patch as before. Next try: --- >From f5b03b82df0569c035022c1c2535696186907f1a Mon Sep 17 00:00:00 2001 From: Christoph Hellwig <h...@lst.de> 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 d

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

2017-08-11 Thread Christoph Hellwig
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 > > all bsg users. > > > > Huh? What additional copy

Re: [PATCH v2 01/21] scatterlist: Introduce sg_map helper functions

2017-04-27 Thread Christoph Hellwig
On Wed, Apr 26, 2017 at 12:11:33PM -0600, Logan Gunthorpe wrote: > Ok, well for starters I think you are mistaken about kmap being able to > fail. I'm having a hard time finding many users of that function that > bother to check for an error when calling it. A quick audit of the arch code shows

[PATCH 20/24] ses: switch to SPDX tags

2019-05-01 Thread Christoph Hellwig
Use the the GPLv2 SPDX tag instead of verbose boilerplate text. Signed-off-by: Christoph Hellwig --- drivers/scsi/ses.c | 20 ++-- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/drivers/scsi/ses.c b/drivers/scsi/ses.c index 0fc39224ce1e..8afea5a1d3f0 100644

[PATCH 14/24] libiscsi: switch to SPDX tags

2019-05-01 Thread Christoph Hellwig
Use the the GPLv2+ SPDX tag instead of verbose boilerplate text. Signed-off-by: Christoph Hellwig --- drivers/scsi/libiscsi.c | 15 +-- drivers/scsi/libiscsi_tcp.c | 13 + include/scsi/iscsi_if.h | 13 + include/scsi/iscsi_proto.h| 13

[PATCH 01/24] scsi: add SPDX tags to scsi midlayer files missing licensing information

2019-05-01 Thread Christoph Hellwig
Add the default kernel GPLv2 annotation to SCSI midlayer files missing any licensing information. Signed-off-by: Christoph Hellwig --- drivers/scsi/hosts.c| 1 + drivers/scsi/scsi.c | 1 + drivers/scsi/scsi_debugfs.h | 1 + drivers/scsi/scsi_error.c | 1 + drivers/scsi

[PATCH 21/24] sg: switch to SPDX tags

2019-05-01 Thread Christoph Hellwig
Use the the GPLv2+ SPDX tag instead of verbose boilerplate text. Signed-off-by: Christoph Hellwig --- drivers/scsi/sg.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index d3f15319b9b3..bcdc28e5ede7 100644 --- a/drivers/scsi/sg.c

[PATCH 10/24] scsi_transport_srp: switch to SPDX tags

2019-05-01 Thread Christoph Hellwig
Use the the GPLv2+ SPDX tag instead of verbose boilerplate text. Signed-off-by: Christoph Hellwig --- drivers/scsi/scsi_transport_srp.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/scsi/scsi_transport_srp.c b/drivers/scsi/scsi_transport_srp.c

[PATCH 12/24] libfc: switch to SPDX tags

2019-05-01 Thread Christoph Hellwig
Use the the GPLv2 SPDX tag instead of verbose boilerplate text. Signed-off-by: Christoph Hellwig --- drivers/scsi/libfc/fc_disc.c | 14 +- drivers/scsi/libfc/fc_elsct.c | 14 +- drivers/scsi/libfc/fc_exch.c | 14 +- drivers/scsi/libfc/fc_fcp.c | 14

[PATCH 06/24] scsi_transport_fc: switch to SPDX tags

2019-05-01 Thread Christoph Hellwig
Use the the GPLv2+ SPDX tag instead of verbose boilerplate text. Signed-off-by: Christoph Hellwig --- drivers/scsi/scsi_transport_fc.c | 18 +- include/scsi/scsi_transport_fc.h | 18 +- 2 files changed, 2 insertions(+), 34 deletions(-) diff --git a/drivers/scsi

switch core SCSI code to SPDX tags

2019-05-01 Thread Christoph Hellwig
Hi all, this series switches all SCSI midlayer, upper driver, transport class and library files to have proper SPDX tags instead of no licensing information or copy and pasted boilerplate code. -- You received this message because you are subscribed to the Google Groups "open-iscsi" group. To

[PATCH 04/24] scsi_transport.h: switch to SPDX tags

2019-05-01 Thread Christoph Hellwig
Use the the GPLv2+ SPDX tag instead of verbose boilerplate text. Signed-off-by: Christoph Hellwig --- include/scsi/scsi_transport.h | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/include/scsi/scsi_transport.h b/include/scsi/scsi_transport.h index

[PATCH 24/24] osst: add a SPDX tag to osst.c

2019-05-01 Thread Christoph Hellwig
osst.c is the only osst file missing licensing information. Add a GPLv2 tag for the default kernel license. Signed-off-by: Chriosstoph Hellwig --- drivers/scsi/osst.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/osst.c b/drivers/scsi/osst.c index be3c73ebbfde..fe4f0e7d6359

[PATCH 02/24] scsi: switch the remaining scsi midlayer files to use SPDX tags

2019-05-01 Thread Christoph Hellwig
Use the GPLv2 SPDX tag instead of verbose boilerplate text. Signed-off-by: Christoph Hellwig --- drivers/scsi/scsi_logging.c | 3 +-- drivers/scsi/scsi_sysctl.c | 2 +- drivers/scsi/scsi_trace.c | 14 +- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/drivers

[PATCH 08/24] scsi_transport_sas: switch to SPDX tags

2019-05-01 Thread Christoph Hellwig
Use the the GPLv2 SPDX tag instead of a free form blurb. Signed-off-by: Christoph Hellwig --- drivers/scsi/scsi_transport_sas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c index 60f1a81d2034

[PATCH 05/24] scsi_transport_fc: remove duplicate GPL boilerplate text

2019-05-01 Thread Christoph Hellwig
The FC transport class uapi headers already have proper SPDX tags, remove the duplicate boilerplate text. Signed-off-by: Christoph Hellwig --- include/uapi/scsi/scsi_bsg_fc.h | 15 --- include/uapi/scsi/scsi_netlink_fc.h | 15 --- 2 files changed, 30 deletions

[PATCH 07/24] scsi_transport_iscsi: switch to SPDX tags

2019-05-01 Thread Christoph Hellwig
Use the the GPLv2+ SPDX tag instead of verbose boilerplate text. Signed-off-by: Christoph Hellwig --- drivers/scsi/scsi_transport_iscsi.c | 15 +-- include/scsi/scsi_transport_iscsi.h | 15 +-- 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/drivers/scsi

[PATCH 11/24] libfc: remove duplicate GPL boilerplate text

2019-05-01 Thread Christoph Hellwig
The libfc uapi headers already have proper SPDX tags, remove the duplicate boilerplate text. Signed-off-by: Christoph Hellwig --- include/uapi/scsi/fc/fc_els.h | 13 - include/uapi/scsi/fc/fc_fs.h | 13 - include/uapi/scsi/fc/fc_gs.h | 13 - include/uapi

[PATCH 09/24] scsi_transport_spi: switch to SPDX tags

2019-05-01 Thread Christoph Hellwig
Use the the GPLv2+ SPDX tag instead of verbose boilerplate text. Signed-off-by: Christoph Hellwig --- drivers/scsi/scsi_transport_spi.c | 15 +-- include/scsi/scsi_transport_spi.h | 15 +-- 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/drivers/scsi

[PATCH 03/24] scsi_netlink: remove duplicate GPL boilerplate text

2019-05-01 Thread Christoph Hellwig
The SCSI netlink uapi header already has a proper SPDX tag, remove the duplicate boilerplate text. Signed-off-by: Christoph Hellwig --- include/uapi/scsi/scsi_netlink.h | 15 --- 1 file changed, 15 deletions(-) diff --git a/include/uapi/scsi/scsi_netlink.h b/include/uapi/scsi

[PATCH 13/24] libfcoe: switch to SPDX tags

2019-05-01 Thread Christoph Hellwig
Use the the GPLv2 SPDX tag instead of verbose boilerplate text. Signed-off-by: Christoph Hellwig --- drivers/scsi/fcoe/fcoe.c | 14 +- drivers/scsi/fcoe/fcoe.h | 14 +- drivers/scsi/fcoe/fcoe_ctlr.c | 14 +- drivers/scsi/fcoe

[PATCH 22/24] sr: add a SPDX tag to sr.c

2019-05-01 Thread Christoph Hellwig
sr.c is the only sr file missing licensing information. Add a GPLv2 tag for the default kernel license. Signed-off-by: Christoph Hellwig --- drivers/scsi/sr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index 039c27c2d7b3..701d1e68d86e 100644

[PATCH 16/24] libsas: switch sas_ata.[ch] to SPDX tags

2019-05-01 Thread Christoph Hellwig
Use the the GPLv2+ SPDX tag instead of verbose boilerplate text. Signed-off-by: Christoph Hellwig --- drivers/scsi/libsas/sas_ata.c | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/scsi/libsas/sas_ata.c b/drivers/scsi/libsas/sas_ata.c index

[PATCH 19/24] sd: switch remaining files to SPDX tags

2019-05-01 Thread Christoph Hellwig
Use the the GPLv2 SPDX tag instead of verbose boilerplate text. Signed-off-by: Christoph Hellwig --- drivers/scsi/sd_dif.c | 16 +--- drivers/scsi/sd_zbc.c | 16 +--- 2 files changed, 2 insertions(+), 30 deletions(-) diff --git a/drivers/scsi/sd_dif.c b/drivers/scsi

[PATCH 15/24] libsas: add a SPDX tag to sas_task.c

2019-05-01 Thread Christoph Hellwig
sas_task.c is the only libsas file missing licensing information. Add a GPLv2 tag for the default kernel license. Signed-off-by: Christoph Hellwig --- drivers/scsi/libsas/sas_task.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/libsas/sas_task.c b/drivers

[PATCH 17/24] libsas: switch remaining files to SPDX tags

2019-05-01 Thread Christoph Hellwig
Use the the GPLv2 SPDX tag instead of verbose boilerplate text. Signed-off-by: Christoph Hellwig --- drivers/scsi/libsas/sas_discover.c | 18 +- drivers/scsi/libsas/sas_event.c | 18 +- drivers/scsi/libsas/sas_expander.c | 16 +--- drivers/scsi

[PATCH 18/24] sd: add a SPDX tag to sd.c

2019-05-01 Thread Christoph Hellwig
sd.c is the only sd file missing licensing information. Add a GPLv2 tag for the default kernel license. Signed-off-by: Christoph Hellwig --- drivers/scsi/sd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 2b2bc4b49d78..4852c2223359 100644

[PATCH 23/24] st: add a SPDX tag to st.c

2019-05-01 Thread Christoph Hellwig
st.c is the only st file missing licensing information. Add a GPLv2 tag for the default kernel license. Signed-off-by: Christoph Hellwig --- drivers/scsi/st.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index 19c022e66d63..b814906af0a3 100644

Re: [PATCH 24/24] osst: add a SPDX tag to osst.c

2019-05-02 Thread Christoph Hellwig
On Thu, May 02, 2019 at 08:06:38AM +0200, Hannes Reinecke wrote: > On 5/1/19 6:14 PM, Christoph Hellwig wrote: >> osst.c is the only osst file missing licensing information. Add a >> GPLv2 tag for the default kernel license. >> >> Signed-off-by: Chriosstoph

Re: [PATCH v7 1/6] net: introduce helper sendpage_ok() in include/linux/net.h

2020-08-18 Thread Christoph Hellwig
I think we should go for something simple like this instead: --- >From 4867e158ee86ebd801b4c267e8f8a4a762a71343 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Tue, 18 Aug 2020 18:19:23 +0200 Subject: net: bypass ->sendpage for slab pages Sending Slab or tail pages into ->

Re: [PATCH v7 1/6] net: introduce helper sendpage_ok() in include/linux/net.h

2020-08-18 Thread Christoph Hellwig
On Wed, Aug 19, 2020 at 12:33:37AM +0800, Coly Li wrote: > On 2020/8/19 00:24, Christoph Hellwig wrote: > > I think we should go for something simple like this instead: > > This idea is fine to me. Should a warning message be through here? IMHO > the driver still sends an imp

Re: [PATCH v7 1/6] net: introduce helper sendpage_ok() in include/linux/net.h

2020-09-23 Thread Christoph Hellwig
On Wed, Aug 19, 2020 at 12:22:05PM +0800, Coly Li wrote: > On 2020/8/19 03:49, Christoph Hellwig wrote: > > On Wed, Aug 19, 2020 at 12:33:37AM +0800, Coly Li wrote: > >> On 2020/8/19 00:24, Christoph Hellwig wrote: > >>> I think we should go for some

Re: [PATCH 0/2] scsi:donot skip lun if inquiry returns PQ=1 for all hosts

2022-12-23 Thread Christoph Hellwig
On Fri, Dec 16, 2022 at 07:41:26PM +0800, Wenchao Hao wrote: > For nothing, I want the iscsi_tcp transport do not skip PQ=1 default > as what it did before commit 948e922fc4461 ("scsi: core: map PQ=1, > PDT=other values to SCSI_SCAN_TARGET_PRESENT"). Well, that commit was very much intentional

Re: Antw: [EXT] Re: [PATCH 0/2] scsi:donot skip lun if inquiry returns PQ=1 for all hosts

2022-12-15 Thread Christoph Hellwig
On Thu, Dec 15, 2022 at 09:07:28AM +0100, Ulrich Windl wrote: > Actusally I have no idea, but as a user of FC SAN systems I can remember a > case when a storage system had to present a dummy LUN0 to enable hosts to > find other LUNs (while LUN0 was never actually used). Maybe the client code >

Re: [PATCH 0/2] scsi:donot skip lun if inquiry returns PQ=1 for all hosts

2022-12-15 Thread Christoph Hellwig
On Thu, Dec 15, 2022 at 05:09:31PM +0800, Wenchao Hao wrote: > In my opinion, if the addressed lun still response the > inquiry and other commands, we should not skip it, > maybe let the scsi drivers like sd/st/sg to determine > how to handle this lun accordint to the PQ value. > > As discussed

Re: [PATCH 0/2] scsi:donot skip lun if inquiry returns PQ=1 for all hosts

2022-12-14 Thread Christoph Hellwig
On Wed, Dec 14, 2022 at 03:08:44PM +0800, Wenchao Hao wrote: > When iSCSI initiator logged in target, the target attached none valid > lun but lun0. lun0 is not an valid disk, while it would response > inquiry command with PQ=1 and other general scsi commands like probe lun. > The others luns of

Re: [PATCH v1 2/3] Treewide: Stop corrupting socket's task_frag

2022-11-29 Thread Christoph Hellwig
Hmm. Having to set a flag to not accidentally corrupt per-task state seems a bit fragile. Wouldn't it make sense to find a way to opt into the feature only for sockets created from the syscall layer? -- You received this message because you are subscribed to the Google Groups "open-iscsi"

[PATCH 06/23] scsi: add a no_highmem flag to struct Scsi_Host

2024-03-24 Thread Christoph Hellwig
yer bounce buffering to it. Signed-off-by: Christoph Hellwig --- drivers/scsi/aha152x.c | 8 +--- drivers/scsi/imm.c | 12 +--- drivers/scsi/ppa.c | 8 +--- drivers/scsi/scsi_lib.c| 3 +++ drivers/usb/storage/scsiglue.c | 10 -- driv

[PATCH 07/23] scsi: add a dma_alignment field to the host and host template

2024-03-24 Thread Christoph Hellwig
Get drivers out of the business of having to call the block layer dma alignment limits helpers themselves. Signed-off-by: Christoph Hellwig --- drivers/firewire/sbp2.c | 6 -- drivers/message/fusion/mptfc.c| 1 + drivers/message/fusion/mptsas.c | 1 + drivers/message

[PATCH 01/23] block: don't reject too large max_user_setors in blk_validate_limits

2024-03-24 Thread Christoph Hellwig
We already cap down the actual max_sectors to the max of the hardware and user limit, so don't reject the configuration. Signed-off-by: Christoph Hellwig --- block/blk-settings.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/blk-settings.c b/block/blk-settings.c

convert SCSI to atomic queue limits, part 1

2024-03-24 Thread Christoph Hellwig
Hi all, this series converts the SCSI midlayer and LLDDs to use atomic queue limits API. It is pretty straight forward, except for the mpt3mr driver which does really weird and probably already broken things by setting limits from unlocked device iteration callsbacks. The first patch is

[PATCH 03/23] mpi3mr: pass queue_limits to bsg_setup_queue

2024-03-24 Thread Christoph Hellwig
Pass the limits to bsg_setup_queue instead of setting them up on the live queue. Signed-off-by: Christoph Hellwig --- drivers/scsi/mpi3mr/mpi3mr_app.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/scsi/mpi3mr/mpi3mr_app.c b/drivers/scsi/mpi3mr

[PATCH 02/23] bsg: pass queue_limits to bsg_setup_queue

2024-03-24 Thread Christoph Hellwig
This allows bsg_setup_queue to pass them to blk_mq_alloc_queue and thus set up the limits at queue allocation time. Signed-off-by: Christoph Hellwig --- block/bsg-lib.c | 6 -- drivers/scsi/mpi3mr/mpi3mr_app.c| 2 +- drivers/scsi/scsi_transport_fc.c| 6

[PATCH 04/23] scsi: initialize scsi midlayer limits before allocating the queue

2024-03-24 Thread Christoph Hellwig
Turn __scsi_init_queue into scsi_init_limits which initializes queue_limits structure that can be passed to blk_mq_alloc_queue. Signed-off-by: Christoph Hellwig --- drivers/scsi/scsi_lib.c | 32 ++--- drivers/scsi/scsi_scan.c| 5 +++-- drivers

[PATCH 05/23] scsi_transport_fc: add a max_bsg_segments field to struct fc_function_template

2024-03-24 Thread Christoph Hellwig
ibmvfc only supports a single segment for BSG FC passthrough. Instead of having it set a queue limits after creating the BSD queues, add a field so that the FC transport can set it before allocating the queue. Signed-off-by: Christoph Hellwig --- drivers/scsi/ibmvscsi/ibmvfc.c | 5

[PATCH 18/23] sata_nv: switch to using ->device_configure

2024-03-24 Thread Christoph Hellwig
Switch to the ->device_configure method instead of ->slave_configure and update the block limits on the passed in queue_limits instead of using the per-limit accessors. Signed-off-by: Christoph Hellwig --- drivers/ata/sata_nv.c | 20 1 file changed, 12 insertions

[PATCH 19/23] pata_macio: switch to using ->device_configure

2024-03-24 Thread Christoph Hellwig
Switch to the ->device_configure method instead of ->slave_configure and update the block limits on the passed in queue_limits instead of using the per-limit accessors. Signed-off-by: Christoph Hellwig --- drivers/ata/pata_macio.c | 9 + 1 file changed, 5 insertions(+), 4 del

[PATCH 20/23] libata: switch to using ->device_configure

2024-03-24 Thread Christoph Hellwig
Switch to the ->device_configure method instead of ->slave_configure and update the block limits on the passed in queue_limits instead of using the per-limit accessors. Signed-off-by: Christoph Hellwig --- drivers/ata/ahci.h | 2 +- drivers/ata/libata-

[PATCH 10/23] scsi: add a device_configure method to the host template

2024-03-24 Thread Christoph Hellwig
ferent methods here, and the slave name in addition to being politically charged also has no basis in the SCSI standards or the kernel code. Signed-off-by: Christoph Hellwig --- drivers/scsi/scsi_scan.c | 33 +++-- include/scsi/scsi_host.h | 4 2 files chang

[PATCH 11/23] megaraid_sas: switch to using ->device_configure

2024-03-24 Thread Christoph Hellwig
Switch to the ->device_configure method instead of ->slave_configure and update the block limits on the passed in queue_limits instead of using the per-limit accessors. Signed-off-by: Christoph Hellwig --- drivers/scsi/megaraid/megaraid_sas.h| 2 +- drivers/scsi/me

[PATCH 21/23] mpi3mr: switch to using ->device_configure

2024-03-24 Thread Christoph Hellwig
to use the queue_limits, but the complete locking of this path probably means it already is completely broken and needs a proper audit. Signed-off-by: Christoph Hellwig --- drivers/scsi/mpi3mr/mpi3mr.h| 1 - drivers/scsi/mpi3mr/mpi3mr_os.c | 76 ++--- 2 files chang

[PATCH 08/23] ufs-exynos: move setting the the dma alignment to the init method

2024-03-24 Thread Christoph Hellwig
Use the SCSI host's dma_alignment field and set it in ->init and remove the now unused config_scsi_dev method. Signed-off-by: Christoph Hellwig --- drivers/ufs/core/ufshcd.c | 3 --- drivers/ufs/host/ufs-exynos.c | 8 ++-- include/ufs/ufshcd.h | 1 - 3 files changed

[PATCH 09/23] scsi: use the atomic queue limits API in scsi_add_lun

2024-03-24 Thread Christoph Hellwig
Switch scsi_add_lun to use the atomic queue limits API to update the max_hw_sectors for devices with quirks. Signed-off-by: Christoph Hellwig --- drivers/scsi/scsi_scan.c | 49 1 file changed, 24 insertions(+), 25 deletions(-) diff --git a/drivers/scsi

[PATCH 12/23] mpt3sas: switch to using ->device_configure

2024-03-24 Thread Christoph Hellwig
Switch to the ->device_configure method instead of ->slave_configure and update the block limits on the passed in queue_limits instead of using the per-limit accessors. Signed-off-by: Christoph Hellwig --- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 18 -- 1 file chan

[PATCH 13/23] sbp2: switch to using ->device_configure

2024-03-24 Thread Christoph Hellwig
Switch to the ->device_configure method instead of ->slave_configure and update the block limits on the passed in queue_limits instead of using the per-limit accessors. Signed-off-by: Christoph Hellwig --- drivers/firewire/sbp2.c | 7 --- 1 file changed, 4 insertions(+), 3 del

[PATCH 17/23] usb-storage: switch to using ->device_configure

2024-03-24 Thread Christoph Hellwig
ed-off-by: Christoph Hellwig --- drivers/usb/storage/scsiglue.c | 36 -- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c index eb4ba03e082d89..b31464740f6c86 100644 --- a/drivers/usb/s

[PATCH 16/23] pmcraid: switch to using ->device_configure

2024-03-24 Thread Christoph Hellwig
Switch to the ->device_configure method instead of ->slave_configure and update the block limits on the passed in queue_limits instead of using the per-limit accessors. Signed-off-by: Christoph Hellwig --- drivers/scsi/pmcraid.c | 11 ++- 1 file changed, 6 insertions(+), 5 del

[PATCH 15/23] ipr: switch to using ->device_configure

2024-03-24 Thread Christoph Hellwig
Switch to the ->device_configure method instead of ->slave_configure and update the block limits on the passed in queue_limits instead of using the per-limit accessors. Signed-off-by: Christoph Hellwig --- drivers/scsi/ipr.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-)

[PATCH 14/23] hptiop: switch to using ->device_configure

2024-03-24 Thread Christoph Hellwig
Switch to the ->device_configure method instead of ->slave_configure and update the block limits on the passed in queue_limits instead of using the per-limit accessors. Signed-off-by: Christoph Hellwig --- drivers/scsi/hptiop.c | 8 1 file changed, 4 insertions(+), 4 deletions(-)

[PATCH 22/23] uas: switch to using ->device_configure to configure queue limits

2024-03-24 Thread Christoph Hellwig
kes it match everyone else. Signed-off-by: Christoph Hellwig --- drivers/usb/storage/uas.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index 0668182e1c469c..738c183ccada8d 100644 --- a/drivers/usb/storage

[PATCH 23/23] block: remove now unused queue limits helpers

2024-03-24 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- block/blk-settings.c | 245 - drivers/s390/block/dasd_eckd.c | 6 +- include/linux/blkdev.h | 13 -- include/linux/mmc/host.h | 4 +- 4 files changed, 5 insertions(+), 263 deletions(-) diff --git

Re: [PATCH 06/23] scsi: add a no_highmem flag to struct Scsi_Host

2024-03-26 Thread Christoph Hellwig
On Mon, Mar 25, 2024 at 04:26:55PM +0900, Damien Le Moal wrote: > On 3/25/24 08:54, Christoph Hellwig wrote: > > While we really should be killing the block layer bounce buffering ASAP, > > I even more urgently need to stop the drivers to fiddle with the limits > > from -&

Re: [PATCH 10/23] scsi: add a device_configure method to the host template

2024-03-26 Thread Christoph Hellwig
On Mon, Mar 25, 2024 at 01:35:08PM -0700, Bart Van Assche wrote: > There are two methods with names that are politically charged: > slave_configure() and slave_alloc(). Shouldn't both be renamed? Probably. This series howerver doesn't actually renames anything, it just adds a new method that

Re: [PATCH 10/23] scsi: add a device_configure method to the host template

2024-03-26 Thread Christoph Hellwig
On Mon, Mar 25, 2024 at 04:38:43PM +0900, Damien Le Moal wrote: > > + if (hostt->device_configure) > > + ret = hostt->device_configure(sdev, ); > > + else if (hostt->slave_configure) > > + ret = hostt->slave_configure(sdev); > > + > > + ret2 =

Re: [PATCH 13/23] sbp2: switch to using ->device_configure

2024-03-26 Thread Christoph Hellwig
On Tue, Mar 26, 2024 at 06:30:45PM +0900, Takashi Sakamoto wrote: > > drivers/firewire/sbp2.c | 7 --- > > 1 file changed, 4 insertions(+), 3 deletions(-) > > I'm not good at any kind of storage protocol, thus execute me not to > review it. My concern is which subsystem provides the change