4.4 SCSI queue status

2015-11-11 Thread Martin K. Petersen

As some of you may have noticed, I have been volunteered to help with
the SCSI tree going forward. Much like Christoph did for while. My
current tree is here:

http://git.kernel.org/cgit/linux/kernel/git/mkp/linux.git/log/?h=4.4/scsi-queue

At this point I am done merging SCSI patches for 4.4. There was quite
the backlog and I probably missed a bunch. Sorry!

However, save for a couple of patch series from Hannes my SCSI folder is
now empty. Which means that for me to see something you will have to
resend to linux-scsi.

Most of my merge cycles have been spent on driver updates. I prioritized
those over core changes since we were essentially in the merge window
when I got enlisted(*). Will tackle the trickier core stuff for 4.5.

There were a couple of driver series that just missed the cut: The
HiSilicon SAS driver which required minor tweaks and two ufs patch
series which required comment feedback and/or reviews.

The rules of engagement haven't changed. Here they are, slightly updated
from the original version to reflect the omnipresent kbuild test robot
and a few other things:

 - A patch needs two positive reviews (non-author signoff, acked-by,
   reviewed-by or tested-by).

 - The patch must have been posted to linux-scsi and nobody has
   expressed any concerns about it.

 - The patch applies cleanly. Use checkpatch and git send-email.

 - The patch compiles without warnings on all relevant architectures and
   does not incur any 0-day kbuild test robot complaints.

 - Core changes survive a full xfstests run.

 - The patch must have a commit message that comprehensively describes
   what the patch does. Do not link to vendor bugzilla entries that
   require special access credentials. If there is anything of
   importance in bugzilla, put it in the commit message.

 - Resend the patches if you haven't received any feedback after a
   couple of weeks.

 - When you resend a patch or series make sure to record all existing
   reviewed-by/acked-by/tested-by tags.

 - Ping the list for additional reviewers.

(*) I will never merge during the merge window again!
I will never merge during the merge window again!
I will never merge during the merge window again!

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [RESEND PATCH] [SCSI] mvumi: 64bit value for seconds_since1970

2015-11-11 Thread Martin K. Petersen
>>>>> "Tina" == Tina Ruchandani <ruchandani.t...@gmail.com> writes:

Tina> struct mvumi_hs_page2 stores a "seconds_since1970" field which is
Tina> of type u64. It is however, written to, using 'struct timeval'
Tina> which has a 32-bit seconds field and whose value will overflow in
Tina> year 2038.  This patch uses ktime_get_real_seconds() instead since
Tina> it provides a 64-bit seconds value, which is 2038 safe.

Under normal circumstances I would like a driver owner signoff but it
doesn't look like mvumi gets much attention. Applied.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] sd: Clear PS bit before Mode Select.

2015-11-11 Thread Martin K. Petersen
>>>>> "Gabriel" == Gabriel Krisman Bertazi <kris...@linux.vnet.ibm.com> writes:

Gabriel> This patch clears the PS bit in the buffer returned by Mode
Gabriel> Select, right before it is used in the Mode Select command.

Applied.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3] scsi: pmcraid: replace struct timeval with ktime_get_real_seconds()

2015-11-11 Thread Martin K. Petersen
>>>>> "Alison" == Alison Schofield <amsfiel...@gmail.com> writes:

Alison> Replace the use of struct timeval and do_gettimeofday() with 64
Alison> bit ktime_get_real_seconds. Prevents 32-bit type overflow in
Alison> year 2038 on 32-bit systems.

Applied.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/3] block/sd: Fix device-imposed transfer length limits

2015-11-13 Thread Martin K. Petersen
Commit 4f258a46346c ("sd: Fix maximum I/O size for BLOCK_PC requests")
had the unfortunate side-effect of removing an implicit clamp to
BLK_DEF_MAX_SECTORS for REQ_TYPE_FS requests in the block layer
code. This caused problems for some SMR drives.

Debugging this issue revealed a few problems with the existing
infrastructure since the block layer didn't know how to deal with
device-imposed limits, only limits set by the I/O controller.

 - Introduce a new queue limit, max_dev_sectors, which is used by the
   ULD to signal the maximum sectors for a REQ_TYPE_FS request.

 - Ensure that max_dev_sectors is correctly stacked and taken into
   account when overriding max_sectors through sysfs.

 - Rework sd_read_block_limits() so it saves the max_xfer and opt_xfer
   values for later processing.

 - In sd_revalidate() set the queue's max_dev_sectors based on the
   MAXIMUM TRANSFER LENGTH value in the Block Limits VPD. If this value
   is not reported, fall back to a cap based on the CDB TRANSFER LENGTH
   field size.

 - In sd_revalidate(), use OPTIMAL TRANSFER LENGTH from the Block Limits
   VPD--if reported and sane--to signal the preferred device transfer
   size for FS requests. Otherwise use BLK_DEF_MAX_SECTORS.

 - blk_limits_max_hw_sectors() is no longer used and can be removed.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=93581
Signed-off-by: Martin K. Petersen <martin.peter...@oracle.com>
---
 block/blk-settings.c   | 36 
 block/blk-sysfs.c  |  3 +++
 drivers/scsi/sd.c  | 46 ++
 drivers/scsi/sd.h  |  1 +
 include/linux/blkdev.h |  2 +-
 5 files changed, 51 insertions(+), 37 deletions(-)

diff --git a/block/blk-settings.c b/block/blk-settings.c
index 7d8f129a1516..dd4973583978 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -91,7 +91,8 @@ void blk_set_default_limits(struct queue_limits *lim)
lim->seg_boundary_mask = BLK_SEG_BOUNDARY_MASK;
lim->virt_boundary_mask = 0;
lim->max_segment_size = BLK_MAX_SEGMENT_SIZE;
-   lim->max_sectors = lim->max_hw_sectors = BLK_SAFE_MAX_SECTORS;
+   lim->max_sectors = lim->max_dev_sectors = lim->max_hw_sectors =
+   BLK_SAFE_MAX_SECTORS;
lim->chunk_sectors = 0;
lim->max_write_same_sectors = 0;
lim->max_discard_sectors = 0;
@@ -127,6 +128,7 @@ void blk_set_stacking_limits(struct queue_limits *lim)
lim->max_hw_sectors = UINT_MAX;
lim->max_segment_size = UINT_MAX;
lim->max_sectors = UINT_MAX;
+   lim->max_dev_sectors = UINT_MAX;
lim->max_write_same_sectors = UINT_MAX;
 }
 EXPORT_SYMBOL(blk_set_stacking_limits);
@@ -214,8 +216,8 @@ void blk_queue_bounce_limit(struct request_queue *q, u64 
max_addr)
 EXPORT_SYMBOL(blk_queue_bounce_limit);
 
 /**
- * blk_limits_max_hw_sectors - set hard and soft limit of max sectors for 
request
- * @limits: the queue limits
+ * blk_queue_max_hw_sectors - set max sectors for a request for this queue
+ * @q:  the request queue for the device
  * @max_hw_sectors:  max hardware sectors in the usual 512b unit
  *
  * Description:
@@ -224,13 +226,19 @@ EXPORT_SYMBOL(blk_queue_bounce_limit);
  *the device driver based upon the capabilities of the I/O
  *controller.
  *
+ *max_dev_sectors is a hard limit imposed by the storage device for
+ *READ/WRITE requests. It is set by the disk driver.
+ *
  *max_sectors is a soft limit imposed by the block layer for
  *filesystem type requests.  This value can be overridden on a
  *per-device basis in /sys/block//queue/max_sectors_kb.
  *The soft limit can not exceed max_hw_sectors.
  **/
