On Thu, 6 Dec 2018 15:25:42 +0300, Roman Bolshakov wrote:
> > /*
> > + * STANDARD and VPD page 0x80 T10 Vendor Identification
>
> Perhaps you meant 0x83 (Device Identification VPD page, T10 vendor ID
> based designator). INQUIRY page 0x80 is Unit Serial Number.
Indeed, the comment should
s set when the backstore
device is enabled.
Signed-off-by: David Disseldorp
---
drivers/target/target_core_configfs.c | 70 +++
1 file changed, 70 insertions(+)
diff --git a/drivers/target/target_core_configfs.c
b/drivers/target/target_core_configfs.c
index 82
of ConfigFS.
Signed-off-by: David Disseldorp
Reviewed-by: Roman Bolshakov
---
drivers/target/target_core_device.c | 21 +++--
1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/drivers/target/target_core_device.c
b/drivers/target/target_core_device.c
index ebd787bb29a8
instead.
Signed-off-by: David Disseldorp
---
drivers/target/target_core_configfs.c | 16 +++
drivers/target/target_core_device.c | 46 ++--
drivers/target/target_core_pscsi.c| 50 +++
drivers/target/target_core_spc.c
in the standard INQUIRY data as well as the
T10 VENDOR IDENTIFICATION field in the INQUIRY Device Identification VPD
Page are zero-terminated/zero-padded.
Fix this inconsistency by using space-padding for all of the above
fields.
Signed-off-by: David Disseldorp
Reviewed-by: Christoph Hellwig
istent INQUIRY data padding as a separate patch
- Drop t10_wwn.model buffer print fix, already upstream
Changes since v1:
- https://www.spinics.net/lists/target-devel/msg10545.html
- Rebase against nab's for-next branch, which includes Christoph's
configfs API changes.
David Disseldorp (5):
On Tue, 4 Dec 2018 15:13:51 +0300, Roman Bolshakov wrote:
> > + /* Assume ASCII encoding. Strip any newline added from userspace. */
> > + BUILD_BUG_ON(sizeof(dev->t10_wwn.vendor) != INQUIRY_VENDOR_LEN + 1);
> > + strlcpy(dev->t10_wwn.vendor, strstrip(buf),
> > +
On Tue, 4 Dec 2018 16:26:59 +0300, Roman Bolshakov wrote:
> wrt PATCH 5 in the series. Should we allow to set vendor_id for for
> pscsi? target_transport_configure sets t10_wwn fields for pscsi, but but
> an attempt to set vendor_id will overwrite the value recieved from
> scsi_device.
I
instead.
Signed-off-by: David Disseldorp
Reviewed-by: Hannes Reinecke
---
drivers/target/target_core_configfs.c | 14 +++---
drivers/target/target_core_device.c | 49 ---
drivers/target/target_core_pscsi.c| 18 -
drivers/target
s set when the backstore
device is enabled.
Signed-off-by: David Disseldorp
Reviewed-by: Bryant G. Ly
Reviewed-by: Lee Duncan
Reviewed-by: Hannes Reinecke
---
drivers/target/target_core_configfs.c | 48 +++
1 file changed, 48 insertions(+)
diff --git a/driv
in the standard INQUIRY data as well as the
T10 VENDOR IDENTIFICATION field in the INQUIRY Device Identification VPD
Page are zero-terminated/zero-padded.
Fix this inconsistency by using space-padding for all of the above
fields.
Signed-off-by: David Disseldorp
Reviewed-by: Christoph Hellwig
Use the value stored in t10_wwn.vendor, which defaults to "LIO-ORG", but
can be reconfigured via the vendor_id ConfigFS attribute.
Signed-off-by: David Disseldorp
Reviewed-by: Bryant G. Ly
Reviewed-by: Lee Duncan
Reviewed-by: Hannes Reinecke
---
drivers/target/target_core
for
anything outside of ConfigFS.
Signed-off-by: David Disseldorp
---
drivers/target/target_core_device.c | 27 ++-
1 file changed, 10 insertions(+), 17 deletions(-)
diff --git a/drivers/target/target_core_device.c
b/drivers/target/target_core_device.c
index 5512871f50e4
This patch-set allows for the modification of the T10 Vendor
Identification string returned in the SCSI INQUIRY response, via the
target/core/$backstore/$name/wwn/vendor_id ConfigFS path.
Changes since v5:
- remove unnecessary TRANSPORT_FLAG_PASSTHROUGH conditional from t10_wwn
ID defaults
On Sun, 2 Dec 2018 23:22:23 +0100, David Disseldorp wrote:
> > > + if (!(dev->transport->transport_flags & TRANSPORT_FLAG_PASSTHROUGH)) {
> > > + strlcpy(dev->t10_wwn.vendor, "LIO-ORG",
> > > + sizeof(dev->t10_wwn.vend
Hi Hannes,
Thanks for the feedback...
On Sat, 1 Dec 2018 15:59:25 +0100, Hannes Reinecke wrote:
> On 12/1/18 12:34 AM, David Disseldorp wrote:
...
> > @@ -810,6 +810,23 @@ struct se_device *target_alloc_device(struct se_hba
> > *hba, const char *name)
> >
Initialise the t10_wwn vendor, model and revision defaults when a
device is allocated instead of when it's enabled. This ensures that
custom vendor or model strings set prior to enablement are not later
overwritten with default values.
Signed-off-by: David Disseldorp
---
drivers/target
instead.
Signed-off-by: David Disseldorp
---
drivers/target/target_core_configfs.c | 14 +++---
drivers/target/target_core_device.c | 49 ---
drivers/target/target_core_pscsi.c| 18 -
drivers/target/target_core_spc.c | 7 ++---
drivers
s set when the backstore
device is enabled.
Signed-off-by: David Disseldorp
Reviewed-by: Bryant G. Ly
Reviewed-by: Lee Duncan
---
drivers/target/target_core_configfs.c | 48 +++
1 file changed, 48 insertions(+)
diff --git a/drivers/target/target_core_configfs.c
b/driv
Use the value stored in t10_wwn.vendor, which defaults to "LIO-ORG", but
can be reconfigured via the vendor_id ConfigFS attribute.
Signed-off-by: David Disseldorp
Reviewed-by: Bryant G. Ly
Reviewed-by: Lee Duncan
---
drivers/target/target_core_spc.c | 8 +---
1 file changed, 5
changes.
David Disseldorp (5):
target: use consistent left-aligned ASCII INQUIRY data
target: consistently null-terminate t10_wwn strings
target: add device vendor_id configfs attribute
target: remove hardcoded T10 Vendor ID in INQUIRY response
target: perform t10_wwn
in the standard INQUIRY data as well as the
T10 VENDOR IDENTIFICATION field in the INQUIRY Device Identification VPD
Page are zero-terminated/zero-padded.
Fix this inconsistency by using space-padding for all of the above
fields.
Signed-off-by: David Disseldorp
Reviewed-by: Christoph Hellwig
On Fri, 30 Nov 2018 14:17:49 +0100, David Disseldorp wrote:
> > Where is the code that initializes dev->t10_wwn.vendor to "LIO-ORG"? Did I
> > perhaps overlook something?
>
> This is done in target_configure_device() .
Hmm, continuing to do it there may cause
On Thu, 29 Nov 2018 08:35:26 -0800, Bart Van Assche wrote:
> Where is the code that initializes dev->t10_wwn.vendor to "LIO-ORG"? Did I
> perhaps overlook something?
This is done in target_configure_device() .
> Additionally, why are you using strnlen() for
> a string of which it is guaranteed
On Thu, 29 Nov 2018 08:32:47 -0800, Bart Van Assche wrote:
> > + unsigned char buf[INQUIRY_VENDOR_LEN + 1];
> > +
> > + if (strlen(page) > INQUIRY_VENDOR_LEN) {
> > + pr_err("Emulated T10 Vendor Identification exceeds"
> > + " INQUIRY_VENDOR_LEN: "
On Thu, 29 Nov 2018 08:24:38 -0800, Bart Van Assche wrote:
> On Thu, 2018-11-29 at 02:01 +0100, David Disseldorp wrote:
> > diff --git a/drivers/target/target_core_configfs.c
> > b/drivers/target/target_core_configfs.c
> > index f6b1549f4142..9f49b1afd685 100644
>
to avoid changing the model string for existing deployments.
Signed-off-by: David Disseldorp
---
drivers/target/target_core_configfs.c | 8 +---
drivers/target/target_core_device.c | 8 +---
drivers/target/target_core_pscsi.c| 6 --
drivers/target/target_core_spc.c | 2
From: Bart Van Assche
The existing for loops step over null-terminators for right-padding.
Padding can be achieved in a much simpler way using printf width
specifiers.
Signed-off-by: David Disseldorp
---
drivers/target/target_core_device.c | 35 ---
drivers
Use the value stored in t10_wwn.vendor, which defaults to "LIO-ORG", but
can be reconfigured via the vendor_id ConfigFS attribute.
Signed-off-by: David Disseldorp
---
drivers/target/target_core_spc.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/driv
The pscsi_set_inquiry_info() codepath doesn't currently explicitly
null-terminate t10_wwn.revision.
Add an extra byte to the t10_wwn.model buffer and perform null string
termination in all cases.
Signed-off-by: David Disseldorp
---
drivers/target/target_core_device.c | 6 --
drivers/target
s set when the backstore
device is enabled.
Signed-off-by: David Disseldorp
---
drivers/target/target_core_configfs.c | 48 +++
1 file changed, 48 insertions(+)
diff --git a/drivers/target/target_core_configfs.c
b/drivers/target/target_core_configfs.c
index 9f
In preparation for supporting user provided vendor strings, add an extra
byte to t10_wwn.vendor which will ensure null string termination when an
eight byte vendor string is provided by the user.
Signed-off-by: David Disseldorp
---
drivers/target/target_core_device.c | 6 --
drivers/target
://www.spinics.net/lists/target-devel/msg10545.html
- Rebase against nab's for-next branch, which includes Christoph's
configfs API changes.
Bart Van Assche (1):
target: use printf width specifier for t10_wwn field dumps
David Disseldorp (6):
target: use consistent left-aligned ASCII INQUIRY data
in the standard INQUIRY data as well as the
T10 VENDOR IDENTIFICATION field in the INQUIRY Device Identification VPD
Page are zero-terminated/zero-padded.
Fix this inconsistency by using space-padding for all of the above
fields.
Signed-off-by: David Disseldorp
Reviewed-by: Christoph Hellwig
Hi Bart,
On Wed, 28 Nov 2018 08:36:19 -0800, Bart Van Assche wrote:
> Maybe I'm missing something, but why is zeroing of unused bytes in these
> functions
> necessary? Would the following be correct if all strings in struct t10_wwn
> would be
> '\0'-terminated?
Your patch looks good to me.
On Wed, 28 Nov 2018 08:08:30 -0800, Bart Van Assche wrote:
> > Just a follow up here. I think it's safer to retain strncpy() in this
> > function for the purpose of zero filling. scsi_dump_inquiry() and
> > target_stat_lu_vend_show() walk the entire length of the t10_wwn.vendor
> > buffer.
>
>
On Tue, 20 Nov 2018 19:00:57 +0100, David Disseldorp wrote:
> > > + strncpy(buf, page, sizeof(buf));
> >
> > Isn't strncpy() deprecated? How about using strlcpy() instead?
>
> Will change to use strlcpy in the next round.
Just a follow up here. I think i
On Fri, 23 Nov 2018 11:22:08 +0100, David Disseldorp wrote:
> > > Both fabric_ops.get_fabric_name() and fabric_ops.name are user facing,
> > > with the former being used for PR/ALUA state and the latter for configFS
> > > (config/target/$name), so we unfortunatel
unfortunately need to keep both strings
around for now.
Replace the useless .get_fabric_name() accessor function with a const
string fabric_name member variable.
Signed-off-by: David Disseldorp
---
drivers/infiniband/ulp/srpt/ib_srpt.c| 7 +--
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 7
() - use a new fabric_ops.fabric_alias
member to handle the iscsi_target_mod special case.
Cheers, David
David Disseldorp (3):
target: drop unused pi_prot_format attribute storage
target: drop unnecessary get_fabric_name() accessor from fabric_ops
target: replace fabric_ops.name
initialised.
iscsi_target_mod is the only fabric module to set .fabric_alias . All
other fabric modules rely on .fabric_name matching and can drop the
duplicate string.
Signed-off-by: David Disseldorp
---
drivers/infiniband/ulp/srpt/ib_srpt.c| 1 -
drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c
-by: David Disseldorp
---
drivers/target/target_core_configfs.c | 3 +--
include/target/target_core_base.h | 1 -
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/target/target_core_configfs.c
b/drivers/target/target_core_configfs.c
index 70b9f6755c36..62427acdf503 100644
On Thu, 22 Nov 2018 23:19:10 -0800, Christoph Hellwig wrote:
> On Thu, Nov 22, 2018 at 03:16:23PM +0100, David Disseldorp wrote:
> > All fabrics return a const string. In all cases *except* iSCSI the
> > get_fabric_name() string matches fabric_ops.name.
> >
> > Both
unfortunately need to keep both strings
around for now.
Replace the useless .get_fabric_name() accessor function with a const
string fabric_name member variable.
Signed-off-by: David Disseldorp
---
Note: This conflicts with:
[RFC PATCH] target: sanitize ALUA and PR state file paths before use
I'll
Block ALUA and PR state storage if any of the dynamic subdirectory
components include a path separator.
Fixes: c66ac9db8d4a ("[SCSI] target: Add LIO target core v4.0.0-rc6")
Signed-off-by: David Disseldorp
Signed-off-by: Lee Duncan
---
Note:
Submitted as an RFC, as I've not prope
On Tue, 20 Nov 2018 09:24:39 -0800, Bart Van Assche wrote:
> On Mon, 2018-11-19 at 22:06 +0100, David Disseldorp wrote:
> > /*
> > + * STANDARD and VPD page 0x80 T10 Vendor Identification
> > + */
> > +static ssize_t target_wwn_vendor_id_show(struct config_item *item,
On Tue, 20 Nov 2018 08:49:24 -0800, Christoph Hellwig wrote:
> This could use a little more explanation, the code doesn't just
> add a little if but also changes the existing case. Also where
> can't it be null currently?
I'll add an explanation in the next round. This patch shouldn't cause
any
in the standard INQUIRY data as well as the
T10 VENDOR IDENTIFICATION field in the INQUIRY Device Identification VPD
Page are zero-terminated/zero-padded.
Fix this inconsistency by using space-padding for all of the above
fields.
Signed-off-by: David Disseldorp
---
drivers/target/target_core_spc.c
Signed-off-by: David Disseldorp
---
drivers/target/target_core_stat.c | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/target/target_core_stat.c
b/drivers/target/target_core_stat.c
index f0db91ebd735..89f35167f036 100644
--- a/drivers/target
Use the value stored in t10_wwn.vendor, which defaults to "LIO-ORG", but
can be reconfigured via the vendor_id ConfigFS attribute.
Signed-off-by: David Disseldorp
---
drivers/target/target_core_spc.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/driv
.
David Disseldorp (4):
target: use consistent left-aligned ASCII INQUIRY data
target: don't assume t10_wwn.vendor is null terminated
target: add device vendor_id configfs attribute
target: remove hardcoded T10 Vendor ID in INQUIRY response
drivers/target/target_core_configfs.c
s set when the backstore
device is enabled.
Signed-off-by: David Disseldorp
---
drivers/target/target_core_configfs.c | 55 +++
include/target/target_core_base.h | 3 +-
2 files changed, 57 insertions(+), 1 deletion(-)
diff --git a/drivers/target/target_core_con
Ping, did anyone get a chance to look at this one?
Cheers, David
Hi Mike
On Tue, 30 Oct 2018 10:54:07 -0500, Mike Christie wrote:
> >> This patchset removes a couple of unused error stat counters and a
> >> redundant cumulative counter.
> >> I've tagged this patchset RFC, as it may be considered a kernel<->user
> >> (configfs) API change.
> >
> > Ping, any
ends to block such requests,
avoiding the multi-node reservation state propagation.
When explicitly disabled, PR and RESERVE/RELEASE requests receive
Invalid Command Operation Code response sense data.
Signed-off-by: David Disseldorp
---
drivers/target/target_core_configfs.c
On Tue, 6 Nov 2018 19:54:17 -0600, Mike Christie wrote:
> > - return snprintf(page, PAGE_SIZE, "%d\n",
> > - flags & TRANSPORT_FLAG_PASSTHROUGH_PGR ? 0 : 1);
> > + if (!da->da_dev->dev_attrib.emulate_pr ||
> > + (flags & TRANSPORT_FLAG_PASSTHROUGH_PGR))
> > +
ends to block such requests,
avoiding the need for multi-node reservation state propagation.
When explicitly disabled, PR and RESERVE/RELEASE requests receive
Invalid Command Operation Code response sense data.
Signed-off-by: David Disseldorp
---
drivers/target/target_core_configfs.c
On Wed, 17 Oct 2018 17:48:17 +0200, David Disseldorp wrote:
> This patchset removes a couple of unused error stat counters and a
> redundant cumulative counter.
> I've tagged this patchset RFC, as it may be considered a kernel<->user
> (configfs) API change.
Ping, any thought
Signed-off-by: David Disseldorp
---
drivers/target/iscsi/iscsi_target_stat.c | 14 +-
include/target/iscsi/iscsi_target_stat.h | 2 --
2 files changed, 1 insertion(+), 15 deletions(-)
diff --git a/drivers/target/iscsi/iscsi_target_stat.c
b/drivers/target/iscsi/iscsi_target_stat.c
The cumulative session errors metric matches cxn_timeout_errors, so drop
the duplicate.
Signed-off-by: David Disseldorp
---
drivers/target/iscsi/iscsi_target_stat.c | 16
1 file changed, 16 deletions(-)
diff --git a/drivers/target/iscsi/iscsi_target_stat.c
b/drivers/target
Signed-off-by: David Disseldorp
---
drivers/target/iscsi/iscsi_target_stat.c | 14 +-
include/target/iscsi/iscsi_target_stat.h | 2 --
2 files changed, 1 insertion(+), 15 deletions(-)
diff --git a/drivers/target/iscsi/iscsi_target_stat.c
b/drivers/target/iscsi/iscsi_target_stat.c
This patchset removes a couple of unused error stat counters and a
redundant cumulative counter.
I've tagged this patchset RFC, as it may be considered a kernel<->user
(configfs) API change.
Cheers, David
---
drivers/target/iscsi/iscsi_target_stat.c | 40
On Tue, 16 Oct 2018 00:42:57 -0400, Martin K. Petersen wrote:
> > I guess I'll resend entire series in future to avoid false kbuild
> > reports.
>
> Yes, please. Patchwork can't handle individual patches getting updated
> either.
Okay, will do.
> Applied to 4.20/scsi-queue.
Thanks Martin.
On Sun, 14 Oct 2018 11:43:34 +0800, kbuild test robot wrote:
> Thank you for the patch! Yet something to improve:
>
> [auto build test ERROR on target/master]
> [also build test ERROR on v4.19-rc7 next-20181012]
> [if your patch is applied to the wrong git tree, please drop us a note to
> help
Replace existing nested code blocks with helper function calls.
Signed-off-by: David Disseldorp
---
drivers/target/iscsi/iscsi_target_erl0.c | 15 +
drivers/target/iscsi/iscsi_target_util.c | 36 ++--
drivers/target/iscsi/iscsi_target_util.h | 1 +
3
On Fri, 12 Oct 2018 09:11:27 -0700, Bart Van Assche wrote:
> There have been too many problems with strcpy() and buffer overflows in the
> past. If the source and destination strings both have the same size, please
> add a BUILD_BUG_ON() statement that verifies that at compile time. If that
>
The following patchset converts existing Data-Out and NOP ping timeout
messages from pr_debug() to pr_error(), to reflect the seriousness of
unexpected connection termination events.
These events can be triggered using a couple of libiscsi client hacks:
sess_err_stats are currently filled on NOP ping timeout, but not
Data-Out timeout. Stash details of Data-Out timeouts using a
ISCSI_SESS_ERR_CXN_TIMEOUT value for last_sess_failure_type.
Signed-off-by: David Disseldorp
---
drivers/target/iscsi/iscsi_target_erl1.c | 1 +
1 file changed, 1
Data-Out timeouts resulting in connection outages should be logged as
errors. Include the I_T Nexus in the message to aid path identification.
Signed-off-by: David Disseldorp
---
drivers/target/iscsi/iscsi_target_erl1.c | 16 +++-
1 file changed, 11 insertions(+), 5 deletions
Replace existing nested code blocks with helper function calls.
Signed-off-by: David Disseldorp
---
drivers/target/iscsi/iscsi_target_erl0.c | 15 +-
drivers/target/iscsi/iscsi_target_util.c | 35 +---
drivers/target/iscsi/iscsi_target_util.h | 1 +
3
Events resulting in connection outages like this should be logged as
errors. Include the I_T Nexus in the message to aid path identification.
Signed-off-by: David Disseldorp
---
drivers/target/iscsi/iscsi_target_util.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git
Move the ISCSI_IQN_LEN definition up, so that it can be used in more
places instead of a hardcoded value.
Signed-off-by: David Disseldorp
---
drivers/target/iscsi/iscsi_target_stat.c | 4 ++--
include/target/iscsi/iscsi_target_core.h | 6 +++---
include/target/iscsi/iscsi_target_stat.h | 4
quot; test in the
Windows 2016 Server Failover Cluster validation suites when having
many connections that result in more than 8 registrations. I tested
your patch on 4.17 with iblock.
This behaviour can be tested using the libiscsi PrinReadKeys.Truncate
test.
Cc: sta...@vger.kernel.org
Signed-off
cc'ing the SCSI list, as it doesn't look like anything is making it
through target-devel nowadays...
https://patchwork.kernel.org/patch/10448059/
Cheers, David
On Tue, 5 Jun 2018 12:00:25 +0200, David Disseldorp wrote:
> SPC5r17 states that the contents of the ADDITIONAL LENGTH fi
On Mon, 18 Jun 2018 04:12:17 -0700, Christoph Hellwig wrote:
> On Sun, Jun 17, 2018 at 12:40:56PM +0800, Zhu Lingshan wrote:
> > Hello Mike and Christoph,
> > Thanks Mike's comment inspired me, if I understand this correctly, it is
> > suggested to implement this whole solution in kernel, avoid
>
On Thu, 5 Apr 2018 13:12:12 +0200, David Disseldorp wrote:
> > -CONFIGFS_ATTR_RO(target_stat_tgt_port_, in_cmds);
> > +CONFIGFS_ATTR_RO(target_stat_tgt_port_, tx_cmds);
> > +CONFIGFS_ATTR_RO(target_stat_tgt_port_, rx_cmds);
>
> I don't think the in_cmds metric should b
Hi,
The commit summary has a typo (cmd_puds). That said, this change
isn't iSCSI specific, so using "pdu" here doesn't make much sense IMO.
On Wed, 21 Mar 2018 17:52:43 +0800, Zhang Zhuoyu wrote:
> Separate tx/rx cmd_pdus in order to distinguish LUN read/write IOPS.
>
> Signed-off-by: Zhang
Hi Christoph,
On Tue, 4 Aug 2015 09:11:05 +0200, Christoph Hellwig wrote:
This series adds support for a simplified persistent reservation API
to the block layer. The intent is that both in-kernel and userspace
consumers can use the API instead of having to hand craft SCSI or NVMe
command
On Tue, 11 Aug 2015 14:26:34 +0200, Christoph Hellwig wrote:
if you want to add SCSI-2 RESERVE/RELEASE it would be at least
different opcodes if not an entirely different API. But what for?
RESERVE/RELEASE are basially unsuable and that's why there are
almost no users out there, and they can
79 matches
Mail list logo