Re: [PATCH 2/2] target: use new "dbroot" target attribute

2016-04-14 Thread Hannes Reinecke
On 04/13/2016 10:25 PM, Lee Duncan wrote: > This commit updates the target core ALUA and PR > modules to use the new "dbroot" attribute instead > of assuming the target database is in "/var/target". > > Signed-off-by: Lee Duncan > --- > drivers/target/target_core_alua.c | 6

Re: [PATCHv2 1/2] target: make target db location configurable

2016-04-14 Thread Hannes Reinecke
On 04/13/2016 10:25 PM, Lee Duncan wrote: > This commit adds the read-write attribute "dbroot", > in the top-level CONFIGFS (core) target directory, > normally /sys/kernel/config/target. This attribute > defaults to "/var/target" but can be changed by > writing a new pathname string to it.

Re: [PATCH 00/42] v5: separate operations from flags in the bio/request structs

2016-04-14 Thread Hannes Reinecke
On 04/13/2016 09:35 PM, mchri...@redhat.com wrote: > The following patches begin to cleanup the request->cmd_flags and > bio->bi_rw mess. We currently use cmd_flags to specify the operation, > attributes and state of the request. For bi_rw we use it for similar > info and also the priority but

[PATCH v1 00/27] block: cleanup direct access to .bi_vcnt & .bi_io_vec

2016-04-14 Thread Ming Lei
Hi Guys, It is always not a good practice to access bio->bi_vcnt and bio->bi_io_vec from drivers directly. Also this kind of direct access will cause trouble when converting to multipage bvecs because currently drivers may suppose one bvec always include one page, and use the two fields to figure

[PATCH v1 09/27] target: avoid to access .bi_vcnt directly

2016-04-14 Thread Ming Lei
When the bio is full, bio_add_pc_page() will return zero, so use this way to handle full bio. Also replace access to .bi_vcnt for pr_debug() with bio_segments(). Signed-off-by: Ming Lei --- drivers/target/target_core_pscsi.c | 8 ++-- 1 file changed, 2 insertions(+),

Re: [PATCH] pm80xx: Remove bogus address masking in pm8001_ioremap()

2016-04-14 Thread Jinpu Wang
On Wed, Apr 13, 2016 at 11:26 PM, David Daney wrote: > From: David Daney > > It is unclear what the original intent of the masking was, but it is > clearly incorrect to truncate a physical address before calling > ioremap(). On systems where there

[patch v2] scsi_dh_alua: uninitialized variable in alua_rtpg()

2016-04-14 Thread Dan Carpenter
It's possible to use "err" without initializing it. If it happens to be a 2 which is SCSI_DH_RETRY then that could cause a bug. Bart Van Assche pointed out that we should probably re-initialize it for every iteration through the retry loop. Signed-off-by: Dan Carpenter

Re: [patch] scsi_dh_alua: uninitialized variable in alua_rtpg()

2016-04-14 Thread Dan Carpenter
On Thu, Apr 14, 2016 at 08:45:18AM -0700, Bart Van Assche wrote: > On 04/14/2016 02:39 AM, Dan Carpenter wrote: > >It's possible to use "err" without initializing it. If it happens to be > >a 2 which is SCSI_DH_RETRY then that could cause a bug. > > > >Signed-off-by: Dan Carpenter

Re: [patch v2] scsi_dh_alua: uninitialized variable in alua_rtpg()

2016-04-14 Thread Bart Van Assche
On 04/14/2016 11:20 AM, Dan Carpenter wrote: It's possible to use "err" without initializing it. If it happens to be a 2 which is SCSI_DH_RETRY then that could cause a bug. Bart Van Assche pointed out that we should probably re-initialize it for every iteration through the retry loop.

Re: [PATCH 1/9] blk-sysfs: Add 'chunk_sectors' to sysfs attributes

2016-04-14 Thread Bart Van Assche
On 04/04/2016 03:00 AM, Hannes Reinecke wrote: The queue limits already have a 'chunk_sectors' setting, so we should be presenting it via sysfs. This patch does more than exporting chunk_sectors via sysfs. It also makes that parameter configurable. Please mention this in the patch

Re: [PATCHv2 1/2] target: make target db location configurable

2016-04-14 Thread Lee Duncan
On 04/13/2016 11:10 PM, Hannes Reinecke wrote: > On 04/13/2016 10:25 PM, Lee Duncan wrote: >> This commit adds the read-write attribute "dbroot", >> in the top-level CONFIGFS (core) target directory, >> normally /sys/kernel/config/target. This attribute >> defaults to "/var/target" but can be

