Re: ["PATCH-v2" 00/22] lpfc updates for 11.2.0.12

2017-04-21 Thread Christoph Hellwig
On Fri, Apr 21, 2017 at 02:52:13AM +0300, Sagi Grimberg wrote: > > > The patches are dependent on the FC nvme/nvmet patches from the following 2 > > series: > > http://lists.infradead.org/pipermail/linux-nvme/2017-April/009250.html > >

[PATCH 0/9] scsi: sd/sd_zbc cleanup and improvements

2017-04-21 Thread damien . lemoal
From: Damien Le Moal This series of small patches cleanup code mainly in sd.c and sd_zbc.c, with another small improvement in scsi_error.c. The first 2 patches are not stricktly necessary but would be great to apply to make emacs pretty printer happy and reduce its

[PATCH 1/9] sd: Remove white space before EOL

2017-04-21 Thread damien . lemoal
From: Damien Le Moal No functional change is introduced by this patch. Signed-off-by: Damien Le Moal --- drivers/scsi/sd.c | 60 +++ 1 file changed, 30 insertions(+), 30 deletions(-) diff --git

[PATCH 2/9] sd: Fix functions description

2017-04-21 Thread damien . lemoal
From: Damien Le Moal Use regular format comments documenting functions, fix argument names, etc No functional change is introduced by this patch. Signed-off-by: Damien Le Moal --- drivers/scsi/sd.c | 272

Re: [PATCH v2 0/5] Re-order scsi_remove_host and sas_remove_host in SAS HBA LLDDs

2017-04-21 Thread John Garry
Thanks Johannes. @wangyijing, can you test this patchset please (specifically 3/5)? I know that you have the modified version of libsas which you dabbled with upstreaming. On 21/04/2017 09:04, Johannes Thumshirn wrote: This series re-orders the calls to scsi_remove_host() and

Re: [PATCH v2 0/5] Re-order scsi_remove_host and sas_remove_host in SAS HBA LLDDs

2017-04-21 Thread John Garry
On 21/04/2017 09:39, Johannes Thumshirn wrote: wangyijing already sent an RFC for fixing this issue (mentioned above), > which was a signifiagnt rewrite of some of libsas. > I am hoping that he would retry, and that community would support/shepherd > this activity, or at least say it will be

[PATCH 3/9] sd: Remove unecessary variable in sd_done()

2017-04-21 Thread damien . lemoal
From: Damien Le Moal The 'sense_deferred' variable in sd_done() is set only if 'sense_valid' is true. So it is not necessary and the result of scsi_sense_is_deferred() and of scsi_command_normalize_sense() can be combined together in 'sense_valid'. Also, since

[PATCH v2 5/5] scsi: pm8001: remove the SAS host after the SCSI host

2017-04-21 Thread Johannes Thumshirn
After commit bcdde7e ("sysfs: make __sysfs_remove_dir() recursive") changed the removal path of kernfs to make it recursive we have to remove the SAS host before the SCSI host or we will see sysfs warnings on not found sysfs groups for kobjects. Signed-off-by: Johannes Thumshirn

[PATCH v2 4/5] mvsas: remove the SAS host after the SCSI host

2017-04-21 Thread Johannes Thumshirn
After commit bcdde7e ("sysfs: make __sysfs_remove_dir() recursive") changed the removal path of kernfs to make it recursive we have to remove the SAS host before the SCSI host or we will see sysfs warnings on not found sysfs groups for kobjects. Signed-off-by: Johannes Thumshirn

[PATCH v2 3/5] scsi: hisi_sas: remove the SAS host after the SCSI host

2017-04-21 Thread Johannes Thumshirn
After commit bcdde7e ("sysfs: make __sysfs_remove_dir() recursive") changed the removal path of kernfs to make it recursive we have to remove the SAS host before the SCSI host or we will see sysfs warnings on not found sysfs groups for kobjects. Signed-off-by: Johannes Thumshirn

[PATCH v2 2/5] aic94xx: remove the SAS host after the SCSI host

2017-04-21 Thread Johannes Thumshirn
After commit bcdde7e ("sysfs: make __sysfs_remove_dir() recursive") changed the removal path of kernfs to make it recursive we have to remove the SAS host before the SCSI host or we will see sysfs warnings on not found sysfs groups for kobjects. Signed-off-by: Johannes Thumshirn

[PATCH v2 0/5] Re-order scsi_remove_host and sas_remove_host in SAS HBA LLDDs

2017-04-21 Thread Johannes Thumshirn
This series re-orders the calls to scsi_remove_host() and sas_remove_host() in all SAS HBA drivers (apart from mpt3sas which is doing it correctly). This is for two reasons: 1) After the change to recursive removal of sysfs entries, we're trying to remove already removed

[PATCH v2 1/5] scsi: isci: remove the SAS host after the SCSI host