-void blk_limits_max_hw_sectors(struct queue_limits *limits, unsigned int 
max_hw_sectors)
+void blk_queue_max_hw_sectors(struct request_queue *q, unsigned int 
max_hw_sectors)
 {
+   struct queue_limits *limits = >limits;
+   unsigned int max_sectors;
+
if ((max_hw_sectors << 9) < PAGE_CACHE_SIZE) {
max_hw_sectors = 1 << (PAGE_CACHE_SHIFT - 9);
printk(KERN_INFO "%s: set to minimum %d\n",
@@ -238,22 +246,9 @@ void blk_limits_max_hw_sectors(struct queue_limits 
*limits, unsigned int max_hw_
}
 
limits->max_hw_sectors = max_hw_sectors;
-   limits->max_sectors = min_t(unsigned int, max_hw_sectors,
-   BLK_DEF_MAX_SECTORS);
-}
-EXPORT_SYMBOL(blk_limits_max_hw_sectors);
-
-/**
- * blk_queue_max_hw_sectors - set max sectors for a request for this queue
- * @q:  the request queue for the device
- * @max_hw_sectors:  max hardware sectors in the usual 512b unit
- *
- * Description:
- *See description for blk_limits_max_hw_sectors().
- **/
-void blk_queue_max_hw_sectors(struct request_queue *q, unsigned int 
max_hw_sectors)
-{
-   blk_limits_max_hw_sectors(>limits, max_hw_secto

[PATCH 3/3] MAINTAINERS: Add myself as co-maintainer of the SCSI subsystem.

2015-11-13 Thread Martin K. Petersen
Signed-off-by: Martin K. Petersen <martin.peter...@oracle.com>
---
 MAINTAINERS | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 9de185da5f5b..978df6e36ddf 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -9205,8 +9205,10 @@ F:   include/scsi/sg.h
 
 SCSI SUBSYSTEM
 M: "James E.J. Bottomley" <jbottom...@odin.com>
-L: linux-scsi@vger.kernel.org
 T: git git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git
+M:     "Martin K. Petersen" <martin.peter...@oracle.com>
+T: git git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
+L: linux-scsi@vger.kernel.org
 S: Maintained
 F: drivers/scsi/
 F: include/scsi/
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/3] sd: Make discard granularity match logical block size when LBPRZ=1

2015-11-13 Thread Martin K. Petersen
A device may report an OPTIMAL UNMAP GRANULARITY and UNMAP GRANULARITY
ALIGNMENT in the Block Limits VPD. These parameters describe the
device's internal provisioning allocation units. By default the block
layer will round and align any discard requests based on these limits.

If a device reports LBPRZ=1 to guarantee zeroes after discard, however,
it is imperative that the block layer does not leave out any parts of
the requested block range. Otherwise the device can not do the required
zeroing of any partial allocation units and this can lead to data
corruption.

Since the dm thinp personality relies on the block layer's current
behavior and is unable to deal with partial discard blocks we work
around the problem by setting the granularity to match the logical block
size when LBPRZ is enabled.

Signed-off-by: Martin K. Petersen <martin.peter...@oracle.com>
---
 drivers/scsi/sd.c | 23 ++-
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 3f370228bf31..c322969026bc 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -636,11 +636,24 @@ static void sd_config_discard(struct scsi_disk *sdkp, 
unsigned int mode)
unsigned int max_blocks = 0;
 
q->limits.discard_zeroes_data = 0;
-   q->limits.discard_alignment = sdkp->unmap_alignment *
-   logical_block_size;
-   q->limits.discard_granularity =
-   max(sdkp->physical_block_size,
-   sdkp->unmap_granularity * logical_block_size);
+
+   /*
+* When LBPRZ is reported, discard alignment and granularity
+* must be fixed to the logical block size. Otherwise the block
+* layer will drop misaligned portions of the request which can
+* lead to data corruption. If LBPRZ is not set, we honor the
+* device preference.
+*/
+   if (sdkp->lbprz) {
+   q->limits.discard_alignment = 0;
+   q->limits.discard_granularity = 1;
+   } else {
+   q->limits.discard_alignment = sdkp->unmap_alignment *
+   logical_block_size;
+   q->limits.discard_granularity =
+   max(sdkp->physical_block_size,
+   sdkp->unmap_granularity * logical_block_size);
+   }
 
sdkp->provisioning_mode = mode;
 
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] mpt3sas: Fix use sas_is_tlr_enabled API before enabling MPI2_SCSIIO_CONTROL_TLR_ON flag

2015-11-13 Thread Martin K. Petersen
>>>>> "Sreekanth" == Sreekanth Reddy <sreekanth.re...@avagotech.com> writes:

Sreekanth> Before enabling MPI2_SCSIIO_CONTROL_TLR_ON flag in MPI SCSI
Sreekanth> IO request message, check whether TLR is enabled on the drive
Sreekanth> using 'sas_is_tlr_enabled' API.

Applied.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch] mvsas: don't allow negative timeouts

2015-11-13 Thread Martin K. Petersen
>>>>> "Dan" == Dan Carpenter <dan.carpen...@oracle.com> writes:

Dan> There is a static checker warning here because "val" is controlled
Dan> by the user and we have a upper bound on it but allow negative
Dan> numbers.  "val" appears to be a timeout in usec so this bug
Dan> probably means we have a longer timeout than we should.  Let's fix
Dan> this by changing "val" to unsigned.

Applied.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCHv4 1/1] SCSI: hosts: update to use ida_simple for host_no management

2015-11-13 Thread Martin K. Petersen
>>>>> "Lee" == Lee Duncan <ldun...@suse.com> writes:

>> Well, I'm a bit worried about the loss of a monotonically increasing
>> host number from the debugging perspective.  Right now, if you look
>> at any log, hostX always refers to one and only one incarnation
>> throughout the system lifetime for any given value of X.

That's a feature that I would absolutely hate to lose. I spend a huge
amount of time looking at system logs.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 00/25] mpt3sas: Mergering mpt2sas & mpt3sas driver code

2015-11-13 Thread Martin K. Petersen
>>>>> "Yinghai" == Yinghai Lu <ying...@kernel.org> writes:

Yinghai,

Yinghai> error: inlining failed in call to always_inline

James already queued the following fix from sfr: 0a5149ba02bd.

But thanks for the heads-up!

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch] hpsa: logical vs bitwise AND typo

2015-11-13 Thread Martin K. Petersen
>>>>> "Dan" == Dan Carpenter <dan.carpen...@oracle.com> writes:

Dan> HPSA_DIAG_OPTS_DISABLE_RLD_CACHING is a mask and bitwise AND was
Dan> intended here instead of logical &&.  This bug is essentially
Dan> harmless, it means that sometimes we don't print a warning message
Dan> which we wanted to print.

Applied.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 00/25] mpt3sas: Mergering mpt2sas & mpt3sas driver code

2015-11-11 Thread Martin K. Petersen
>>>>> "Sreekanth" == Sreekanth Reddy <sreekanth.re...@avagotech.com> writes:

Sreekanth,

Sreekanth> Last time we have posted a set of patches which combine the
Sreekanth> mpt2sas and mpt3sas driver code. and we are generating two
Sreekanth> driver modules (i.e. two separate .ko's) from this Combined
Sreekanth> driver source.

I have merged your combined driver.

The patches in the single-module portion of the series did not compile
individually and I gave up untangling them. They were fundamentally too
intertwined and I squashed them into one commit. Since it's mostly
boilerplate stuff it should not matter too much from a bisection
perspective.

Thanks for doing this work! This will make things much easier going
forward.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v4.3-rc7] be2iscsi : Fix bogus WARN_ON length check

2015-11-11 Thread Martin K. Petersen

Applied.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 1/5] ipr: Add delay to ensure coherent dumps.

2015-11-09 Thread Martin K. Petersen
>>>>> "Gabriel" == Gabriel Krisman Bertazi <kris...@linux.vnet.ibm.com> writes:

Gabriel> Add a holding pattern prior to collecting dump data, to wait
Gabriel> for the IOA indication that the Mailbox register is stable and
Gabriel> won't change without an explicit reset.  This ensures we'll be
Gabriel> collecting meaningful dump data, even when dumping right after
Gabriel> an adapter reset.

I have applied patches 1-5.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/3] isci: remove SCSI host before detaching from SAS transport

2015-11-09 Thread Martin K. Petersen
>>>>> "Jack" == Jack Wang <jinpu.w...@profitbricks.com> writes:

Applied patches 1-3.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] pm80xx: remove the SCSI host before detaching from SAS transport

2015-11-09 Thread Martin K. Petersen
>>>>> "Benjamin" == Benjamin Rood <benjaminjr...@gmail.com> writes:

Benjamin> Previously, when this module was unloaded via 'rmmod' with at
Benjamin> least one drive attached, the SCSI error handler thread would
Benjamin> become stuck in an infinite recovery loop and lockup the
Benjamin> system, necessitating a reboot.