Re: [PATCH 2/9] block: update chunk_sectors in blk_stack_limits()

2016-04-14 Thread Bart Van Assche
On 04/04/16 03:00, Hannes Reinecke wrote: diff --git a/block/blk-settings.c b/block/blk-settings.c index c7bb666..29fa900 100644 --- a/block/blk-settings.c +++ b/block/blk-settings.c @@ -630,6 +630,9 @@ int blk_stack_limits(struct queue_limits *t, struct queue_limits *b,

Re: [PATCH] mpt3sas: Remove usage of 'struct timeval'

2016-04-14 Thread Martin K. Petersen
> "Tina" == Tina Ruchandani writes: Tina> 'struct timeval' will have its tv_sec value overflow on 32-bit Tina> systems in year 2038 and beyond. This patch replaces the use of Tina> struct timeval for computing mpi_request.TimeStamp, and instead Tina> uses ktime_t

[PATCHv3 2/2] target: use new "dbroot" target attribute

2016-04-14 Thread Lee Duncan
This commit updates the target core ALUA and PR modules to use the new "dbroot" attribute instead of assuming the target database is in "/var/target". Signed-off-by: Lee Duncan Reviewed-by: Hannes Reinecke --- drivers/target/target_core_alua.c | 6 +++---

[PATCHv3 1/2] target: make target db location configurable

2016-04-14 Thread Lee Duncan
This commit adds the read-write attribute "dbroot", in the top-level CONFIGFS (core) target directory, normally /sys/kernel/config/target. This attribute defaults to "/var/target" but can be changed by writing a new pathname string to it. Changing this attribute is only allowed when no fabric

[PATCHv3 0/2] target: make location of /var/targets configurable

2016-04-14 Thread Lee Duncan
These patches make the location of "/var/target" configurable, though it still defauls to "/var/target". This "target database directory" can only be changed after the target_core_mod loads but before any fabric drivers are loaded, and must be the pathname of an existing directory. This

Re: [PATCH v4 1/2] scsi: Add intermediate STARGET_REMOVE state to scsi_target_state

2016-04-14 Thread Xiong Zhou
On Wed, Apr 13, 2016 at 4:19 PM, Johannes Thumshirn wrote: > Hi Xiong > Sorry for the late reply > > On Dienstag, 12. April 2016 21:01:53 CEST Xiong Zhou wrote: >> How about this? >> >> drivers/scsi/scsi_scan: mark STARGET_REMOVE state before destroy >> >> Signed-off-by: Xiong

Re: [PATCH, RESEND 3] qla2xxx: Remove use of 'struct timeval'

2016-04-14 Thread Martin K. Petersen
> "Tina" == Tina Ruchandani writes: Tina, >> Applied to 4.6/scsi-queue. Tina> I am not seeing this patch in v4.6-rc3 in Linus's tree. Not sure how I messed that up. Sorry! Applied to 4.7/scsi-queue. -- Martin K. Petersen Oracle Linux Engineering -- To

Re: [PATCH] mpt3sas - remove unused fw_event_work delayed_work

2016-04-14 Thread Martin K. Petersen
> "Joe" == Joe Lawrence writes: Joe> Do we know why f1c35e6aea579 "mpt2sas: RESCAN Barrier work is added Joe> in case of HBA reset" was unneeded for the mpt3 version? If that Joe> is interesting, that info could be added to v2 commit message as Joe> well. Chaitra?

Re: [PATCH 0/5] hisi_sas: v2 hw SATA fixes

2016-04-14 Thread Martin K. Petersen
> "John" == John Garry writes: John> This patchset introduces SATA support fixes for the HiSilicon v2 John> hw SAS controller. John> Fixes include: - attach issue for SATA disk attached through John> expander - intermittent issue for directly attaching multiple SATA

Re: [PATCH] pm80xx: Remove bogus address masking in pm8001_ioremap()

2016-04-14 Thread Martin K. Petersen
> "David" == David Daney writes: David> It is unclear what the original intent of the masking was, but it David> is clearly incorrect to truncate a physical address before David> calling ioremap(). On systems where there are valid physical David> address bits above

Re: [PATCH] mpt3sas: fix possible NULL dereference

2016-04-14 Thread Martin K. Petersen
> "Sudip" == Sudip Mukherjee writes: Sudip> We are dereferencing ioc->sense_dma_pool in pci_pool_free() and Sudip> after that we are checking if it is NULL, before calling Sudip> pci_pool_destroy(). Lets check if it is NULL before calling both Sudip>

Re: [-next] BUG_ON in scsi_target_destroy()

2016-04-14 Thread Xiong Zhou
Hi, On Wed, Apr 13, 2016 at 4:41 PM, Johannes Thumshirn wrote: > Hi Sergey, Xiong, > > Can you try below patch? This survives modprobe -r scsi_debug. > > On Montag, 11. April 2016 18:01:47 CEST Sergey Senozhatsky wrote: >> Hello, >> >> commit

Re: [PATCHv2 03/14] libsas: Define ATA_CMD_NCQ_NON_DATA

2016-04-14 Thread John Garry
On 12/04/2016 11:25, Hannes Reinecke wrote: On 04/12/2016 12:03 PM, John Garry wrote: On 12/04/2016 07:47, Hannes Reinecke wrote: Define the NCQ NON DATA command and update libsas to handle it correctly. Signed-off-by: Hannes Reinecke ---

[patch] bnx2i: silence uninitialized variable warnings

2016-04-14 Thread Dan Carpenter
Presumably it isn't possible to have empty lists here, but my static checker doesn't know that and complains that "ep" can be used uninitialized. Signed-off-by: Dan Carpenter diff --git a/drivers/scsi/bnx2i/bnx2i_iscsi.c b/drivers/scsi/bnx2i/bnx2i_iscsi.c index

[patch] scsi_dh_alua: uninitialized variable in alua_rtpg()

2016-04-14 Thread Dan Carpenter
It's possible to use "err" without initializing it. If it happens to be a 2 which is SCSI_DH_RETRY then that could cause a bug. Signed-off-by: Dan Carpenter diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c index

[patch] target: Silence an uninitialized variable warning

2016-04-14 Thread Dan Carpenter
I'm getting a static checker warning: drivers/target/target_core_sbc.c:1150 sbc_parse_cdb() error: uninitialized variable 'size'. It looks like a possible bug but wouldn't it have shown up in testing? Anyway let's just silence it by setting size to zero. Signed-off-by: Dan Carpenter

Re: [PATCHv2 03/14] libsas: Define ATA_CMD_NCQ_NON_DATA

2016-04-14 Thread Hannes Reinecke
On 04/14/2016 11:06 AM, John Garry wrote: > On 12/04/2016 11:25, Hannes Reinecke wrote: >> On 04/12/2016 12:03 PM, John Garry wrote: >>> On 12/04/2016 07:47, Hannes Reinecke wrote: Define the NCQ NON DATA command and update libsas to handle it correctly. Signed-off-by: Hannes

[patch] scsi: ufs: silence uninitialized variable warning

2016-04-14 Thread Dan Carpenter
If ufshcd_dme_get() fails then "tx_lanes" can be uninitialized. I've initialized it to zero so that the rest of the function turns into a no-op in that situation. Signed-off-by: Dan Carpenter diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index

[patch] hpsa: set the enclosure identifier to zero

2016-04-14 Thread Dan Carpenter
This has only called from show_sas_rphy_enclosure_identifier(). The caller expects that we set an identifier, otherwise it uses an unintialized variable. Signed-off-by: Dan Carpenter diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 5be944c..25aa219 100644

Re: [PATCHv2 05/14] libata: NCQ Encapsulation for READ LOG DMA EXT

2016-04-14 Thread Tejun Heo
Hello, Hannes. On Thu, Apr 14, 2016 at 07:44:19AM +0200, Hannes Reinecke wrote: > Hehe. No, it isn't, if you look closely. > (Or make that: it _shouldn't_, and I've messed it up) > (That's what the 'fpdma' parameter is for) > > The benefit is not so much for normal operations, but it'll give us