2017-04-21 Thread Johannes Thumshirn
After commit bcdde7e ("sysfs: make __sysfs_remove_dir() recursive") changed the removal path of kernfs to make it recursive we have to remove the SAS host before the SCSI host or we will see sysfs warnings on not found sysfs groups for kobjects. Signed-off-by: Johannes Thumshirn

Re: [PATCH v2 0/5] Re-order scsi_remove_host and sas_remove_host in SAS HBA LLDDs

2017-04-21 Thread Johannes Thumshirn
On Fri, Apr 21, 2017 at 09:34:18AM +0100, John Garry wrote: > Thanks Johannes. > > @wangyijing, can you test this patchset please (specifically 3/5)? I know > that you have the modified version of libsas which you dabbled with > upstreaming. > > On 21/04/2017 09:04, Johannes Thumshirn wrote: >

[PATCH 4/9] sd: Improve sd_completed_bytes

2017-04-21 Thread damien . lemoal
From: Damien Le Moal Re-shuffle the code to be more efficient by not initializing variables upfront (i.e. do it only when necessary). Also replace the do_div calls with calls to sectors_to_logical(). No functional change is introduced by this patch. Signed-off-by: Damien

[PATCH 6/9] scsi: Improve scsi_get_sense_info_fld

2017-04-21 Thread damien . lemoal
From: Damien Le Moal Use get_unaligned_be32 and get_unaligned_be64 to obtain values from the sense buffer instead of open coding the operations. Also change the function return value to a bool. No functional change is introduced by this patch. Signed-off-by: Damien Le

[PATCH 5/9] sd: Cleanup sd_done sense data handling

2017-04-21 Thread damien . lemoal
From: Damien Le Moal In sd_done(), for the ILLEGAL REQUEST sense key case, add an 'else' after the first 'if (sshdr.asc == 0x10)' test to avoid the second test (the values tested are different). Still for the same ILLEGAL REQUEST case, move the declarations of the

[PATCH 8/9] sd_zbc: Remove superfluous assignments

2017-04-21 Thread damien . lemoal
From: Bart Van Assche A value is assigned to the variable 'capacity' in sd_zbc_read_zones() but that value is never used. Hence remove the variable 'capacity'. [Damien: There is no need to initialize to 0 the variable 'ret' in sd_zbc_read_zones()] Signed-off-by:

[PATCH 9/9] sd_zbc: Do not write lock zones for reset

2017-04-21 Thread damien . lemoal
From: Damien Le Moal Resetting a zone write pointer is equivalent to discarding sectors: after a reset, the zone sectors will contain zeros (or the format pattern). So there is no need for mutual exclusion between a zone reset and write. Similarly to discard, make it the

[PATCH 7/9] sd_zbc: Rename sd_zbc_setup_write_cmnd

2017-04-21 Thread damien . lemoal
From: Damien Le Moal Rename sd_zbc_setup_write_cmnd() to sd_zbc_write_lock_zone() to be clear about what the function actually does. To be consistent, also rename sd_zbc_cancel_write_cmnd() to sd_zbc_write_unlock_zone(). No functional change is introduced by this patch.

Re: ["PATCH-v2" 20/22] Update ABORT processing for NVMET.

2017-04-21 Thread Johannes Thumshirn
On Thu, Apr 20, 2017 at 03:04:46PM -0700, jsmart2...@gmail.com wrote: > From: James Smart > > The driver with nvme had this routine stubbed. > > Right now XRI_ABORTED_CQE is not handled and the FC NVMET > Transport has a new API for the driver. > > Missing code path, new

Re: [PATCH 3/4] nfs: remove the objlayout driver

2017-04-21 Thread Valentin Rothberg
Hi Christoph, I just came across this patch in linux-next commit 6d22323b2e9f. scripts/checkkconfigsymbols.py reports that there is a leftover reference on PNFS_OBJLAYOUT in fs/exofs/Kconfig.ore line 10 (depends on EXOFS_FS || PNFS_OBJLAYOUT). I assume that this reference can safely be removed

Re: [PATCH-v1 00/22] lpfc updates for 11.2.0.12

2017-04-21 Thread Johannes Thumshirn
On Thu, Apr 20, 2017 at 12:30:48PM -0600, Jens Axboe wrote: > On Wed, Apr 19 2017, jsmart2...@gmail.com wrote: > > From: James Smart > > > > This patch set provides a number of bug fixes, code cleanups, and error > > handling, mostly in the nvme area of lpfc. > > > > There

Re: [PATCH V2] scsi: mpt3sas: remove redundant wmb

2017-04-21 Thread Sreekanth Reddy
On Thu, Apr 20, 2017 at 7:58 AM, Martin K. Petersen wrote: > Sinan Kaya writes: > >> Due to relaxed ordering requirements on multiple architectures, >> drivers are required to use wmb/rmb/mb combinations when they need to >> guarantee

Re: [PATCH v2 0/5] Re-order scsi_remove_host and sas_remove_host in SAS HBA LLDDs