Applied.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v9 0/8] Fix error message and present UFS variant

2015-11-09 Thread Martin K. Petersen
>>>>> "Yaniv" == Yaniv Gardi <yga...@codeaurora.org> writes:

I have applied this series.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/3] ibmvsci: make parameters max_id and max_channel read-only

2015-11-02 Thread Martin K. Petersen
>>>>> "Laurent" == Laurent Vivier <lviv...@redhat.com> writes:

Laurent> Ping ?

>> this series has been reviewed and ack'ed, as SCSI maintainer, could
>> you take it ?

My mailbox doesn't reach quite far enough back in time to pick this up
and I'd rather not have to deal with mail archive-mangled versions.
Please apply the relevant Reviewed-by tags and repost.

Thank you!

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] SCSI: Increase REPORT_LUNS timeout

2015-11-02 Thread Martin K. Petersen
>>>>> "Brian" == Brian King <brk...@linux.vnet.ibm.com> writes:

Brian> This patch increases the timeout used on the REPORT_LUNS to 30
Brian> seconds.  This patch solves the issue of 512 non existent LUNs
Brian> showing up after this event.

Applied.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/12] megaraid_sas : Updates for scsi for-next

2015-11-02 Thread Martin K. Petersen
>>>>> "sumit" == sumit saxena <sumit.sax...@avagotech.com> writes:

sumit> This patch set is rebased on top of last patch set sent by me-
sumit> http://marc.info/?l=linux-scsi=144102204225400=2 Please
sumit> consider this patch set for next kernel release.

Applied.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/8] pm80xx: Add ATTO 12Gb HBA support and fix various issues

2015-11-02 Thread Martin K. Petersen
>>>>> "Benjamin" == Benjamin Rood <benjaminjr...@gmail.com> writes:

Benjamin> The following series of patches are primarily aimed at adding
Benjamin> support for ATTO's 12Gb SAS adapters, which are based off of
Benjamin> the PMC-Sierra 8070/8072 series chips.  I have also addressed
Benjamin> other various issues that were discovered during our testing
Benjamin> and verification phase, mainly with resume-from-sleep,
Benjamin> configuring PHY profiles, and using legacy interrupts.

Applied.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] sg: Fix double-free when drives detach during SG_IO

2015-11-02 Thread Martin K. Petersen
>>>>> "Doug" == Douglas Gilbert <dgilb...@interlog.com> writes:

>> In sg_common_write(), we free the block request and return -ENODEV if
>> the device is detached in the middle of the SG_IO ioctl().
>> 
>> Unfortunately, sg_finish_rem_req() also tries to free srp->rq, so we
>> end up freeing rq->cmd in the already free rq object, and then free
>> the object itself out from under the current user.
>> 
>> This ends up corrupting random memory via the list_head on the rq
>> object. The most common crash trace I saw is this:

>> Signed-off-by: Calvin Owens <calvinow...@fb.com>

Doug> Acked-by: Douglas Gilbert <dgilb...@interlog.com>

Applied.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1 00/25] hpsa updates

2015-11-02 Thread Martin K. Petersen
>>>>> "Don" == Don Brace <don.br...@pmcs.com> writes:

Don,

There were several minor nits in the review comments. Please address
these and repost with the relevant Reviewed-by tags added so we can get
this series queued up.

Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v4 4/5] target: Use scsi helpers to build the sense data correctly

2015-07-09 Thread Martin K. Petersen
 Sagi == Sagi Grimberg sa...@mellanox.com writes:

Sagi Instead of open coding the sense buffer construction, use scsi
Sagi scsi_build_sense_buffer() and scsi_set_sense_information() helpers
Sagi which moved to scsi_common.

Reviewed-by: Martin K. Petersen martin.peter...@oracle.com

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v4 1/5] target: Inline transport_get_sense_codes()

2015-07-09 Thread Martin K. Petersen
 Sagi == Sagi Grimberg sa...@mellanox.com writes:

Sagi From: Bart Van Assche bart.vanass...@sandisk.com Inline this
Sagi function in its call site since it performs a trivial task and
Sagi since it is only called once.

Reviewed-by: Martin K. Petersen martin.peter...@oracle.com

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v4 2/5] target: Split transport_send_check_condition_and_sense()

2015-07-09 Thread Martin K. Petersen
 Sagi == Sagi Grimberg sa...@mellanox.com writes:

Sagi From: Bart Van Assche bart.vanass...@sandisk.com Move the code
Sagi for translating a sense_reason_t code into a SCSI status ASC and
Sagi ASCQ codes from transport_send_check_condition_and_sense() into
Sagi the new function translate_sense_reason(). Convert the switch
Sagi statement that performs the translation into table-driven code.

Reviewed-by: Martin K. Petersen martin.peter...@oracle.com

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] scsi: Fix sense information setting in fixed sized format

2015-07-09 Thread Martin K. Petersen
 Sagi == Sagi Grimberg sa...@mellanox.com writes:

Sagi In fixed size sense format the information field is a four byte
Sagi field.

Correct.

Reviewed-by: Martin K. Petersen martin.peter...@oracle.com

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line unsubscribe linux-scsi in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v5 00/32] HiSilicon SAS driver

2015-11-18 Thread Martin K. Petersen
>>>>> "John" == John Garry <john.ga...@huawei.com> writes:

John> This is the driver patchset for the HiSilicon SAS driver. The
John> driver is a platform driver.

I have staged this driver for 4.5.

Changes as a result of Rob's comments to patch 20 should be made as an
incremental patch.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [SCSI] st: Remove obsolete scsi_tape.max_pfn

2015-11-18 Thread Martin K. Petersen
>>>>> "Geert" == Geert Uytterhoeven <ge...@linux-m68k.org> writes:

Geert> Its last user was removed 10 years ago, in commit
Geert> 8b05b773b6030de5 ("[SCSI] convert st to use scsi_execute_async").

Applied to the 4.5 queue.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] qla2xxx: Remove unavailable firmware files

2015-11-18 Thread Martin K. Petersen
>>>>> "Himanshu" == Himanshu Madhani <himanshu.madh...@qlogic.com> writes:

Himanshu> Remove firmware binary names for the ISPs, which are not
Himanshu> submitted to linux-firmware

Queued for 4.5.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH, resend] scsi: advansys: fix big-endian builds

2015-11-18 Thread Martin K. Petersen
>>>>> "Arnd" == Arnd Bergmann <a...@arndb.de> writes:

Arnd> Building the advansys driver in a big-endian configuration such as
Arnd> ARM allmodconfig shows a warning:

Applied to 4.4.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCHv4 1/1] SCSI: hosts: update to use ida_simple for host_no management

2015-11-17 Thread Martin K. Petersen
>>>>> "Lee" == Lee Duncan <ldun...@suse.com> writes:

Lee> Martin: I will be glad to update the patch, creating a modprobe
Lee> parameter as suggested, if you find this acceptable.

For development use a module parameter would be fine. But I am concerned
about our support folks that rely on the incrementing host number when
analyzing customer log files.

Ewan: How do you folks feel about this change?

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH, RESEND] qla2xxx: Fix rwlock recursion

2015-11-17 Thread Martin K. Petersen
>>>>> "Bart" == Bart Van Assche <bart.vanass...@sandisk.com> writes:

Bart> This patch fixes the following kernel bug

Applied (4.4).

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 06/23] scsi_dh_alua: fixup description of stpg_endio()

2015-09-03 Thread Martin K. Petersen
>>>>> "Hannes" == Hannes Reinecke <h...@suse.de> writes:

Hannes> Fixup copy-and-paste error in the description of stpg_endio().

Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com>

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 07/23] scsi: remove scsi_show_sense_hdr()

2015-09-03 Thread Martin K. Petersen
>>>>> "Hannes" == Hannes Reinecke <h...@suse.de> writes:

Hannes> Last caller is gone, so remove it.

Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com>

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 08/23] scsi_dh_alua: use flag for RTPG extended header

2015-09-03 Thread Martin K. Petersen
>>>>> "Hannes" == Hannes Reinecke <h...@suse.de> writes:

Hannes> We should be using a flag when RTPG extended header is not
Hannes> supported, that saves us sending RTPG twice for older arrays.

Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com>

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 09/23] scsi_dh_alua: use unaligned access macros

2015-09-03 Thread Martin K. Petersen
>>>>> "Hannes" == Hannes Reinecke <h...@suse.de> writes:

Hannes> Use 'get_unaligned_XX' and 'put_unaligned_XX' instead of
Hannes> open-coding it.

Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com>

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 10/23] scsi_dh_alua: Pass buffer as function argument

2015-09-03 Thread Martin K. Petersen
>>>>> "Hannes" == Hannes Reinecke <h...@suse.de> writes:

Hannes> Pass in the buffer as a function argument for submit_rtpg().

Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com>

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 6/10] megaraid_sas : Chip reset if driver fail to bring ioc ready

2015-09-03 Thread Martin K. Petersen
>>>>> "Sumit" == sumit saxena <sumit.sax...@avagotech.com> writes:

Sumit> This patch will try to do chip reset from driver load time.
Sumit> Driver load time, if firmware is not comming to ready state,
Sumit> driver try chip reset calling adp_reset() callback. For fusion
Sumit> adapter, that call back was void, so it will not do any chip
Sumit> reset.

Sumit> Now, using this patch megasas_adp_reset_fusion() will have chip
Sumit> reset logic for Fusion adapter.

Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com>

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 9/10] megaraid_sas : Code refactor for use of requestorId

2015-09-03 Thread Martin K. Petersen
>>>>> "Sumit" == sumit saxena <sumit.sax...@avagotech.com> writes:

Sumit> Some of the code changes was proposed by David Binderman Removed
Sumit> redudant check of requestorId. Redundant condition:
Sumit> instance.requestorId.  Check for plasma firmware 1.11 or new
Sumit> restructured to support only for specific device id

Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com>

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 01/23] scsi_dh_alua: Disable ALUA handling for non-disk devices

2015-09-03 Thread Martin K. Petersen
>>>>> "Hannes" == Hannes Reinecke <h...@suse.de> writes:

Hannes> Non-disk devices might support ALUA, but the firmware
Hannes> implementation is untested and frequently broken.  As we're
Hannes> don't actually need it disable ALUA support for non-disk device
Hannes> for now.

Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com>

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 10/10] megaraid_sas : Version upgrade

2015-09-03 Thread Martin K. Petersen
>>>>> "Sumit" == sumit saxena <sumit.sax...@avagotech.com> writes:

Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com>

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 8/10] megaraid_sas : Fix validHandles check in io path

2015-09-03 Thread Martin K. Petersen
>>>>> "Sumit" == sumit saxena <sumit.sax...@avagotech.com> writes:

Sumit> Syncro firmware supports round robin IO switch on dual path. For
Sumit> this driver use validHandles as a check for dual path. This check
Sumit> suppose to be > 1 (not > 2)

Sumit> Without this patch, earlier driver code does not use dual path
Sumit> functionality.

Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com>

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 7/10] megaraid_sas : Print critical fw event message

2015-09-03 Thread Martin K. Petersen
>>>>> "Sumit" == sumit saxena <sumit.sax...@avagotech.com> writes:

Sumit> Print firmware event in readable format. This will help user to
Sumit> track any critical firmware event without any application
Sumit> support.

Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com>

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 02/23] scsi_dh_alua: Use vpd_pg83 information

2015-09-03 Thread Martin K. Petersen
>>>>> "Hannes" == Hannes Reinecke <h...@suse.de> writes:

Hannes> The SCSI device now has the VPD page 0x83 information attached,
Hannes> so there is no need to query it again.

Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com>

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 03/23] scsi_dh_alua: improved logging

2015-09-03 Thread Martin K. Petersen
>>>>> "Hannes" == Hannes Reinecke <h...@suse.de> writes:

Hannes> Issue different logging messages if ALUA is not supported or the
Hannes> TPGS setting is invalid.

Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com>

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCHv2 00/18] ALUA device handler update, part 1

2015-12-02 Thread Martin K. Petersen
>>>>> "Hannes" == Hannes Reinecke <h...@suse.de> writes:

Hannes> Hi all, here's the first part of my ALUA device handler update.
Hannes> It's mainly bugfixes and minor improvements; the two important
Hannes> things are the addition of VPD parsing functions
Hannes> scsi_vpd_lun_id() and scsi_vpd_tpg_id().  This series has been
Hannes> split off from the original 'Asynchronous ALUA' patchset, as
Hannes> these bits are pretty uncontroversial and have a good chance of
Hannes> being merged reasonably soon.

Applied to 4.5/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [scsi:fixes 16/18] warning: (SCSI_MPT2SAS) selects SCSI_MPT3SAS which has unmet direct dependencies (SCSI_LOWLEVEL && ..)

2015-12-02 Thread Martin K. Petersen
>>>>> "James" == James Bottomley <james.bottom...@hansenpartnership.com> writes:

>> warning: (SCSI_MPT2SAS) selects SCSI_MPT3SAS which has unmet direct
>> dependencies (SCSI_LOWLEVEL && PCI && SCSI)

James> That's unfortunate.  The problem is that select and depend don't
James> interact because Kconfig doesn't have a SAT solver, so depend
James> picks up dependencies and select does onward selects, but select
James> doesn't pick up dependencies.  To fix this, we need to add the
James> correct dependencies to the MPT2SAS option like this.

Yeah, I was wondering about whether it would make sense to add the
dependency when I did the patch. I did test after unselecting SCSI but
didn't get any warnings. In retrospect I probably had something else
configured that pulled it back in.

In any case: Patch looks good to me.

I also asked Fengguang to add scsi.git to the kbuild test robot. It
looks like it's only been testing the SCSI branches I kept in my regular
git tree and they were a bit behind scsi.git.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/4] bfa: Patches for scsi "misc" branch

2015-12-02 Thread Martin K. Petersen
>>>>> "Anil" ==   <anil.gurumur...@qlogic.com> writes:

Anil> Please apply the following patches to the scsi tree, misc branch
Anil> at your earliest convenience.

Series applied to 4.5/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Linux kernels 4.3+ mess up MPT2SAS configs

2015-12-03 Thread Martin K. Petersen
>>>>> "John" == John Stoffel <j...@stoffel.org> writes:

John> I've got an LSI MPT2SAS controller in my home system, great board,
John> running well.  When I try to use kernels newer than approximately
John> 4.3.0, the default Kconfig entry goes away because of what looks
John> like a merge of the mpt2sas and mpt3sas drivers.

http://git.kernel.org/cgit/linux/kernel/git/mkp/scsi.git/commit/?h=4.4/scsi-queue

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] scsi_dh_alua: Remove stale variables

2015-12-07 Thread Martin K. Petersen
>>>>> "Hannes" == Hannes Reinecke <h...@suse.de> writes:

Hannes> With commit 83ea0e5e3501 these variables became obsolete, but
Hannes> weren't removed.

Applied to 4.5/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] storvsc: add logging for error/warning messages

2015-12-10 Thread Martin K. Petersen
>>>>> "Long" == Long Li <lon...@microsoft.com> writes:

Long> Introduce a logging level for storvsc to log certain error/warning
Long> messages. Those messages are helpful in some environments,
Long> e.g. Microsoft Azure, for customer support and troubleshooting
Long> purposes.

Applied to 4.5/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [SCSI] osd: fix signed char versus %02x issue

2015-12-10 Thread Martin K. Petersen
>>>>> "Andy" == Andy Shevchenko <andy.shevche...@gmail.com> writes:

Andy> I have several patches on SCSI subsytem like this one. Some of
Andy> them didn't manage kernel (even having Ack!) for years already.
Andy> Is it okay if I collect them together and send a bunch once again

Re-sending to linux-scsi is fine. The trick is finding people willing to
review them...

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH RESEND] cxlflash: a couple off by one bugs

2015-12-10 Thread Martin K. Petersen
>>>>> "Matthew" == Matthew R Ochs <mro...@linux.vnet.ibm.com> writes:

Matthew> The "> MAX_CONTEXT" should be ">= MAX_CONTEXT".  Otherwise we
Matthew> go one step beyond the end of the cfg->ctx_tbl[] array.

Applied to 4.5/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/15] copy offload patches