Re: [PATCHv2 09/14] libata: fixup ZAC device disabling

2016-04-14 Thread Tejun Heo
On Thu, Apr 14, 2016 at 07:48:03AM +0200, Hannes Reinecke wrote: > On 04/13/2016 08:09 PM, Tejun Heo wrote: > > On Tue, Apr 12, 2016 at 08:47:53AM +0200, Hannes Reinecke wrote: > >> libata device disabling is ... curious. So add the correct > >> definitions that we can disable ZAC devices

Re: [patch] scsi_dh_alua: uninitialized variable in alua_rtpg()

2016-04-14 Thread Bart Van Assche
On 04/14/2016 02:39 AM, Dan Carpenter wrote: It's possible to use "err" without initializing it. If it happens to be a 2 which is SCSI_DH_RETRY then that could cause a bug. Signed-off-by: Dan Carpenter diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c

Re: [PATCH] scsi_dh_alua: Declare local functions static

2016-04-14 Thread Hannes Reinecke
On 04/14/2016 07:27 PM, Bart Van Assche wrote: > This patch avoids that building with W=1 causes gcc to report the > following type of warning: > > no previous prototype for ... [-Wmissing-prototypes] > > Signed-off-by: Bart Van Assche > Cc: Hannes Reinecke

Re: [SCSI] pm80xx: Phy settings support for motherboard controller.