2017-04-21 Thread Johannes Thumshirn
On Fri, Apr 21, 2017 at 01:19:41PM +0200, Christoph Hellwig wrote: > > Any reason to not just make sas_remove_host call scsi_remove_host > to ensure we get the ordering right? No other than "haven't thought of it". But let me double check the LLDDs fist. -- Johannes Thumshirn

Re: [PATCH v2 0/5] Re-order scsi_remove_host and sas_remove_host in SAS HBA LLDDs

2017-04-21 Thread John Garry
On 21/04/2017 12:20, Christoph Hellwig wrote: On Fri, Apr 21, 2017 at 09:57:37AM +0100, John Garry wrote: On 21/04/2017 09:39, Johannes Thumshirn wrote: wangyijing already sent an RFC for fixing this issue (mentioned above), which was a signifiagnt rewrite of some of libsas. I am hoping that

Re: [PATCH 3/4] nfs: remove the objlayout driver

2017-04-21 Thread Christoph Hellwig
On Thu, Apr 20, 2017 at 08:18:28PM +, Trond Myklebust wrote: > OK. I'm applying this patch for the 4.12 merge window. If, as Boaz > suggests, there is still an interest in exofs, then I suggest we put > that to the test by moving it into the STAGING area, to see if someone > will step up to

[no subject]

2017-04-21 Thread Kredit
Hallo Wir bieten Darlehen von 5.000,00 Euro bis 20.000.000,00 Euro mit einer maximalen Rückzahlungsdauer von 30 Jahren zu 1.9% Zinssatz. Wenn Sie interessiert sind, kontaktieren Sie uns per E-Mail: myers.terryl...@aol.com Mrs. Myers Terry Lynn. Darlehen / Finanzdienstleister.

Re: [PATCH-v1 00/22] lpfc updates for 11.2.0.12

2017-04-21 Thread Martin K. Petersen
Johannes Thumshirn writes: > Just for clarification, shouldn't Martin take the patches? They're for > drivers/scsi/lpfc/ after all. I just want to avoid confusion and possible > merge conflicts. Yeah, at this point I think it's better we do a second stage merge through

[PATCH] scsi: sas: move scsi_remove_host call into sas_remove_host

2017-04-21 Thread Johannes Thumshirn
Move scsi_remove_host call into sas_remove_host and remove it from SAS HBA drivers, so we don't mess up the ordering. This solves an issue with double deleting sysfs entries that was introduced by the change of sysfs behaviour from commit bcdde7e ("sysfs: make __sysfs_remove_dir() recursive").

Re: [PATCH 3/4] nfs: remove the objlayout driver

2017-04-21 Thread Christoph Hellwig
On Fri, Apr 21, 2017 at 09:27:11AM +0200, Valentin Rothberg wrote: > Hi Christoph, > > I just came across this patch in linux-next commit 6d22323b2e9f. > scripts/checkkconfigsymbols.py reports that there is a leftover > reference on PNFS_OBJLAYOUT in fs/exofs/Kconfig.ore line 10 (depends > on

RE: [PATCH 0/5] v2: block subsystem refcounter conversions

2017-04-21 Thread Reshetova, Elena
> Hi Elena, > > On Thu, Apr 20, 2017 at 04:10:16PM +, Reshetova, Elena wrote: > > > > > All the objections from DaveM on the amount of cycles spent on the > > > new refcount_t apply to the block layer fast path operations as well. > > > > Ok, could you please indicate the correct way to

Re: [PATCH 0/5] v2: block subsystem refcounter conversions

2017-04-21 Thread Christoph Hellwig
On Thu, Apr 20, 2017 at 11:33:19AM -0700, Eric Biggers wrote: > Like I suggested months ago, how about doing an efficient implementation of > refcount_t which doesn't use the bloated cmpxchg loop? Then there would be no > need for endless performance arguments. In fact, in PaX there are already

Re: [PATCH v2 0/5] Re-order scsi_remove_host and sas_remove_host in SAS HBA LLDDs

2017-04-21 Thread Christoph Hellwig
On Fri, Apr 21, 2017 at 10:04:45AM +0200, Johannes Thumshirn wrote: > This series re-orders the calls to scsi_remove_host() and sas_remove_host() in > all SAS HBA drivers (apart from mpt3sas which is doing it correctly). This is > for two reasons: > 1) After the change to recursive removal

Re: [PATCH v2 0/5] Re-order scsi_remove_host and sas_remove_host in SAS HBA LLDDs

2017-04-21 Thread Christoph Hellwig
On Fri, Apr 21, 2017 at 09:57:37AM +0100, John Garry wrote: > On 21/04/2017 09:39, Johannes Thumshirn wrote: >>> wangyijing already sent an RFC for fixing this issue (mentioned above), >>> > which was a signifiagnt rewrite of some of libsas. >>> > I am hoping that he would retry, and that

Re: [PATCH] scsi: sas: move scsi_remove_host call into sas_remove_host

2017-04-21 Thread Christoph Hellwig
Looks good: Reviewed-by: Christoph Hellwig