2015-12-10 Thread Martin K. Petersen
>>>>> "Mikulas" == Mikulas Patocka <mpato...@redhat.com> writes:

Mikulas,

Mikulas> This patch series adds copy offload (the XCOPY command) to the
Mikulas> block layer, SCSI subsystems and device mapper.

Now that the VFS stuff appears to stabilize I agree it's a good time to
revisit all this. I just merged the required VPD patches from Hannes so
those will be in 4.5.

I have a bunch of changes to the SCSI code that I worked on over the
spring/summer based on a feedback from the array vendors after
discussions we started at LSF/MM. Generally speaking, their comments
didn't make things easier, nor prettier :( But your two bio approach is
a requirement to accommodate those needs (token-based copy) so I'll work
on consolidating your changes with mine.

That said, we still need Mike Christie's patches to go in first.

Mike: What's your status? I'm afraid I didn't get a chance to dig very
deep in your series since it coincided with me scrambling to sort out
SCSI for 4.4. Do you think there's a chance we could get your patches in
shape for 4.5? Is there an up-to-date tree I can look at?

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: kernel BUG at block/bio.c:1787! while initializing scsi_debug on ppc64 host

2015-12-15 Thread Martin K. Petersen
>>>>> "Eryu" == Eryu Guan <guane...@gmail.com> writes:

Eryu,

Does the patch below fix the issue?

-- 
Martin K. Petersen  Oracle Linux Engineering

diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 3d22fc3e3c1a..d1eb7aa78b8d 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2667,8 +2667,9 @@ static void sd_read_block_limits(struct scsi_disk *sdkp)
 
if (buffer[3] == 0x3c) {
unsigned int lba_count, desc_count;
+   u64 max_ws = get_unaligned_be64([36]);
 
-   sdkp->max_ws_blocks = (u32)get_unaligned_be64([36]);
+   sdkp->max_ws_blocks = (u32)max_ws;
 
if (!sdkp->lbpme)
goto out;
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/3] scsi_debug: Increase the reported optimal transfer length

2015-12-16 Thread Martin K. Petersen
The OPTIMAL TRANSFER LENGTH reported by scsi_debug is 64 blocks which
translates to 32KB with the default logical block size. That's much
lower than what real storage devices typically report (256KB to 1MB).

Bump the optimal transfer length to 1024 blocks.

Signed-off-by: Martin K. Petersen <martin.peter...@oracle.com>
---
 drivers/scsi/scsi_debug.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index d09d60293c27..b80b037f2982 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -129,7 +129,7 @@ static const char *scsi_debug_version_date = "20141022";
 #define DEF_NO_LUN_0   0
 #define DEF_NUM_PARTS   0
 #define DEF_OPTS   0
-#define DEF_OPT_BLKS 64
+#define DEF_OPT_BLKS 1024
 #define DEF_PHYSBLK_EXP 0
 #define DEF_PTYPE   0
 #define DEF_REMOVABLE false
@@ -4140,7 +4140,7 @@ MODULE_PARM_DESC(no_lun_0, "no LU number 0 (def=0 -> have 
lun 0)");
 MODULE_PARM_DESC(no_uld, "stop ULD (e.g. sd driver) attaching (def=0))");
 MODULE_PARM_DESC(num_parts, "number of partitions(def=0)");
 MODULE_PARM_DESC(num_tgts, "number of targets per host to simulate(def=1)");
-MODULE_PARM_DESC(opt_blks, "optimal transfer length in block (def=64)");
+MODULE_PARM_DESC(opt_blks, "optimal transfer length in blocks (def=1024)");
 MODULE_PARM_DESC(opts, "1->noise, 2->medium_err, 4->timeout, 
8->recovered_err... (def=0)");
 MODULE_PARM_DESC(physblk_exp, "physical block exponent (def=0)");
 MODULE_PARM_DESC(ptype, "SCSI peripheral type(def=0[disk])");
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 3/3] block: Export max_dev_sectors_kb in sysfs

2015-12-16 Thread Martin K. Petersen
Some storage devices report a maximum transfer length which indicates
the maximum size of an I/O request that the device can process. This
limit is enforced in combination with the controller's max_hw_sectors
and DMA constraints to ensure that we do not issue a command too big for
the device.

Export the max_dev_sectors_kb queue limit in sysfs and update the
documentation accordingly.

Signed-off-by: Martin K. Petersen <martin.peter...@oracle.com>
---
 Documentation/ABI/testing/sysfs-block |  9 +
 Documentation/block/queue-sysfs.txt   | 11 +--
 block/blk-settings.c  |  4 +++-
 block/blk-sysfs.c | 13 +
 4 files changed, 34 insertions(+), 3 deletions(-)

diff --git a/Documentation/ABI/testing/sysfs-block 
b/Documentation/ABI/testing/sysfs-block
index 71d184dbb70d..4f284d38c085 100644
--- a/Documentation/ABI/testing/sysfs-block
+++ b/Documentation/ABI/testing/sysfs-block
@@ -235,3 +235,12 @@ Description:
write_same_max_bytes is 0, write same is not supported
by the device.
 
+What:  /sys/block//queue/max_dev_sectors_kb
+Date:  December 2015
+Contact:   Martin K. Petersen <martin.peter...@oracle.com>
+Description:
+   Some storage devices report the maximum size that the
+   device can process in a single READ or WRITE
+   request. This limit is used in combination with
+   constraints set by the controller driver to limit the
+   size of filesystem requests.
diff --git a/Documentation/block/queue-sysfs.txt 
b/Documentation/block/queue-sysfs.txt
index e5d914845be6..a078995f3eae 100644
--- a/Documentation/block/queue-sysfs.txt
+++ b/Documentation/block/queue-sysfs.txt
@@ -55,9 +55,15 @@ logical_block_size (RO)
 ---
 This is the logcal block size of the device, in bytes.
 
+max_dev_sectors_kb (R)
+--
+This is the maximum number of kilobytes supported by the storage device
+for a READ or WRITE request.
+
 max_hw_sectors_kb (RO)
 --
-This is the maximum number of kilobytes supported in a single data transfer.
+This is the maximum number of kilobytes supported by the storage
+controller in a single data transfer.
 
 max_integrity_segments (RO)
 ---
@@ -68,7 +74,8 @@ max_sectors_kb (RW)
 ---
 This is the maximum number of kilobytes that the block layer will allow
 for a filesystem request. Must be smaller than or equal to the maximum
-size allowed by the hardware.
+size allowed by the storage controller (max_hw_sectors_kb) and the
+maximum size allowed by the storage device (max_dev_sectors_kb).
 
 max_segments (RO)
 -
diff --git a/block/blk-settings.c b/block/blk-settings.c
index dd4973583978..362b0179c86a 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -232,7 +232,9 @@ EXPORT_SYMBOL(blk_queue_bounce_limit);
  *max_sectors is a soft limit imposed by the block layer for
  *filesystem type requests.  This value can be overridden on a
  *per-device basis in /sys/block//queue/max_sectors_kb.
- *The soft limit can not exceed max_hw_sectors.
+ *
+ *The soft limit's lower bound is the page cache size and it can not
+ *exceed neither max_hw_sectors, nor max_dev_sectors.
  **/
 void blk_queue_max_hw_sectors(struct request_queue *q, unsigned int 
max_hw_sectors)
 {
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index e140cc487ce1..c289f9f6dcd9 100644
--- a/block/blk-sysfs.c
+++ b/block/blk-sysfs.c
@@ -225,6 +225,13 @@ static ssize_t queue_max_hw_sectors_show(struct 
request_queue *q, char *page)
return queue_var_show(max_hw_sectors_kb, (page));
 }
 
+static ssize_t queue_max_dev_sectors_show(struct request_queue *q, char *page)
+{
+   int max_dev_sectors_kb = q->limits.max_dev_sectors >> 1;
+
+   return queue_var_show(max_dev_sectors_kb, (page));
+}
+
 #define QUEUE_SYSFS_BIT_FNS(name, flag, neg)   \
 static ssize_t \
 queue_show_##name(struct request_queue *q, char *page) \
@@ -371,6 +378,11 @@ static struct queue_sysfs_entry queue_max_hw_sectors_entry 
= {
.show = queue_max_hw_sectors_show,
 };
 