2016-04-14 Thread Jack Wang
2016-04-13 13:24 GMT+02:00 Dan Carpenter : > Hello Anand Kumar Santhanam, > > The patch 279094079a44: "[SCSI] pm80xx: Phy settings support for > motherboard controller." from Sep 18, 2013, leads to the following > static checker warning: > >

Re: This patch triggers a bad gcc bug (was Re: [PATCH] force inlining of some byteswap operations)

2016-04-14 Thread Josh Poimboeuf
On Thu, Apr 14, 2016 at 05:29:06PM +0200, Denys Vlasenko wrote: > On 04/13/2016 07:10 PM, Josh Poimboeuf wrote: > >> From the disassembly of drivers/scsi/qla2xxx/qla_attr.o: > >> > >> 2f53 : > >> 2f53: 55 push %rbp > >> 2f54:

Re: [PATCHv2 05/14] libata: NCQ Encapsulation for READ LOG DMA EXT

2016-04-14 Thread Hannes Reinecke
On 04/14/2016 05:43 PM, Tejun Heo wrote: Hello, Hannes. On Thu, Apr 14, 2016 at 07:44:19AM +0200, Hannes Reinecke wrote: Hehe. No, it isn't, if you look closely. (Or make that: it _shouldn't_, and I've messed it up) (That's what the 'fpdma' parameter is for) The benefit is not so much for

Re: [PATCHv2 05/14] libata: NCQ Encapsulation for READ LOG DMA EXT

2016-04-14 Thread Tejun Heo
On Thu, Apr 14, 2016 at 05:59:48PM +0200, Hannes Reinecke wrote: > For this patch, yes, you are right. > However, the ZAC enablement patches later on submit READ LOG EXT commands > (for REPORT ZONES), and _they_ benefit from NCQ encapsulation. Umm... so, you can't use ata_exec_internal() outside

Re: This patch triggers a bad gcc bug (was Re: [PATCH] force inlining of some byteswap operations)

2016-04-14 Thread Ingo Molnar
* Denys Vlasenko wrote: > > In fact, the following patch seems to fix it: > > > > diff --git a/include/scsi/scsi_transport_fc.h > > b/include/scsi/scsi_transport_fc.h > > index bf66ea6..56b9e81 100644 > > --- a/include/scsi/scsi_transport_fc.h > > +++

Re: [-next] BUG_ON in scsi_target_destroy()

2016-04-14 Thread Xiong Zhou
Hi, On Wed, Apr 13, 2016 at 11:14 PM, James Bottomley wrote: > On Wed, 2016-04-13 at 10:41 +0200, Johannes Thumshirn wrote: >> Hi Sergey, Xiong, >> >> Can you try below patch? >> >> On Montag, 11. April 2016 18:01:47 CEST Sergey Senozhatsky wrote: >> > Hello, >> > >> >

Re: This patch triggers a bad gcc bug (was Re: [PATCH] force inlining of some byteswap operations)

2016-04-14 Thread Denys Vlasenko
On 04/13/2016 07:10 PM, Josh Poimboeuf wrote: >> From the disassembly of drivers/scsi/qla2xxx/qla_attr.o: >> >> 2f53 : >> 2f53: 55 push %rbp >> 2f54: 48 89 e5mov%rsp,%rbp >> >> 2f57 :

[PATCH] scsi_dh_alua: Declare local functions static

2016-04-14 Thread Bart Van Assche
This patch avoids that building with W=1 causes gcc to report the following type of warning: no previous prototype for ... [-Wmissing-prototypes] Signed-off-by: Bart Van Assche Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Ewan Milne