RE: [PATCH] scsi: devinfo: Add Microsoft iSCSI target to 1024 sector blacklist

2018-04-05 Thread KY Srinivasan
+Matt > -Original Message- > From: Ross Lagerwall > Sent: Thursday, April 5, 2018 9:58 AM > To: Long Li ; Martin K. Petersen > ; KY Srinivasan > Cc: James E.J. Bottomley

Re: [PATCH] target: change default dbroot to /etc/target

2018-04-05 Thread Lee Duncan
On 04/05/2018 10:57 AM, Christoph Hellwig wrote: > On Thu, Apr 05, 2018 at 10:06:35AM -0700, Lee Duncan wrote: >> Also, I think it's a bit unlikely that anyone will still be using >> /var/target, since targetcli-fb has been setting the target root to >> /etc/target for a while now, and the old

Re: Multi-Actuator SAS HDD First Look

2018-04-05 Thread Tim Walker
On Tue, Apr 3, 2018 at 1:46 AM, Christoph Hellwig wrote: > On Sat, Mar 31, 2018 at 01:03:46PM +0200, Hannes Reinecke wrote: >> Actually I would propose to have a 'management' LUN at LUN0, who could >> handle all the device-wide commands (eg things like START STOP UNIT, >>

Re: 4.15.14 crash with iscsi target and dvd

2018-04-05 Thread Wakko Warner
Bart Van Assche wrote: > On Sun, 2018-04-01 at 14:27 -0400, Wakko Warner wrote: > > Wakko Warner wrote: > > > Wakko Warner wrote: > > > > I tested 4.14.32 last night with the same oops. 4.9.91 works fine. > > > > From the initiator, if I do cat /dev/sr1 > /dev/null it works. If I > > > > mount

Re: Multi-Actuator SAS HDD First Look

2018-04-05 Thread Douglas Gilbert
On 2018-04-05 07:43 PM, Tim Walker wrote: On Tue, Apr 3, 2018 at 1:46 AM, Christoph Hellwig wrote: On Sat, Mar 31, 2018 at 01:03:46PM +0200, Hannes Reinecke wrote: Actually I would propose to have a 'management' LUN at LUN0, who could handle all the device-wide commands

Re: [PATCH 01/10] staging: fnic2 add initialization

2018-04-05 Thread Greg Kroah-Hartman
On Thu, Apr 05, 2018 at 02:16:45PM -0700, Oliver Smith-Denny wrote: > These files contain module load and unload, global driver context, > PCI registration, PCI probe and remove, and definitions of > the fnic2 global context. > > Signed-off-by: Oliver Smith-Denny >

Re: [PATCH 02/10] staging: fnic2 add resource allocation

2018-04-05 Thread Greg Kroah-Hartman
On Thu, Apr 05, 2018 at 02:17:52PM -0700, Oliver Smith-Denny wrote: > --- /dev/null > +++ b/drivers/staging/fnic2/src/fnic2_isr.c > @@ -0,0 +1,324 @@ > +/* > + * SPDX-License-Identifier: GPL-2.0 > + * Copyright 2018 Cisco Systems, Inc. All rights reserved. > + * > + * This program is free

Re: [PATCH 03/10] staging: fnic2 add fip handling

2018-04-05 Thread Greg Kroah-Hartman
On Thu, Apr 05, 2018 at 02:18:37PM -0700, Oliver Smith-Denny wrote: > --- /dev/null > +++ b/drivers/staging/fnic2/src/fip.c > @@ -0,0 +1,804 @@ > +/* > + * SPDX-License-Identifier: GPL-2.0 > + * Copyright 2018 Cisco Systems, Inc. All rights reserved. > + * > + * This program is free software; you

Re: 4.15.14 crash with iscsi target and dvd

2018-04-05 Thread Wakko Warner
Wakko Warner wrote: > Bart Van Assche wrote: > > On Sun, 2018-04-01 at 14:27 -0400, Wakko Warner wrote: > > > Wakko Warner wrote: > > > > Wakko Warner wrote: > > > > > I tested 4.14.32 last night with the same oops. 4.9.91 works fine. > > > > > From the initiator, if I do cat /dev/sr1 > /dev/null

Re: 4.15.14 crash with iscsi target and dvd

2018-04-05 Thread Bart Van Assche
On Thu, 2018-04-05 at 22:06 -0400, Wakko Warner wrote: > I know now why scsi_print_command isn't doing anything. cmd->cmnd is null. > I added a dev_printk in scsi_print_command where the 2 if statements return. > Logs: > [ 29.866415] sr 3:0:0:0: cmd->cmnd is NULL That's something that should

Re: [PATCH 1/1] target:separate tx/rx cmd_puds

2018-04-05 Thread David Disseldorp
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

Re: *** SPAM *** Re: [RFC PATCH] mpt3sas: mpt3sas_scsih_enclosure_find_by_handle can be static

2018-04-05 Thread Jaco Kroon
Hi, Further to that, in the second last hunk there is a very clear functionality change: @@ -8756,12 +8859,12 @@ _scsih_mark_responding_expander(struct MPT3SAS_ADAPTER *ioc,     continue;     sas_expander->responding = 1; -   if (!encl_pg0_rc) +   

Re: usercopy whitelist woe in scsi_sense_cache

2018-04-05 Thread Oleksandr Natalenko
Hi. 04.04.2018 23:25, Kees Cook wrote: Thanks for the report! I hope someone more familiar with sg_io() can help explain the changing buffer offset... :P Also, FYI, I kept the server running with smartctl periodically invoked, and it was still triggering BUGs, however, I consider them to be

Re: [PATCH] target: change default dbroot to /etc/target

2018-04-05 Thread Christoph Hellwig
On Wed, Apr 04, 2018 at 12:47:03PM -0700, Lee Duncan wrote: > The dbroot (target PR database root directory) is > configurable but default to /var/target, a historic > value. But the reason for adding configurability > was to move the target directory out of /var. This > is because the File

Re: [PATCH v2] Fix DID_OK handling in __scsi_error_from_host_byte()

2018-04-05 Thread Christoph Hellwig
On Wed, Apr 04, 2018 at 10:53:55AM -0700, Bart Van Assche wrote: > + /* > + * Also check the other bytes than the status byte in result > + * to handle the case when a SCSI LLD sets result to > + * DRIVER_SENSE << 24 without setting

Re: [PATCH v2] Fix DID_OK handling in __scsi_error_from_host_byte()

2018-04-05 Thread Christoph Hellwig
On Thu, Apr 05, 2018 at 08:43:18AM +0200, Hannes Reinecke wrote: > And a further nit-pick: the function is called > __scsi_error_from_host_byte(), so it's only logical that it would only > check the host_byte(). > What's wrong is the _usage_ here; after calling > __scsi_error_from_host_byte() we

Re: [PATCH v2] Fix DID_OK handling in __scsi_error_from_host_byte()

2018-04-05 Thread Hannes Reinecke
On Wed, 4 Apr 2018 10:53:55 -0700 "Bart Van Assche" wrote: > Commit e39a97353e53 modified __scsi_error_from_host_byte() such > that that function translates DID_OK into BLK_STS_OK. However, > the description of that commit is wrong: it mentions that commit > 2a842acab109

Re: usercopy whitelist woe in scsi_sense_cache

2018-04-05 Thread Kees Cook
On Thu, Apr 5, 2018 at 2:56 AM, Oleksandr Natalenko wrote: > Hi. > > 04.04.2018 23:25, Kees Cook wrote: >> >> Thanks for the report! I hope someone more familiar with sg_io() can >> help explain the changing buffer offset... :P > > > Also, FYI, I kept the server running

Re: usercopy whitelist woe in scsi_sense_cache

2018-04-05 Thread Oleksandr Natalenko
Hi. 05.04.2018 16:21, Kees Cook wrote: I had a VM running over night with: [1] Running while :; do smartctl -a /dev/sda > /dev/null; done & [2]- Running while :; do ls --color=auto -lR / > /dev/null 2> /dev/null; done & [3]+ Running

Re: usercopy whitelist woe in scsi_sense_cache

2018-04-05 Thread Oleksandr Natalenko
05.04.2018 16:32, Oleksandr Natalenko wrote: "-hda sda.img -hdb sda.img" "-hda sda.img -hdb sdb.img", of course, I don't pass the same disk twice ☺

[PATCH v1 00/15] mpt3sas: Enhancements and Defect fixes.

2018-04-05 Thread Chaitra P B
Chaitra P B (15): mpt3sas: Bug fix for big endian systems. mpt3sas: Pre-allocate RDPQ Array at driver boot time. mpt3sas: Add sanity checks for scsi tracker before accessing it. mpt3sas: Lockless access for chain buffers. mpt3sas: Optimize I/O memory consumption in driver. mpt3sas:

[PATCH v1 12/15] mpt3sas: Update MPI Headers

2018-04-05 Thread Chaitra P B
Update MPI Files to support protocol level reset for NVMe device. Signed-off-by: Chaitra P B Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpi/mpi2.h | 9 ++--- drivers/scsi/mpt3sas/mpi/mpi2_cnfg.h | 30

[PATCH v1 10/15] mpt3sas: Cache enclosure pages during enclosure add.

2018-04-05 Thread Chaitra P B
In function _scsih_add_device, for each device connected to an enclosure, driver reads the enclosure page(To get details like enclosure handle, enclosure logical ID, enclosure level etc.) With this patch, instead of reading enclosure page everytime, driver maintains a list for enclosure

[PATCH v1 11/15] mpt3sas: Report Firmware Package Version from HBA Driver.

2018-04-05 Thread Chaitra P B
Added function _base_display_fwpkg_version, which sends FWUpload request to pull FW package version from FW Image Header. Now driver prints FW package version in addition to FW version if the PackageVersion is valid. Signed-off-by: Chaitra P B Signed-off-by:

[PATCH v1 09/15] mpt3sas: Allow processing of events during driver unload.

2018-04-05 Thread Chaitra P B
Events were not processed during driver unload, hence unloading of driver doesn't complete when drives are disconnected while unloading of driver. So don't block events in ISR path, i,e., remove the flag ioc->remove_host so that events are getting processed during driver unload. Thus allowing

[PATCH v1 05/15] mpt3sas: Optimize I/O memory consumption in driver.

2018-04-05 Thread Chaitra P B
For every IO, memory of PAGE size is allocated for handling NVMe native PRPS. And in addition to that for every IO (chains need per IO * chain buffer size, e.g. 38 * 128byte) amount of memory is allocated for chain buffers. However, at any point of time; the IO request can be for NVMe target

[PATCH v1 07/15] mpt3sas: Added support for SAS Device Discovery Error Event.

2018-04-05 Thread Chaitra P B
The SAS Device Discovery Error Event is sent to the host when discovery for a particular device is failed during discovery, even after maximum retries by the IOC. Signed-off-by: Chaitra P B Signed-off-by: Suganath Prabu S ---

[PATCH v1 06/15] mpt3sas: Enhanced handling of Sense Buffer.

2018-04-05 Thread Chaitra P B
Enhanced DMA allocation for Sense Buffer, if the allocation does not fit within same 4GB.Introduced is_MSB_are_same function to check if allocted buffer within 4GB range or not. Signed-off-by: Chaitra P B Signed-off-by: Suganath Prabu S

[PATCH v1 08/15] mpt3sas: Increase event log buffer to support 24 port HBA's.

2018-04-05 Thread Chaitra P B
For 24 port HBA's events generated by IOC are more in certain cases and the current circular buffer may be overwritten.Hence increased the event log buffer to accommodate more events. Signed-off-by: Chaitra P B Signed-off-by: Suganath Prabu S

[PATCH v1 15/15] mpt3sas: Update driver version "25.100.00.00"

2018-04-05 Thread Chaitra P B
Update driver version to match OOB/internal driver version. Signed-off-by: Chaitra P B Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpt3sas_base.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH v1 14/15] mpt3sas: fix possible memory leak.

2018-04-05 Thread Chaitra P B
In ioctl exit path driver refers ioc_list to free memory associated with diag buffers and event_log pointer used to save events by driver. If ctl_exit() func is called after unregistering driver, then ioc_list will be empty and hence driver will not be able to free the allocated memory which in

[PATCH v1 04/15] mpt3sas: Lockless access for chain buffers.

2018-04-05 Thread Chaitra P B
Introduces Chain lookup table/tracker and implements accessing chain buffer using smid. Removed link list based access of chain buffer which requires lock and allocated as many chains needed. Signed-off-by: Chaitra P B Signed-off-by: Suganath Prabu S

[PATCH v1 02/15] mpt3sas: Pre-allocate RDPQ Array at driver boot time.

2018-04-05 Thread Chaitra P B
Instead of allocating RDPQ array (This stores the address's of each RDPQ pools) at run time, now it will be allocated once during driver load time and same will be reused during host reset operation also (instead of allocating & freeing this buffer on the fly during every host reset operation) and

[PATCH v1 01/15] mpt3sas: Bug fix for big endian systems.

2018-04-05 Thread Chaitra P B
This patch fixes bug for big endian systems. Signed-off-by: Chaitra P B Signed-off-by: Suganath Prabu S --- drivers/scsi/mpt3sas/mpi/mpi2_init.h | 2 +- drivers/scsi/mpt3sas/mpt3sas_base.c | 57

[PATCH v1 03/15] mpt3sas: Add sanity checks for scsi tracker before accessing it.

2018-04-05 Thread Chaitra P B
Check scsi tracker 'st' for NULL and st->smid for zero (as driver uses smid starting from one) before accessing it. These checks are added as there are possibilities for getting valid scsi_cmd when driver calls scsi_host_find_tag() API when it loops using smid(i.e tag) from one to hba queue depth

Re: [PATCH] target: change default dbroot to /etc/target

2018-04-05 Thread Lee Duncan
On 04/05/2018 12:17 AM, Christoph Hellwig wrote: > On Wed, Apr 04, 2018 at 12:47:03PM -0700, Lee Duncan wrote: >> The dbroot (target PR database root directory) is >> configurable but default to /var/target, a historic >> value. But the reason for adding configurability >> was to move the target

Re: [PATCH v3 3/3] Make scsi_result_to_blk_status() recognize CONDITION MET

2018-04-05 Thread Christoph Hellwig
On Thu, Apr 05, 2018 at 10:33:01AM -0700, Bart Van Assche wrote: > Ensure that CONDITION MET and other non-zero status values that > indicate success are translated into BLK_STS_OK. > > Signed-off-by: Bart Van Assche Looks good, Reviewed-by: Christoph Hellwig

[PATCH v3 3/3] Make scsi_result_to_blk_status() recognize CONDITION MET

2018-04-05 Thread Bart Van Assche
Ensure that CONDITION MET and other non-zero status values that indicate success are translated into BLK_STS_OK. Signed-off-by: Bart Van Assche Cc: Hannes Reinecke Cc: Douglas Gilbert Cc: Damien Le Moal Cc:

[PATCH v3 2/3] Rename __scsi_error_from_host_byte() into scsi_result_to_blk_status()

2018-04-05 Thread Bart Van Assche
Since the next patch will modify this function such that it checks more than just the host byte of the SCSI result, rename __scsi_error_from_host_byte() into scsi_result_to_blk_status(). This patch does not change any functionality. Signed-off-by: Bart Van Assche Cc:

[PATCH v3 1/3] Revert "scsi: core: return BLK_STS_OK for DID_OK in __scsi_error_from_host_byte()"

2018-04-05 Thread Bart Van Assche
The description of commit e39a97353e53 is wrong: it mentions that commit 2a842acab109 introduced a bug in __scsi_error_from_host_byte() although that commit did not change the behavior of that function. Additionally, commit e39a97353e53 introduced a bug: it causes commands that fail with

[PATCH v3 0/3] Report all request failures again to user space

2018-04-05 Thread Bart Van Assche
Hello Martin, A recent change in the SCSI core caused certain request failures no longer to be reported to user space. Damien noticed this by sending a write request that is not aligned to the write pointer to an SMR drive from user space. Such non-aligned write requests are failed by the drive

Re: [PATCH v3 0/3] Report all request failures again to user space

2018-04-05 Thread Martin K. Petersen
Bart, > A recent change in the SCSI core caused certain request failures no > longer to be reported to user space. Damien noticed this by sending a > write request that is not aligned to the write pointer to an SMR drive > from user space. Such non-aligned write requests are failed by the >

Re: [PATCH] scsi: devinfo: Add Microsoft iSCSI target to 1024 sector blacklist

2018-04-05 Thread Ross Lagerwall
On 03/28/2018 11:33 PM, Long Li wrote: Subject: Re: [PATCH] scsi: devinfo: Add Microsoft iSCSI target to 1024 sector blacklist Long, KY: Please confirm. The Windows Server 2016 iSCSI target doesn't work with the Linux kernel initiator since the kernel started sending larger requests by

Re: [PATCH v3 2/3] Rename __scsi_error_from_host_byte() into scsi_result_to_blk_status()

2018-04-05 Thread Christoph Hellwig
On Thu, Apr 05, 2018 at 10:33:00AM -0700, Bart Van Assche wrote: > Since the next patch will modify this function such that it > checks more than just the host byte of the SCSI result, rename > __scsi_error_from_host_byte() into scsi_result_to_blk_status(). > This patch does not change any

Re: [PATCH v3 1/3] Revert "scsi: core: return BLK_STS_OK for DID_OK in __scsi_error_from_host_byte()"

2018-04-05 Thread Christoph Hellwig
Looks good: Reviewed-by: Christoph Hellwig

Re: [PATCH] target: change default dbroot to /etc/target

2018-04-05 Thread Christoph Hellwig
On Thu, Apr 05, 2018 at 10:06:35AM -0700, Lee Duncan wrote: > Also, I think it's a bit unlikely that anyone will still be using > /var/target, since targetcli-fb has been setting the target root to > /etc/target for a while now, and the old targetcli has been deprecated. > (It's the only app I

Re: usercopy whitelist woe in scsi_sense_cache

2018-04-05 Thread Kees Cook
[forcing non-HTML and resending...] On Thu, Apr 5, 2018 at 7:33 AM, Oleksandr Natalenko wrote: > > 05.04.2018 16:32, Oleksandr Natalenko wrote: >> >> "-hda sda.img -hdb sda.img" > > > "-hda sda.img -hdb sdb.img", of course, I don't pass the same disk twice Okay. My