+static struct queue_sysfs_entry queue_max_dev_sectors_entry = {
+   .attr = {.name = "max_dev_sectors_kb", .mode = S_IRUGO },
+   .show = queue_max_dev_sectors_show,
+};
+
 static struct queue_sysfs_entry queue_max_segments_entry = {
.attr = {.name = "max_segments", .mode = S_IRUGO },
.show = queue_max_segments_show,
@@ -483,6 +495,7 @@ static struct attribute *default_attrs[] = {
_requests_entry.attr,
_ra_entry.attr,
_max_hw_sectors_entry.attr,
+   _max_dev_sectors_entry.attr,
_max_sectors_entry.attr,
_max_segments_entry.attr,
_max_integrity_segments_entry.attr,
--

[PATCH 2/3] sd: Reject optimal transfer length smaller than page size

2015-12-16 Thread Martin K. Petersen
Eryu Guan reported that loading scsi_debug would fail. This turned out
to be caused by scsi_debug reporting an optimal I/O size of 32KB which
is smaller than the 64KB page size on the PowerPC system in question.

Add a check to ensure that we only use the device-reported OPTIMAL
TRANSFER LENGTH if it is bigger than or equal to the page cache size.

Reported-by: Eryu Guan <guane...@gmail.com>
Reported-by: Ming Lei <tom.leim...@gmail.com>
Signed-off-by: Martin K. Petersen <martin.peter...@oracle.com>
---
 drivers/scsi/sd.c | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 3d22fc3e3c1a..4e08d1cd704d 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2885,10 +2885,13 @@ static int sd_revalidate_disk(struct gendisk *disk)
 
/*
 * Use the device's preferred I/O size for reads and writes
-* unless the reported value is unreasonably large (or garbage).
+* unless the reported value is unreasonably small, large, or
+* garbage.
 */
-   if (sdkp->opt_xfer_blocks && sdkp->opt_xfer_blocks <= dev_max &&
-   sdkp->opt_xfer_blocks <= SD_DEF_XFER_BLOCKS)
+   if (sdkp->opt_xfer_blocks &&
+   sdkp->opt_xfer_blocks <= dev_max &&
+   sdkp->opt_xfer_blocks <= SD_DEF_XFER_BLOCKS &&
+   sdkp->opt_xfer_blocks * sdp->sector_size >= PAGE_CACHE_SIZE)
rw_max = q->limits.io_opt =
logical_to_sectors(sdp, sdkp->opt_xfer_blocks);
else
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch] qla2xxx: fix a timeout loop

2015-12-16 Thread Martin K. Petersen
>>>>> "Dan" == Dan Carpenter <dan.carpen...@oracle.com> writes:

Dan> After the loop we test for "if (!retries) " as a failure, but
Dan> actually the post-op here will end with retries set to -1.  I have
Dan> fixed this by using a pre-op instead.

Applied to 4.4/scsi-fixes.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Note to driver maintainers

2015-12-16 Thread Martin K. Petersen

When somebody posts a patch to a piece of code you maintain it is your
responsibility to respond to it. That's what being a maintainer means.

There are a ton of trivial/Coccinelle fixes posted that nobody has done
anything about. I'm not talking about spelling fixes or whitespace
churn. Many of these patches look valid to me. There are also a few
non-trivial patches that have gotten no attention from the relevant
driver maintainers.

People such as Hannes, Johannes, Tomas and Christoph are reviewing
*your* submissions, providing the mandatory impartial review tag that
permits your patches to go into the main tree.

You can not rely on these people also taking on the burden of reviewing
third party changes to your code. That really is your job as the driver
maintainer. Every patch that touches code that you own demands a
response from you. Every. Single. Patch.

We review your changes. You have to review everybody else's.

Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] hisi_sas: use platform_get_irq()

2015-12-16 Thread Martin K. Petersen
>>>>> "John" == John Garry <john.ga...@huawei.com> writes:

John> It is preferred that drivers use platform_get_irq() instead of
John> irq_of_parse_and_map(), so replace.

Applied to 4.5/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCHv4 1/1] SCSI: hosts: update to use ida_simple for host_no management

2015-12-14 Thread Martin K. Petersen
>>>>> "Hannes" == Hannes Reinecke <h...@suse.de> writes:

>> I'm not opposed to having the module option if others (Martin?) feel
>> they need it, but generally I think it's better to keep things as
>> simple as possible.  So, unless there are strong objections, I would
>> say no.

Hannes> Agreeing with Ewan here.

Hannes> I guess it's up to you to tell us whether you absolutely need a
Hannes> module parameter ...

Still not a big ida fan but since the most people seem to be in favor of
this I guess I'll have to bite the bullet.

I don't see much value in the module parameter since it will require
customers to tweak their configs and reproduce. Not worth the hassle.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch] qla2xxx: fix a timeout loop

2015-12-17 Thread Martin K. Petersen
>>>>> "Dan" == Dan Carpenter <dan.carpen...@oracle.com> writes:

Dan> The qlogic devs asked me to redo this patch but you have already
Dan> applied it.  Should I resend or redo it on top of the earlier
Dan> patch.  (James's tree was rebaseable for a day after a patch was
Dan> "applied".)

I dropped it for now.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [patch] hisi_sas: fix error codes in hisi_sas_task_prep()

2015-12-10 Thread Martin K. Petersen
>>>>> "Dan" == Dan Carpenter <dan.carpen...@oracle.com> writes:

Dan> There were a couple cases where the error codes weren't set and
Dan> also I changed the success return to "return 0;" which is the same
Dan> as "return rc;" but more explicit.

Applied to 4.5/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH RESEND] cxlflash: drop unlikely before IS_ERR_OR_NULL

2015-12-10 Thread Martin K. Petersen
>>>>> "Matthew" == Matthew R Ochs <mro...@linux.vnet.ibm.com> writes:

Matthew> IS_ERR_OR_NULL already contain an unlikely compiler flag. Drop
Matthew> it.

Applied to 4.5/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] VMW_PVSCSI: Fix the issue of DMA-API related warnings.

2015-12-10 Thread Martin K. Petersen
>>>>> "Josh" == Josh Boyer <jwbo...@fedoraproject.org> writes:

Josh> The driver is missing calls to pci_dma_mapping_error() after
Josh> performing the DMA mapping, which caused DMA-API warning to show
Josh> up in dmesg's output. Though that happens only when DMA_API_DEBUG
Josh> option is enabled. This change fixes the issue and makes
Josh> pvscsi_map_buffers() function more robust.

Applied to 4.5/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [SCSI] osd: fix signed char versus %02x issue

2015-12-10 Thread Martin K. Petersen
>>>>> "Rasmus" == Rasmus Villemoes <li...@rasmusvillemoes.dk> writes:

Rasmus> If char is signed and one of these bytes happen to have a value
Rasmus> outside the ascii range, the corresponding output will consist
Rasmus> of "ff" followed by the two hex chars that were actually
Rasmus> intended. One way to fix it would be to change the casts to
Rasmus> (u8*) aka (unsigned char*), but it is much simpler (and
Rasmus> generates smaller code) to use the %ph extension which was
Rasmus> created for such short hexdumps.

Applied to 4.5/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: kernel BUG at block/bio.c:1787! while initializing scsi_debug on ppc64 host

2015-12-15 Thread Martin K. Petersen
>>>>> "Ming" == Ming Lei <tom.leim...@gmail.com> writes:

Ming,

Ming> No, it can't.

Well, it fixes a problem on one of my test systems where max_ws_blocks,
by virtue of being 64 bits, clobbers opt_xfer_blocks causing rw_len and
thus max_sectors to be set incorrectly.

We haven't run into that issue on real hardware. Probably because
scsi_debug is the only driver reporting $LUDICROUS_NUMBER as the max hw
transfer.

Ming> As the debug log shows, it is because you use 'OPTIMAL TRANSFER
Ming> LENGTH' to set queue's max_sectors.

But that is intentional.

I agree that the value chosen by scsi_debug in this case is very low and
we should fix that.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/15] copy offload patches

2015-12-15 Thread Martin K. Petersen
>>>>> "Mikulas" == Mikulas Patocka <mpato...@redhat.com> writes:

Mikulas> Is there some software iSCSI implementation that supports
Mikulas> token-based copy? So that I could try to make support for it.

I did write support for token-based copy but it's in a different branch
from the xcopy stuff. I will have to reconcile those two branches and
then layer your stuff on top.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: kernel BUG at block/bio.c:1787! while initializing scsi_debug on ppc64 host

2015-12-15 Thread Martin K. Petersen
>>>>> "Ming" == Ming Lei <tom.leim...@gmail.com> writes:

Ming> I think it is wrong to set max sectors from OPTIMAL TRANSFER
Ming> LENGTH.

OTL is the preferred size for REQ_TYPE_FS requests as reported by the
device. The intent is to honor that. Your patch clamps the rw_size to
BLK_DEF_MAX_SECTORS which is not correct.

Ming> Also it is ugly to set limits->max_sectors from drivers directly,
Ming> and drivers should have called block helpers to do that.

We're trying to avoid unnecessary accessor functions for the queue
limits. But I will add a sanity check for the page size. And fix up
scsi_debug.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: kernel BUG at block/bio.c:1787! while initializing scsi_debug on ppc64 host

2015-12-15 Thread Martin K. Petersen
>>>>> "Eryu" == Eryu Guan <guane...@gmail.com> writes:

Eryu,

Eryu> This is still reproducible with 4.4-rc5 kernel.

Sorry about the delay. I've been busy with a lab move and most of my
machines have been disconnected since last week. Almost done getting my
equipment back online.

However, I think I have found the smoking gun. More in a bit...

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] mpt3sas: a correction in unmap_resources

2016-01-04 Thread Martin K. Petersen
>>>>> "Tomas" == Tomas Henzl <the...@redhat.com> writes:

Tomas> It might happen that we try to free an already freed pointer.
Tomas> Tomas

Applied to 4.5/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH RFC 0/2] avoid crashing when reading /proc/scsi/scsi and simultaneously removing devices

2016-01-04 Thread Martin K. Petersen
>>>>> "Ewan" == Ewan D Milne <emi...@redhat.com> writes:

Ewan> The klist traversal used by the reading of /proc/scsi/scsi is not
Ewan> interlocked against device removal.  It takes a reference on the
Ewan> containing object, but this does not prevent the device from being
Ewan> removed from the list.  Thus, we get errors and eventually panic,
Ewan> as shown in the traces below.  Fix this by keeping a klist
Ewan> iterator in the seq_file private data.

Applied to 4.5/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 0/3] hpsa update

2016-01-04 Thread Martin K. Petersen
>>>>> "Don" == Don Brace <don.br...@pmcs.com> writes:

Don> These patches are based on Linus's tree The changes are: - correct
Don> missing changes from snprintf to scnprintf in path_info_show by
Don> Rasmus Villemoes - fix reported bus for SAS transport devices - add
Don> in enclosure information

Applied to 4.5/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH V2 0/9] aacraid: Patchset for aacraid driver version 41052

2016-01-04 Thread Martin K. Petersen
>>>>> "Raghava" == Raghava Aditya Renukunta <raghavaaditya.renuku...@pmcs.com> 
>>>>> writes:

Raghava> This patchset includes the following changes (bug fixes and new
Raghava> feature support) specific to aacraid driver.

Raghava> V2: Removed aac_fib_free_tag function Setup relevant fib
Raghava> variables only in once Created aac_fib_vector_assign function
Raghava> Made EEH functions static Added character device status macros
Raghava> Changed location of aac->shutdown to prevent race condition
Raghava> Withdrew patch that disables device ID wild card binding

You dropped all the review/fix/stable tags you had received from Tomas
and Johannes.

Please apply the relevant tags and resubmit this series.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 02/35] block: add REQ_OP definitions and bi_op/op fields

2016-01-06 Thread Martin K. Petersen
>>>>> "Mike" == mchristi  <mchri...@redhat.com> writes:

+enum req_op {
+   REQ_OP_READ,
+   REQ_OP_WRITE= REQ_WRITE,
+   REQ_OP_DISCARD  = REQ_DISCARD,
+   REQ_OP_WRITE_SAME   = REQ_WRITE_SAME,
+};
+

I have been irked by the REQ_ prefix in bios since the flags were
consolidated a while back. When I attempted to fix the READ/WRITE mess I
used a BLK_ prefix as a result.

Anyway. Just bikeshedding...

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2016-01-06 Thread Martin K. Petersen
>>>>> "Mike" == mchristi  <mchri...@redhat.com> writes:

Mike> The following patches begin to cleanup the request->cmd_flags and
bio-> bi_rw mess. We currently use cmd_flags to specify the operation,
Mike> attributes and state of the request. For bi_rw we use it for
Mike> similar info and also the priority but then also have another
Mike> bi_flags field for state. At some point, we abused them so much we
Mike> just made cmd_flags 64 bits, so we could add more.

Mike> The following patches seperate the operation (read, write discard,
Mike> flush, etc) from cmd_flags/bi_rw.

Mike> This patchset was made against linux-next from today Jan 5 2016.
Mike> (git tag next-20160105).

Very nice work. Thanks for doing this!

I think it's a much needed cleanup. I focused mainly on the core block,
discard, write same and sd.c pieces and everything looks sensible to me.

I wonder what the best approach is to move a patch set with this many
stakeholders forward? Set a "speak now or forever hold your peace"
review deadline?

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/6] cxlflash: Miscellaneous fixes and updates

2016-01-06 Thread Martin K. Petersen
>>>>> "Uma" == Uma Krishnan <ukri...@linux.vnet.ibm.com> writes:

Uma> This patch set contains miscellaneous fixes and adds support for a
Uma> future IBM CXL adapter. This series is intended for 4.5 and is
Uma> bisectable. Please reference the changelog below for details on
Uma> what has been altered from previous versions of this patch set.

Applied to 4.5/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v4 00/78] More fixes, cleanup and modernization for NCR5380 drivers

2016-01-06 Thread Martin K. Petersen
>>>>> "Finn" == Finn Thain <fth...@telegraphics.com.au> writes:

Finn> Like my previous work on the NCR5380 drivers, this patch series
Finn> has bug fixes, code cleanup and modernization. These drivers
Finn> suffer from mistakes, poor style and neglect and this long series
Finn> addresses the worst of it, covering all ten wrapper drivers and
Finn> both of the core driver forks. The combined size of the drivers is
Finn> reduced by over 700 LoC.

I have staged this for inclusion in a separate branch. Will pull it into
the main queue unless kbuild complains.

http://git.kernel.org/cgit/linux/kernel/git/mkp/scsi.git/log/?h=4.5/ncr5380

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: kernel BUG at block/bio.c:1787! while initializing scsi_debug on ppc64 host

2016-01-05 Thread Martin K. Petersen
>>>>> "Eryu" == Eryu Guan <guane...@gmail.com> writes:

Eryu> Any updates on this? It's still reproducible with 4.4-rc8 kernel,
Eryu> and still blocks some of my tests :)

http://git.kernel.org/cgit/linux/kernel/git/mkp/scsi.git/log/?h=4.4/scsi-fixes

It just hasn't made it to Linus yet...

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCHv4 1/1] SCSI: hosts: update to use ida_simple for host_no management

2016-01-05 Thread Martin K. Petersen
>>>>> "Lee" == Lee Duncan <ldun...@suse.com> writes:

Lee> Do you need me to resubmit this patch now that it's accepted?

Please resend.

Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/1] mvsas: add SGPIO support to Marvell 94xx

2016-01-06 Thread Martin K. Petersen
>>>>> "Wilfried" == Wilfried Weissmann <wilfried.weissm...@gmx.at> writes:

Wilfried> add SGPIO support to Marvell 94xx

Applied to 4.5/scsi-queue.

Thanks!

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] scsi: mvsas: fix indenting on return error code

2016-01-06 Thread Martin K. Petersen
>>>>> "Colin" == Colin King <colin.k...@canonical.com> writes:

Colin,

Colin> The return code and error return is incorrectly indented which
Colin> may cause some confusion as it appears at first sight to be
Colin> associated with a device not ready error (with missing { }
Colin> braces) rather than a DEV_IS_GONE() failure.

This problem has already been addressed:

https://git.kernel.org/cgit/linux/kernel/git/mkp/scsi.git/commit/?h=4.5/scsi-queue=7789cd39274c

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v3 0/4] scsi: cleanup ioctl headers and provide UAPI versions

2016-01-06 Thread Martin K. Petersen
>>>>> "Paolo" == Paolo Bonzini <pbonz...@redhat.com> writes:

>> This is v3 of the series to provide an "official" sg.h header (and
>> scsi_ioctl.h too, though it's basically obsolete) together with the
>> other userspace API definitions.  The change from v2 to v3 is that
>> defaults for sg.c are not exported in include/uapi/linux/sg.c.

Paolo> What happened to these patches?...

They predate me being patch monkey. Please repost with any review tags
or acks you may have received.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH V4 0/4] scsi: storvsc: Properly support FC hosts

2016-01-06 Thread Martin K. Petersen
>>>>> "KYS" == K Y Srinivasan <k...@microsoft.com> writes:

The template discussion appears to have lost momentum and since the
concerns were minor I have applied your latest series to 4.5/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/1] mvsas: add SGPIO support to Marvell 94xx

2015-12-21 Thread Martin K. Petersen
>>>>> "Wilfried" == Wilfried Weissmann <wilfried.weissm...@gmx.at> writes:

Wilfried,

Wilfried> add SGPIO support to Marvell 94xx

Does not apply to current tree. Please rebase on top of:

http://git.kernel.org/cgit/linux/kernel/git/mkp/scsi.git/log/?h=4.5/scsi-queue

Thank you!

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 00/17] lpfc: Update to revision 11.0.0.10

2015-12-21 Thread Martin K. Petersen
>>>>> "James" == James Smart <james.sm...@avagotech.com> writes:

James> This patch set updates the lpfc driver to revision 11.0.0.10

James> The patches were cut against scsi-misc

Applied to 4.5/scsi-queue except for 3/17.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Reviews, please

2015-12-17 Thread Martin K. Petersen

There are not a whole lot of working days left before the 4.5 merge
window opens...


Driver updates needing full reviews:

https://patchwork.kernel.org/bundle/mkp/be2iscsi/
https://patchwork.kernel.org/bundle/mkp/qla2xxx/


lpfc looks to be in decent shape but another set of eyes wouldn't hurt:

https://patchwork.kernel.org/bundle/mkp/lpfc/


Doug Gilbert, maybe you could take a look at this series since it mainly
touches your code?

https://patchwork.kernel.org/bundle/mkp/constants/


hpsa 2/3 and 3/3 needs a non-PMCS review:

https://patchwork.kernel.org/bundle/mkp/hpsa/


cxlflash needs a non-IBM review:

https://patchwork.kernel.org/bundle/mkp/cxlflash/


storvsc patch 2/4 is missing a review. Johannes, you reviewed the rest
of this series. Care to take a look?

https://patchwork.kernel.org/bundle/mkp/storvsc/


This mvsas GPIO patch hasn't gotten any attention. Would be sad to drop
a sizable patch adding new functionality:

https://patchwork.kernel.org/patch/7610411/


Ewan's /proc/scsi/scsi iterator fixes need comments:

https://patchwork.kernel.org/bundle/mkp/bus_device/


Hannes' ALUA follow-up series is only partially reviewed. I'll review
the patches I haven't done already. But I would like another set of eyes
on these:

https://patchwork.kernel.org/bundle/mkp/alua/


I dropped everything that's been sitting for more than a month. There
are still a bunch of trivial fixes on the list that would be nice to get
either acked or nacked:

https://patchwork.kernel.org/project/linux-scsi/list/

Thank you!

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH RESEND] scsi_debug: fix prevent_allow+verify regressions

2015-11-24 Thread Martin K. Petersen
>>>>> "Doug" == Douglas Gilbert <dgilb...@interlog.com> writes:

Doug> Ruediger Meier observed a regression with the PREVENT ALLOW MEDIUM
Doug> REMOVAL command in lk 3.19:
Doug> http://www.spinics.net/lists/util-linux-ng/msg11448.html

Applied to 4.4.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] scsi: rescan VPD attributes

2015-11-25 Thread Martin K. Petersen
>>>>> "Hannes" == Hannes Reinecke <h...@suse.de> writes:

Hannes> The VPD page information might change, so we need to be able to
Hannes> update it. This patch implements a VPD page rescan whenever the
Hannes> 'rescan' sysfs attribute is triggered.

I was looking into merging the ALUA series but this prerequisite patch
is lacking reviews...

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/2] Fix a scsi_host_dev_release() memory leak

2015-11-25 Thread Martin K. Petersen
>>>>> "Bart" == Bart Van Assche <bart.vanass...@sandisk.com> writes:

Bart> This patch series consists of two patches: - A first patch that
Bart> converts the code that accesses shost->shost_gendev to manipulate
Bart> the shost reference count into scsi_host_{get,put}() calls.  - A
Bart> second patch that fixes the actual memory leak.

I gave a bunch of reviews for v1 but no takers for v2 of the second
patch.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] scsi: use sector_div instead of do_div

2015-11-25 Thread Martin K. Petersen
>>>>> "Arnd" == Arnd Bergmann <a...@arndb.de> writes:

Arnd> do_div is the wrong way to divide a sector_t, as it is less
Arnd> efficient when sector_t is 32-bit wide. With the upcoming do_div
Arnd> optimizations, the kernel starts warning about this:

Applied.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH RESEND] scsi_debug: fix prevent_allow+verify regressions

2015-11-25 Thread Martin K. Petersen
>>>>> "Andy" == Andy Shevchenko <andy.shevche...@gmail.com> writes:

Andy,

Andy> but can you pay a little attention to
Andy> http://www.spinics.net/lists/linux-scsi/msg81778.html ? It seems
Andy> it wasn't applied.

Please resubmit to linux-scsi. We'll take a look.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 01/18] scsi_dh: move 'dh_state' sysfs attribute to generic code

2015-11-30 Thread Martin K. Petersen
>>>>> "Hannes" == Hannes Reinecke <h...@suse.de> writes:

Hannes> As scsi_dh.c is now always compiled in we should be moving the
Hannes> 'dh_state' attribute to the generic code.

This patch conflicts with 23695e41a1ca ("scsi_dh: fix use-after-free
when removing scsi device").

Looked simple enough and I started to fix it up but then decided to let
you do since you'll have to check it anyway.

Please rebase on top of latest 4.5/scsi-queue (which has your VPD rescan
patch in place).

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v1 1/1] scsi_debug: check for bigger value first

2015-11-30 Thread Martin K. Petersen
>>>>> "Andy" == Andy Shevchenko <andriy.shevche...@linux.intel.com> writes:

Andy> Even for signed types we have to check for bigger positive value
Andy> first.  Otherwise it will be never happened.

Applied to 4.5/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] scsi: rescan VPD attributes

2015-11-30 Thread Martin K. Petersen
>>>>> "Hannes" == Hannes Reinecke <h...@suse.de> writes:

Hannes> The VPD page information might change, so we need to be able to
Hannes> update it. This patch implements a VPD page rescan whenever the
Hannes> 'rescan' sysfs attribute is triggered.

Applied to 4.5/scsi-queue.

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/4] bfa: Patches for scsi "misc" branch

2015-11-30 Thread Martin K. Petersen
>>>>> "Anil" ==   <anil.gurumur...@qlogic.com> writes:

Anil,

Anil> Re-sending the patches that were submitted earlier, but appear to
Anil> have fallen through the cracks. Addressed a comment regarding the
Anil> commit message as well.

Please add all existing review tags when you post an updated
series. Patches 1, 3 and 4 got reviewed by Johannes.

No need to resend, I'll try to remember this time (assuming patch 2 gets
reviewed soon-ish).

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/2] scsi_transport_fc: Introduce scsi_host_{get,put}()

2015-11-30 Thread Martin K. Petersen
>>>>> "Bart" == Bart Van Assche <bart.vanass...@sandisk.com> writes:

Bart,

Bart> Use scsi_host_{get,put}() instead of open-coding these functions.
Bart> Compile-tested only.

Do you want me to queue this as a general cleanup for 4.5 (independently
of the leak patch)?

-- 
Martin K. Petersen  Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


<    2   3   4   5   6   7   8   9   10   11   >