Re: [PATCH] target: fix crash in cmd tracing when cmd didn't match a LUN

2015-07-24 Thread Christoph Hellwig
On Fri, Jul 24, 2015 at 01:32:14PM -0700, Nicholas A. Bellinger wrote: > We've already been through this discussion a couple of years back when > target_submit_cmd() first came into existence. > > The reason iscsi/iser-target continues to be a special case is due to > immediate data vs. non immedi

Re: [PATCH] target: add support for START_STOP_UNIT SCSI opcode

2015-07-24 Thread Christoph Hellwig
On Fri, Jul 24, 2015 at 03:06:12AM +, Elliott, Robert (Server Storage) wrote: > Note that the officially published versions of the ISO and ANSI > standards don't carry that revision number r36; they just have > the standard name and year. SBC-3 revision 36 became > "ANSI INCITS 514-2014 Inf

Re: [PATCH] qla2xxx: Return the fabric command state for non-task management requests

2015-07-24 Thread Christoph Hellwig
Which debug printk do you care about? I'd much prefer having a trace point inside the driver which could even pretty print it instead of the hack where a driver defined binary value is printed by the core. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a me

Re: [PATCH 0/9] qla2xxx: Patches for scsi "misc" branch.

2015-07-24 Thread Nicholas A. Bellinger
On Fri, 2015-07-24 at 18:32 +, Himanshu Madhani wrote: > Hi Nic, > > > On 7/23/15, 11:45 PM, "Nicholas A. Bellinger" wrote: > > >On Thu, 2015-07-23 at 23:38 -0700, Nicholas A. Bellinger wrote: > >> Hi Himanshu & Co, > >> > >> (Adding target-devel CC') > >> > >> On Wed, 2015-06-10 at 11:0

Re: [PATCH 0/9] qla2xxx: Patches for scsi "misc" branch.

2015-07-24 Thread Nicholas A. Bellinger
On Fri, 2015-07-24 at 07:51 -0700, James Bottomley wrote: > On Thu, 2015-07-23 at 23:38 -0700, Nicholas A. Bellinger wrote: > > Hi Himanshu & Co, > > > > (Adding target-devel CC') > > > > On Wed, 2015-06-10 at 11:05 -0400, Himanshu Madhani wrote: > > > Hi James, > > > > > > Please apply the foll

Re: [PATCH] target: fix crash in cmd tracing when cmd didn't match a LUN

2015-07-24 Thread Nicholas A. Bellinger
On Fri, 2015-07-24 at 12:52 +0200, Christoph Hellwig wrote: > On Thu, Jul 23, 2015 at 03:19:32PM -0700, Spencer Baugh wrote: > > From: Alexei Potashnik > > > > If command didn't match a LUN and we're sending check condition, the > > target_cmd_complete ftrace point will crash because it assumes t

Re: [PATCH v2 3/3] cxlflash: Virtual LUN support

2015-07-24 Thread Brian King
On 07/16/2015 06:26 PM, Matthew R. Ochs wrote: > + > +/** > + * ba_clone() - frees a block from the block allocator > + * @ba_lun: Block allocator from which to allocate a block. > + * @to_free: Block to free. > + * > + * Return: 0 on success, -1 on failure > + */ > +static int ba_clone(struct ba_

Re: [PATCH 0/9] qla2xxx: Patches for scsi "misc" branch.

2015-07-24 Thread Himanshu Madhani
Hi Nic, James, On 7/24/15, 7:51 AM, "James Bottomley" wrote: >On Thu, 2015-07-23 at 23:38 -0700, Nicholas A. Bellinger wrote: >> Hi Himanshu & Co, >> >> (Adding target-devel CC') >> >> On Wed, 2015-06-10 at 11:05 -0400, Himanshu Madhani wrote: >> > Hi James, >> > >> > Please apply the follo

Re: [PATCH 0/9] qla2xxx: Patches for scsi "misc" branch.

2015-07-24 Thread Himanshu Madhani
Hi Nic, On 7/23/15, 11:45 PM, "Nicholas A. Bellinger" wrote: >On Thu, 2015-07-23 at 23:38 -0700, Nicholas A. Bellinger wrote: >> Hi Himanshu & Co, >> >> (Adding target-devel CC') >> >> On Wed, 2015-06-10 at 11:05 -0400, Himanshu Madhani wrote: >> > Hi James, > > > >> This series contains a n

Re: [PATCH 14/20] scsi_dh_alua: parse target device id

2015-07-24 Thread Martin K. Petersen
> "Christoph" == Christoph Hellwig writes: Christoph> Can you move this to scsi_mod.ko? I'll need the same code Christoph> for the NFS SCSI layout driver soon. Same here. Working on copy offload again. -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: s

Re: [PATCH 16/20] scsi_dh_alua: Use workqueue for RTPG

2015-07-24 Thread Christoph Hellwig
> + charwork_q_name[264]; create_workqueue and friends now accept printf-like format string, so there is no need for this temporary buffer. > + int error; > + struct completion init_complete; Please rename error to init_error and only ass

Re: [PATCH] USB: storage: add "no SYNCHRONIZE CACHE" quirk

2015-07-24 Thread Alan Stern
On Mon, 22 Jun 2015, James Bottomley wrote: > On Mon, 2015-06-22 at 13:48 -0400, Alan Stern wrote: > > On Mon, 22 Jun 2015, James Bottomley wrote: > > > > > On Mon, 2015-06-22 at 13:30 -0400, Alan Stern wrote: > > > > On Mon, 22 Jun 2015, James Bottomley wrote: > > > > > > > > > I'm not sure I e

Re: [PATCH 14/20] scsi_dh_alua: parse target device id

2015-07-24 Thread Christoph Hellwig
On Wed, Jul 08, 2015 at 11:06:12AM +0200, Hannes Reinecke wrote: > Parse VPD descriptor to figure out the device identification. > As devices might implement several descriptors the order > of preference is: > - NAA IEE Registered Extended > - EUI-64 based 16-byte > - EUI-64 based 12-byte > - NAA I

Re: [PATCH 13/20] scsi_dh_alua: simplify sense code handling

2015-07-24 Thread Christoph Hellwig
> + /* > + * Retry on ALUA state transition or if any > + * UNIT ATTENTION occurred. > + */ > + if (sense_hdr.sense_key == NOT_READY && > + sense_hdr.asc == 0x04 && sense_hdr.ascq == 0x0a) > + err = S

Re: [PATCH 12/20] scsi_dh_alua: allocate RTPG buffer separately

2015-07-24 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig -- 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 11/20] scsi_dh_alua: Use separate alua_port_group structure

2015-07-24 Thread Christoph Hellwig
On Wed, Jul 08, 2015 at 11:06:09AM +0200, Hannes Reinecke wrote: > + pg = kzalloc(sizeof(struct alua_port_group), GFP_KERNEL); > + if (!pg) { > + sdev_printk(KERN_WARNING, sdev, > + "%s: kzalloc port group failed\n", > + ALUA_DH_NA

Re: [PATCH 09/20] scsi_dh_alua: switch to scsi_execute()

2015-07-24 Thread Christoph Hellwig
Seems like this should use scsi_execute_req_flags instead so that it doesn't have to deal with the raw sense buffer. -- 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/majordom

Re: [PATCH 0/9] qla2xxx: Patches for scsi "misc" branch.

2015-07-24 Thread James Bottomley
On Thu, 2015-07-23 at 23:38 -0700, Nicholas A. Bellinger wrote: > Hi Himanshu & Co, > > (Adding target-devel CC') > > On Wed, 2015-06-10 at 11:05 -0400, Himanshu Madhani wrote: > > Hi James, > > > > Please apply the following patches to the scsi tree at your earliest > > convenience for inclusio

Re: [PATCH 08/20] scsi_dh_alua: Make stpg synchronous

2015-07-24 Thread Christoph Hellwig
> - memset(h->buff, 0, stpg_len); > - h->buff[4] = TPGS_STATE_OPTIMIZED & 0x0f; > - h->buff[6] = (h->group_id >> 8) & 0xff; > - h->buff[7] = h->group_id & 0xff; > + memset(stpg_data, 0, stpg_len); > + stpg_data[4] = TPGS_STATE_OPTIMIZED & 0x0f; > + put_unaligned_be16(gro

Re: [PATCH 07/20] scsi_dh_alua: Pass buffer as function argument

2015-07-24 Thread Christoph Hellwig
> - rq->cmd[6] = (h->bufflen >> 24) & 0xff; > - rq->cmd[7] = (h->bufflen >> 16) & 0xff; > - rq->cmd[8] = (h->bufflen >> 8) & 0xff; > - rq->cmd[9] = h->bufflen & 0xff; > + put_unaligned_be32(bufflen, &rq->cmd[6]); This is unrelated to the rest of the patch, can you split it out

Re: [PATCH 04/20] scsi_dh_alua: Improve error handling

2015-07-24 Thread Christoph Hellwig
This seems to be a bit of a catchall. Can you split the logging changes from actual error code logic changes and describe the latter in more detail? -- 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

Re: [PATCH 4/5] scsi_dh_alua: add 'state' callback function

2015-07-24 Thread Christoph Hellwig
As per the comment on patch 3 I'd rather expose the ALUA state in the core SCSI code. But having this alua_state attribute in core SCSI code sounds fine to me. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majord

Re: [PATCH 1/5] scsi: rescan VPD attributes

2015-07-24 Thread Christoph Hellwig
On Fri, Jul 24, 2015 at 04:40:42PM +0200, Hannes Reinecke wrote: > Yeah, possibly. After all, the variable isn't expected to change > under rcu_read_lock(). Actually it can and will change, that's the point. But if you use a local variable you keep a single version of it, which won't be freed unt

Re: [PATCH 1/5] scsi: rescan VPD attributes

2015-07-24 Thread Hannes Reinecke
On 07/24/2015 04:38 PM, Christoph Hellwig wrote: > On Wed, Jul 08, 2015 at 01:09:44PM +0200, Hannes Reinecke wrote: >> +++ b/drivers/scsi/device_handler/scsi_dh_alua.c >> @@ -264,8 +264,11 @@ static int alua_check_vpd(struct scsi_device *sdev, >> struct alua_dh_data *h) >> int device_id_size,

Re: [PATCH 1/5] scsi: rescan VPD attributes

2015-07-24 Thread Christoph Hellwig
On Wed, Jul 08, 2015 at 01:09:44PM +0200, Hannes Reinecke wrote: > +++ b/drivers/scsi/device_handler/scsi_dh_alua.c > @@ -264,8 +264,11 @@ static int alua_check_vpd(struct scsi_device *sdev, > struct alua_dh_data *h) > int device_id_size, device_id_type = 0; > struct alua_port_group *t

[Bug 101891] mvsas prep failed, NULL pointer dereference in mvs_slot_task_free+0x5/0x1f0 [mvsas]

2015-07-24 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=101891 --- Comment #2 from Dāvis --- (In reply to Dāvis from comment #0) > Got this call trace, it caused any attempts to access those disks hang > (couldn't even kill those processes, eg. ls). > Using HighPoint RocketRAID 2760A controller. > > kernel:

Re: [PATCH] target: fix crash in cmd tracing when cmd didn't match a LUN

2015-07-24 Thread Christoph Hellwig
On Thu, Jul 23, 2015 at 03:19:32PM -0700, Spencer Baugh wrote: > From: Alexei Potashnik > > If command didn't match a LUN and we're sending check condition, the > target_cmd_complete ftrace point will crash because it assumes that > cmd->t_task_cdb has been set. > > The fix will temporarily set

Re: [PATCH v2 0/8] qla2xxx: Updates for Target Mode driver

2015-07-24 Thread Nicholas A. Bellinger
On Tue, 2015-07-14 at 16:00 -0400, Himanshu Madhani wrote: > Hi James, > > This series is applied on top of patch series sent on June 10 >[PATCH 0/9] qla2xxx: Patches for scsi "misc" branch > (http://marc.info/?l=linux-scsi&m=143395156920505&w=2) > > These set of patches addresses issue with