Re: [PATCH] scsi: sas: move scsi_remove_host call into sas_remove_host

2017-04-21 Thread Jinpu Wang
On Fri, Apr 21, 2017 at 2:11 PM, Johannes Thumshirn wrote: > Move scsi_remove_host call into sas_remove_host and remove it from SAS HBA > drivers, so we don't mess up the ordering. This solves an issue with double > deleting sysfs entries that was introduced by the change of

Re: [PATCH 3/4] nfs: remove the objlayout driver

2017-04-21 Thread Boaz Harrosh
On 04/20/2017 11:18 PM, Trond Myklebust wrote: <> > > OK. I'm applying this patch for the 4.12 merge window. That is understandable this code was not tested for a long while > If, as Boaz > suggests, there is still an interest in exofs, then I suggest we put > that to the test by moving it

Re: [PATCH V2] scsi: mpt3sas: remove redundant wmb

2017-04-21 Thread Sinan Kaya
On 4/21/2017 3:56 AM, Sreekanth Reddy wrote: > [Sreekanth] Whether same thing applicable for SPARC & POWER > architectures. If yes then we are fine with this patch changes. This behavior is common for all architectures according to this document. Who would be the best person to comment on SPARC

Re: [PATCH v3] scsi/bfa: use designated initializers

2017-04-21 Thread Martin K. Petersen
Kees Cook writes: Kees, > Prepare to mark sensitive kernel structures for randomization by > making sure they're using designated initializers. This also > initializes the array members using the enum used to look up > __port_action entries. Applied to 4.12/scsi-queue.

Re: [PATCH] scsi: BusLogic: fix incorrect spelling of adatper_reset_req

2017-04-21 Thread Martin K. Petersen
Khalid, >> trivial fix to spelling mistake, adatper_reset_req should be >> adapter_reset_req. Also break up very long seq_printf statement into >> multiple lines. Applied to 4.12/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] scsi: BusLogic: fix incorrect spelling of adatper_reset_req

2017-04-21 Thread Khalid Aziz
On 02/21/2017 09:27 AM, Colin King wrote: > From: Colin Ian King > > trivial fix to spelling mistake, adatper_reset_req should > be adapter_reset_req. Also break up very long seq_printf statement > into multiple lines. > > Signed-off-by: Colin Ian King

Re: ["PATCH-v2" 00/22] lpfc updates for 11.2.0.12

2017-04-21 Thread Martin K. Petersen
James, > Also James once you do that please run the patches through sparse, > there are a few warnings in the changes, although they mostly seem > to replace old warnings with different ones. I'll let you know when 4.12/scsi-fixes is ready and you can use that as baseline. Depends when Linus

Re: [PATCH-v1 00/22] lpfc updates for 11.2.0.12

2017-04-21 Thread James Smart
On 4/21/2017 4:24 AM, Martin K. Petersen wrote: Johannes Thumshirn writes: Just for clarification, shouldn't Martin take the patches? They're for drivers/scsi/lpfc/ after all. I just want to avoid confusion and possible merge conflicts. Yeah, at this point I think it's

Re: [PATCH 6/9] scsi: Improve scsi_get_sense_info_fld

2017-04-21 Thread Bart Van Assche
On Fri, 2017-04-21 at 18:16 +0900, damien.lem...@wdc.com wrote: > @@ -2363,42 +2365,32 @@ EXPORT_SYMBOL(scsi_command_normalize_sense); > * Return value: > * 1 if information field found, 0 if not found. > */ > -int scsi_get_sense_info_fld(const u8 * sense_buffer, int sb_len, > -

Re: [PATCH 0/5] v2: block subsystem refcounter conversions

2017-04-21 Thread Jens Axboe
On 04/21/2017 09:22 AM, Peter Zijlstra wrote: > On Fri, Apr 21, 2017 at 08:03:13AM -0600, Jens Axboe wrote: >> You have it so easy - the code is completely standalone, building a >> small test framework around it and measuring performance in _user space_ >> is trivial. > > Something like this you

Re: [PATCH 0/5] v2: block subsystem refcounter conversions

2017-04-21 Thread Peter Zijlstra
On Fri, Apr 21, 2017 at 08:03:13AM -0600, Jens Axboe wrote: > You have it so easy - the code is completely standalone, building a > small test framework around it and measuring performance in _user space_ > is trivial. Something like this you mean:

Re: [PATCH V2] scsi: mpt3sas: remove redundant wmb

2017-04-21 Thread Brian King
On 04/21/2017 02:56 AM, Sreekanth Reddy wrote: > On Thu, Apr 20, 2017 at 7:58 AM, Martin K. Petersen > wrote: >> Sinan Kaya writes: >> >>> Due to relaxed ordering requirements on multiple architectures, >>> drivers are required to use wmb/rmb/mb

Re: [PATCH] scsi: sas: move scsi_remove_host call into sas_remove_host

2017-04-21 Thread Martin K. Petersen
Johannes, > Move scsi_remove_host call into sas_remove_host and remove it from SAS > HBA drivers, so we don't mess up the ordering. This solves an issue > with double deleting sysfs entries that was introduced by the change > of sysfs behaviour from commit bcdde7e ("sysfs: make >

Re: [PATCH 9/9] sd_zbc: Do not write lock zones for reset

2017-04-21 Thread Bart Van Assche
On Fri, 2017-04-21 at 18:16 +0900, damien.lem...@wdc.com wrote: > @@ -250,11 +249,6 @@ int sd_zbc_setup_reset_cmnd(struct scsi_cmnd *cmd) > /* Unaligned request */ > return BLKPREP_KILL; > > - /* Do not allow concurrent reset and writes */ > - if

[PATCH v4 2/4] Introduce scsi_execute_async()

2017-04-21 Thread Bart Van Assche
Move the code for submitting a SCSI command from scsi_execute() into scsi_build_rq(). Introduce scsi_execute_async(). This patch does not change any functionality. Signed-off-by: Bart Van Assche Cc: Israel Rukshin Cc: Max Gurtovoy

[PATCH v4 4/4] Avoid that __scsi_remove_device() hangs

2017-04-21 Thread Bart Van Assche
Since scsi_target_unblock() uses starget_for_each_device(), since starget_for_each_device() uses scsi_device_get(), since scsi_device_get() fails after unloading of the LLD kernel module has been started scsi_target_unblock() may skip devices that were affected by scsi_target_block(). Ensure that

Re: [PATCH 7/9] sd_zbc: Rename sd_zbc_setup_write_cmnd

2017-04-21 Thread Bart Van Assche
On Fri, 2017-04-21 at 18:16 +0900, damien.lem...@wdc.com wrote: > Rename sd_zbc_setup_write_cmnd() to sd_zbc_write_lock_zone() to be > clear about what the function actually does. To be consistent, also > rename sd_zbc_cancel_write_cmnd() to sd_zbc_write_unlock_zone(). > > [ ... ] > /* > -

[PATCH v2] target/user: PGR Support

2017-04-21 Thread Bryant G. Ly
This adds initial PGR support for just TCMU, since tcmu doesn't have the necessary IT_NEXUS info to process PGR in userspace, so have those commands be processed in kernel. HA support is not available yet, we will work on it if this patch is acceptable. Signed-off-by: Bryant G. Ly

Re: ["PATCH-v2" 00/22] lpfc updates for 11.2.0.12

2017-04-21 Thread James Smart
On 4/20/2017 11:22 PM, Christoph Hellwig wrote: On Fri, Apr 21, 2017 at 02:52:13AM +0300, Sagi Grimberg wrote: The patches are dependent on the FC nvme/nvmet patches from the following 2 series: http://lists.infradead.org/pipermail/linux-nvme/2017-April/009250.html

Re: [PATCH 3/9] sd: Remove unecessary variable in sd_done()

2017-04-21 Thread James Bottomley
On Fri, 2017-04-21 at 18:16 +0900, damien.lem...@wdc.com wrote: > From: Damien Le Moal > > The 'sense_deferred' variable in sd_done() is set only if > 'sense_valid' is true. So it is not necessary and the result of > scsi_sense_is_deferred() and of

[PATCH] libiscsi: Add an internal error code

2017-04-21 Thread Logan Gunthorpe
This is a prep patch to add a new error code to libiscsi. We want to rework some kmap calls to be able to fail. When we do, we'd like to use this error code. This patch simply introduces ISCSI_TCP_INTERNAL_ERR and prints "Internal Error." when it gets hit. Signed-off-by: Logan Gunthorpe

[PATCH v4 1/4] Introduce scsi_start_queue()

2017-04-21 Thread Bart Van Assche
This patch does not change any functionality. Signed-off-by: Bart Van Assche Cc: Israel Rukshin Cc: Max Gurtovoy Cc: Hannes Reinecke Cc: Song Liu --- drivers/scsi/scsi_lib.c | 25

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

2017-04-21 Thread Bart Van Assche
This patch avoids that sd_shutdown() hangs on the SYNCHRONIZE CACHE command if the block layer queue has been stopped by scsi_target_block(). Signed-off-by: Bart Van Assche Cc: Israel Rukshin Cc: Max Gurtovoy Cc: Hannes

[PATCH v4 0/4] Avoid that __scsi_remove_device() hangs

2017-04-21 Thread Bart Van Assche
__scsi_remove_device() hangs if it is waiting for the SYNCHRONIZE CACHE command submitted by the sd driver to finish if the block layer queue is stopped and does not get restarted. This patch series avoids that that hang occurs. Changes compared to v3: - Removed the logging statements from

Re: [PATCH 0/5] v2: block subsystem refcounter conversions

2017-04-21 Thread Kees Cook
On Fri, Apr 21, 2017 at 3:55 AM, Reshetova, Elena wrote: > On Thu, Apr 20, 2017 at 11:33 AM, Eric Biggers wrote: >> Of course, having extra checks behind a debug option is fine. But they >> should >> not be part of the base feature; the base

Re: [PATCH 2/9] sd: Fix functions description

2017-04-21 Thread Bart Van Assche
On Fri, 2017-04-21 at 18:16 +0900, damien.lem...@wdc.com wrote: > - * Returns 0 if successful. Returns a negated errno value in case > - * of error. > + * Returns 0 if successful. Returns a negated errno value in case > + * of error. Hello Damien, The argument name fixes are definitely

Re: [PATCH 0/5] v2: block subsystem refcounter conversions

2017-04-21 Thread Kees Cook
On Fri, Apr 21, 2017 at 12:55 PM, Eric Biggers wrote: > Hi Elena, > > On Fri, Apr 21, 2017 at 10:55:29AM +, Reshetova, Elena wrote: >> > >> > At the very least, what is there now could probably be made about twice as >> > fast >> > by removing the checks that don't

Re: [PATCH 5/9] sd: Cleanup sd_done sense data handling

2017-04-21 Thread Bart Van Assche
On Fri, 2017-04-21 at 18:16 +0900, damien.lem...@wdc.com wrote: > @@ -1884,8 +1886,6 @@ static int sd_done(struct scsi_cmnd *SCpnt) > else { > sdkp->device->no_write_same = 1; >

Re: [PATCH 0/5] v2: block subsystem refcounter conversions

2017-04-21 Thread Eric Biggers
Hi Elena, On Fri, Apr 21, 2017 at 10:55:29AM +, Reshetova, Elena wrote: > > > > At the very least, what is there now could probably be made about twice as > > fast > > by removing the checks that don't actually help mitigate refcount overflow > > bugs, > > specifically all the checks in

Re: [RFC] scsi: reduce protection of scan_mutex in scsi_remove_device

2017-04-21 Thread Bart Van Assche
On Fri, 2017-04-21 at 14:13 -0700, Song Liu wrote: > When a device is deleted through sysfs handle "delete", [ ... ] If I try to use that sysfs attribute then I encounter a deadlock (see also the report below). How is it possible that you have not hit that deadlock in your tests? Bart.

Re: [PATCH 0/5] v2: block subsystem refcounter conversions

2017-04-21 Thread James Bottomley
On Fri, 2017-04-21 at 13:22 -0700, Kees Cook wrote: > On Fri, Apr 21, 2017 at 12:55 PM, Eric Biggers > wrote: > > > > Of course, having extra checks behind a debug option is fine. > > > > But they should not be part of the base feature; the base > > > > feature should

Re: BUG: KASAN: use-after-free in scsi_exit_rq

2017-04-21 Thread Bart Van Assche
On Thu, 2017-04-20 at 15:18 -0600, Scott Bauer wrote: > [ 642.638860] BUG: KASAN: use-after-free in scsi_exit_rq+0xf3/0x120 at addr > 8802b7fedf00 > [ 642.639362] Read of size 1 by task rcuos/5/53 > [ 642.639713] CPU: 7 PID: 53 Comm: rcuos/6 Not tainted 4.11.0-rc5+ #13 > [ 642.640170]

Re: [PATCH 1/9] sd: Remove white space before EOL

2017-04-21 Thread Bart Van Assche
On Fri, 2017-04-21 at 18:16 +0900, damien.lem...@wdc.com wrote: > No functional change is introduced by this patch. Hello Damien, The only tree for which I know that this kind of whitespace / coding style patches are welcome is the staging tree. In general such patches are not considered welcome

Re: ["PATCH-v2" 00/22] lpfc updates for 11.2.0.12

2017-04-21 Thread James Smart
On 4/21/2017 7:24 AM, Martin K. Petersen wrote: PS. Looks like your patch versioning is homegrown, the format is not quite right and it befuddles both my scripts and patchworks. Please use git-send-email --compose -vN (where N is the version) when resubmitting a patch or series to ensure

[RFC] scsi: reduce protection of scan_mutex in scsi_remove_device

2017-04-21 Thread Song Liu
When a device is deleted through sysfs handle "delete", the code locks shost->scan_mutex. If multiple devices are deleted at the same time, these deletes will be handled in series. On the other hand, some devices do long latency IO during deletion, for example, sd_shutdown() may do sync cache

Re: [RFC] scsi: reduce protection of scan_mutex in scsi_remove_device

2017-04-21 Thread Bart Van Assche
On Fri, 2017-04-21 at 14:13 -0700, Song Liu wrote: > On the other hand, some devices do long latency IO during deletion, > for example, sd_shutdown() may do sync cache and/or start_stop. > It is not necessary for these commands to run in series. Have you noticed my patch series that makes

Re: [PATCH 0/5] v2: block subsystem refcounter conversions

2017-04-21 Thread Kees Cook
On Fri, Apr 21, 2017 at 2:27 PM, James Bottomley wrote: > On Fri, 2017-04-21 at 13:22 -0700, Kees Cook wrote: >> On Fri, Apr 21, 2017 at 12:55 PM, Eric Biggers >> wrote: >> > > > Of course, having extra checks behind a debug option is

Re: [PATCH] Fix panic on BFS configuration.

2017-04-21 Thread James Smart
disregard. Fixing title -- james

Re: [PATCH 1/4] scsi: pmcraid: use __iomem pointers for ioctl argument

2017-04-21 Thread Arnd Bergmann
On Thu, Apr 20, 2017 at 9:24 PM, Al Viro wrote: > On Thu, Apr 20, 2017 at 07:54:45PM +0200, Arnd Bergmann wrote: >> kernelci.org reports a new compile warning for old code in the pmcraid >> driver: >> >> arch/mips/include/asm/uaccess.h:138:21: warning: passing argument 1

[PATCH] Fix panic on BFS configuration.

2017-04-21 Thread jsmart2021
From: James Smart To select the appropriate shost template, the driver is issuing a mailbox command to retrieve the wwn. Turns out the sending of the command precedes the reset of the function. On SLI-4 adapters, this is inconsequential as the mailbox command location is

Re: [PATCH v2 0/5] Re-order scsi_remove_host and sas_remove_host in SAS HBA LLDDs

2017-04-21 Thread wangyijing
>> >> Please repost the series against the current tree. Also a cover >> letter with a bit more explanation would be good. >> > > Great, I think that my colleagues can send an updated version next week. I will send a new version with a cover letter these days, before that, we need to do a

[PATCH v3 03/22] Fix rejected nvme LS Req.

2017-04-21 Thread jsmart2021
From: James Smart In this case, the NVME initiator is sending an LS REQ command on an NDLP that is not MAPPED. The FW rejects it. The lpfc_nvme_ls_req routine checks for a NULL ndlp pointer but does not check the NDLP state. This allows the routine to send an LS IO when

[PATCH v3 07/22] Remove unused defines for NVME PostBuf.

2017-04-21 Thread jsmart2021
From: James Smart These defines for the posting of buffers for nvmet target were not used. Removing the unused defines. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn

[PATCH v3 02/22] Fix nvme unregister port timeout.

2017-04-21 Thread jsmart2021
From: James Smart During some link event testing it was observed that the wait_for_completion_timeout in the lpfc_nvme_unregister_port was timing out all the time. The initiator is claiming the nvme_fc_unregister_remoteport upcall is not completing the unregister in the

[PATCH v3 01/22] Standardize nvme SGL segment count

2017-04-21 Thread jsmart2021
From: James Smart Standardize default SGL segment count for nvme target and initiator The driver needs to make them the same for clarity. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes

[PATCH] scsi: mvumi: add check for dma mapping errors

2017-04-21 Thread Alexey Khoroshilov
mvumi_make_sgl() does not check if mapping dma memory succeed. The patch adds return error code if the mapping failed and if scsi_bufflen(scmd) is zero. The latter is just in case since the only call site of mvumi_make_sgl() check the scsi_bufflen(scmd) before the call. Found by Linux Driver

[PATCH] lpfc: Fix panic on BFS configuration.

2017-04-21 Thread jsmart2021
From: James Smart To select the appropriate shost template, the driver is issuing a mailbox command to retrieve the wwn. Turns out the sending of the command precedes the reset of the function. On SLI-4 adapters, this is inconsequential as the mailbox command location is

Re: [PATCH v2] target/user: PGR Support

2017-04-21 Thread kbuild test robot
Hi Bryant, [auto build test ERROR on target/master] [also build test ERROR on v4.11-rc7 next-20170421] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Bryant-G-Ly/target-user-PGR-Support

Re: [PATCH 0/5] v2: block subsystem refcounter conversions

2017-04-21 Thread James Bottomley
On Fri, 2017-04-21 at 14:30 -0700, Kees Cook wrote: > On Fri, Apr 21, 2017 at 2:27 PM, James Bottomley > wrote: > > On Fri, 2017-04-21 at 13:22 -0700, Kees Cook wrote: > > > On Fri, Apr 21, 2017 at 12:55 PM, Eric Biggers < > > > ebigge...@gmail.com> > > >

Re: [RFC] scsi: reduce protection of scan_mutex in scsi_remove_device

2017-04-21 Thread Song Liu
> On Apr 21, 2017, at 2:20 PM, Bart Van Assche > wrote: > > On Fri, 2017-04-21 at 14:13 -0700, Song Liu wrote: >> On the other hand, some devices do long latency IO during deletion, >> for example, sd_shutdown() may do sync cache and/or start_stop. >> It is not

[PATCH] lpfc: Fix memory corruption of the lpfc_ncmd->list pointers

2017-04-21 Thread jsmart2021
From: James Smart lpfc was changing the private pointer that is set/maintained by the nvme_fc transport. This caused two issues: a) the transport, on teardown may erroneous attempt to free whatever address was set; and b) lfpc uses any value set in lpfc_nvme_fcp_abort() and

[PATCH] gdth: use offset_in_page() macro

2017-04-21 Thread Geliang Tang
Use offset_in_page() macro instead of open-coding. Signed-off-by: Geliang Tang --- drivers/scsi/gdth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/gdth.c b/drivers/scsi/gdth.c index d020a13..557ce73 100644 --- a/drivers/scsi/gdth.c +++

[PATCH v4 10/10] scsi: Implement blk_mq_ops.show_rq()

2017-04-21 Thread Bart Van Assche
Show the SCSI CDB, .eh_eflags and .result for pending SCSI commands in /sys/kernel/debug/block/*/mq/*/dispatch and */rq_list. Signed-off-by: Bart Van Assche Cc: Martin K. Petersen Cc: James Bottomley

Re: [RFC] scsi: reduce protection of scan_mutex in scsi_remove_device

2017-04-21 Thread Song Liu
> On Apr 21, 2017, at 2:17 PM, Bart Van Assche > wrote: > > On Fri, 2017-04-21 at 14:13 -0700, Song Liu wrote: >> When a device is deleted through sysfs handle "delete", [ ... ] > > If I try to use that sysfs attribute then I encounter a deadlock (see > also the

[PATCH v3 19/22] Fix implicit logo and RSCN handling for NVMET

2017-04-21 Thread jsmart2021
From: James Smart NVMET didn't have any RSCN handling at all and would not execute implicit LOGO when receiving a PLOGI from an rport that NVMET had in state UNMAPPED. Clean up the logic in lpfc_nlp_state_cleanup for initiators (FCP and NVME). NVMET should not respond to

[PATCH v3 18/22] Add Fabric assigned WWN support.

2017-04-21 Thread jsmart2021
From: James Smart Adding support for Fabric assigned WWPN and WWNN. Firmware sends first FLOGI to fabric with vendor version changes. On link up driver gets updated service parameter with FAWWN assigned port name. Driver sends 2nd FLOGI with updated fawwpn and modifies

[PATCH v3 16/22] Fix crash after issuing lip reset

2017-04-21 Thread jsmart2021
From: James Smart When RPI is not available, driver sends WQE with invalid RPI value and rejected by HBA. lpfc :82:00.3: 1:3154 BLS ABORT RSP failed, data: x3/xa0320008 and lpfc :2753 PLOGI failure DID:FA Status:x3/xa0240008 In this case, driver accesses rpi_ids

[PATCH v3 14/22] Remove hba lock from NVMET issue WQE.

2017-04-21 Thread jsmart2021
From: James Smart Unnecessary lock is taken. ring lock should be sufficient to protect the work queue submission. This was noticed when doing performance testing. The hbalock is not needed to issue io to the nvme work queue. Signed-off-by: Dick Kennedy

[PATCH v3 20/22] Update ABORT processing for NVMET.

2017-04-21 Thread jsmart2021
From: James Smart The driver with nvme had this routine stubbed. Right now XRI_ABORTED_CQE is not handled and the FC NVMET Transport has a new API for the driver. Missing code path, new NVME abort API Update ABORT processing for NVMET There are 3 new FC NVMET Transport

[PATCH v3 15/22] Fix driver load issues when MRQ=8

2017-04-21 Thread jsmart2021
From: James Smart The symptom is that the driver will fail to login to the fabric. The reason is because it is out of iocb resources. There is a one to one relationship between MRQs (receive buffers for NVMET-FC) and iocbs and the default number of IOCBs was not accounting

[PATCH v3 21/22] Fix Express lane queue creation.

2017-04-21 Thread jsmart2021
From: James Smart The older sli4 adapters only supported the 64 byte WQE entry size. The new adapter (fw) support both 64 and 128 byte WQE entry sizies. The Express lane WQ was not being created with the 128 byte WQE sizes when it was supported. Not having the right WQE

[PATCH v3 11/22] Fix driver unload/reload operation.

2017-04-21 Thread jsmart2021
From: James Smart There are couple of different load/unload issues fixed with this patch. One of the issues was reported by Junichi Nomura, a patch was submitted by Johannes Thumsrhirn which did fix one of the problems but the fix in this patch separates the pring free from

[PATCH v3 22/22] lpfc revison 11.2.0.12

2017-04-21 Thread jsmart2021
From: James Smart Update lpfc version to reflect this set of changes. Signed-off-by: Dick Kennedy Signed-off-by: James Smart Reviewed-by: Johannes Thumshirn --- drivers/scsi/lpfc/lpfc_version.h |

[PATCH v3 17/22] Fix max_sgl_segments settings for NVME / NVMET

2017-04-21 Thread jsmart2021
From: James Smart Cannot set NVME segment counts to a large number The existing module parameter lpfc_sg_seg_cnt is used for both SCSI and NVME. Limit the module parameter lpfc_sg_seg_cnt to 128 with the default being 64 for both NVME and NVMET, assuming NVME is enabled

  1   2   >