Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Paolo Bonzini
Il 04/09/2012 04:21, Nicholas A. Bellinger ha scritto: @@ -112,6 +118,9 @@ static void virtscsi_complete_cmd(struct virtio_scsi *vscsi, void *buf) struct virtio_scsi_cmd *cmd = buf; struct scsi_cmnd *sc = cmd-sc; struct virtio_scsi_cmd_resp *resp = cmd-resp.cmd; +struct

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Michael S. Tsirkin
On Tue, Sep 04, 2012 at 08:46:12AM +0200, Paolo Bonzini wrote: Il 04/09/2012 04:21, Nicholas A. Bellinger ha scritto: @@ -112,6 +118,9 @@ static void virtscsi_complete_cmd(struct virtio_scsi *vscsi, void *buf) struct virtio_scsi_cmd *cmd = buf; struct scsi_cmnd *sc = cmd-sc;

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Paolo Bonzini
Il 04/09/2012 10:46, Michael S. Tsirkin ha scritto: +static int virtscsi_queuecommand_multi(struct Scsi_Host *sh, + struct scsi_cmnd *sc) +{ + struct virtio_scsi *vscsi = shost_priv(sh); + struct virtio_scsi_target_state *tgt = vscsi-tgt[sc-device-id]; +

[Bug 42969] Softlockup during boot during init_sd

2012-09-04 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=42969 Alan a...@lxorguk.ukuu.org.uk changed: What|Removed |Added CC||a...@lxorguk.ukuu.org.uk

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Michael S. Tsirkin
On Tue, Sep 04, 2012 at 12:25:03PM +0200, Paolo Bonzini wrote: Il 04/09/2012 10:46, Michael S. Tsirkin ha scritto: +static int virtscsi_queuecommand_multi(struct Scsi_Host *sh, + struct scsi_cmnd *sc) +{ +struct virtio_scsi *vscsi =

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Paolo Bonzini
Il 04/09/2012 13:09, Michael S. Tsirkin ha scritto: queuecommand on CPU #0 queuecommand #2 on CPU #1 -- atomic_inc_return(...) == 1 atomic_inc_return(...) == 2

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Michael S. Tsirkin
On Tue, Aug 28, 2012 at 01:54:17PM +0200, Paolo Bonzini wrote: This patch adds queue steering to virtio-scsi. When a target is sent multiple requests, we always drive them to the same queue so that FIFO processing order is kept. However, if a target was idle, we can choose a queue

[PATCH 7/8] zfcp: No automatic port_rescan on events

2012-09-04 Thread Steffen Maier
From: Steffen Maier ma...@linux.vnet.ibm.com In FC fabrics with large zones, the automatic port_rescan on incoming ELS and any adapter recovery can cause quite some traffic at the very same time, especially if lots of Linux images share an HBA, which is common on s390. This can cause trouble and

[PATCH 2/8] zfcp: Make trace record tags unique

2012-09-04 Thread Steffen Maier
From: Steffen Maier ma...@linux.vnet.ibm.com Duplicate fssrh_2 from a54ca0f62f953898b05549391ac2a8a4dad6482b [SCSI] zfcp: Redesign of the debug tracing for HBA records. complicates distinction of generic status read response from local link up. Duplicate fsscth1 from

[PATCH 4/8] zfcp: Do not wakeup while suspended

2012-09-04 Thread Steffen Maier
From: Steffen Maier ma...@linux.vnet.ibm.com If the mapping of FCP device bus ID and corresponding subchannel is modified while the Linux image is suspended, the resume of FCP devices can fail. During resume, zfcp gets callbacks from cio regarding the modified subchannels but they can be

[PATCH 8/8] zfcp: only access zfcp_scsi_dev for valid scsi_device

2012-09-04 Thread Steffen Maier
From: Martin Peschke mpesc...@linux.vnet.ibm.com __scsi_remove_device (e.g. due to dev_loss_tmo) calls zfcp_scsi_slave_destroy which in turn sends a close LUN FSF request to the adapter. After 30 seconds without response, zfcp_erp_timeout_handler kicks the ERP thread failing the close LUN ERP

[PATCH 3/8] zfcp: Bounds checking for deferred error trace

2012-09-04 Thread Steffen Maier
From: Steffen Maier ma...@linux.vnet.ibm.com The pl vector has scount elements, i.e. pl[scount-1] is the last valid element. For maximum sized requests, payload-counter == scount after the last loop iteration. Therefore, do bounds checking first (with boolean shortcut) to not access the invalid

[PATCH 0/8] zfcp: patches for 3.6-rc

2012-09-04 Thread Steffen Maier
James, here is a series of zfcp fixes for the current 3.6-rc. The patches apply on top of the current fixes branch of your scsi.git. Steffen Linux on System z Development IBM Deutschland Research Development GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschaeftsfuehrung: Dirk Wittkopp

[PATCH 5/8] zfcp: remove invalid reference to list iterator variable

2012-09-04 Thread Steffen Maier
From: Julia Lawall julia.law...@lip6.fr If list_for_each_entry, etc complete a traversal of the list, the iterator variable ends up pointing to an address at an offset from the list head, and not a meaningful structure. Thus this value should not be used after the end of the iterator. Replace

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Michael S. Tsirkin
On Tue, Sep 04, 2012 at 01:18:31PM +0200, Paolo Bonzini wrote: Il 04/09/2012 13:09, Michael S. Tsirkin ha scritto: queuecommand on CPU #0 queuecommand #2 on CPU #1 -- atomic_inc_return(...) == 1

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Paolo Bonzini
Il 04/09/2012 15:35, Michael S. Tsirkin ha scritto: I see. I guess you can rewrite this as: atomic_inc if (atomic_read() == 1) which is a bit cheaper, and make the fact that you do not need increment and return to be atomic, explicit. It seems more complicated to me for hardly any reason.

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Paolo Bonzini
Il 04/09/2012 14:48, Michael S. Tsirkin ha scritto: This patch adds queue steering to virtio-scsi. When a target is sent multiple requests, we always drive them to the same queue so that FIFO processing order is kept. However, if a target was idle, we can choose a queue arbitrarily. In

Re: [resend PATCH] scsi_remove_target: fix softlockup regression on hot remove

2012-09-04 Thread John Drescher
On Wed, Aug 29, 2012 at 10:59 AM, Dan Williams d...@fb.com wrote: On Wed, 2012-08-29 at 06:50 +, Bart Van Assche wrote: On 08/29/12 05:12, Dan Williams wrote: John reports: BUG: soft lockup - CPU#2 stuck for 23s! [kworker/u:8:2202] [..] Call Trace: [8141782a]

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Michael S. Tsirkin
On Tue, Sep 04, 2012 at 03:45:57PM +0200, Paolo Bonzini wrote: Also - some kind of comment explaining why a similar race can not happen with this lock in place would be nice: I see why this specific race can not trigger but since lock is dropped later before you submit command, I have hard

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Michael S. Tsirkin
On Tue, Sep 04, 2012 at 03:49:42PM +0200, Paolo Bonzini wrote: Il 04/09/2012 14:48, Michael S. Tsirkin ha scritto: This patch adds queue steering to virtio-scsi. When a target is sent multiple requests, we always drive them to the same queue so that FIFO processing order is kept.

[PATCH v6 0/7] ZPODD patches

2012-09-04 Thread Aaron Lu
v6: When user changes may_power_off flag through sysfs entry and if device is already runtime suspended, resume resume it so that it can respect this flag next time it is runtime suspended as suggested by Alan Stern. Call scsi_autopm_get/put_device once in sr_check_events as suggested by Alan

[PATCH v6 1/7] scsi: sr: support runtime pm for ODD

2012-09-04 Thread Aaron Lu
From: Aaron Lu aaron...@intel.com The ODD will be placed into suspend state when: 1 For tray type ODD, no media inside and door closed; 2 For slot type ODD, no media inside; And together with ACPI, when we suspend the ODD's parent(the port it attached to), we will omit the power altogether to

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Paolo Bonzini
Il 04/09/2012 16:19, Michael S. Tsirkin ha scritto: Also - some kind of comment explaining why a similar race can not happen with this lock in place would be nice: I see why this specific race can not trigger but since lock is dropped later before you submit command, I have hard time

[PATCH v6 2/7] block: genhd: export disk_(un)block_events

2012-09-04 Thread Aaron Lu
From: Aaron Lu aaron...@intel.com When ODD is runtime powered off, there is no meaning to check events for it, so disk_(un)block_events will be called in its suspend/resume callback. Signed-off-by: Aaron Lu aaron...@intel.com --- block/genhd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH v6 3/7] scsi: sr: block events checking when suspended for zpodd

2012-09-04 Thread Aaron Lu
From: Aaron Lu aaron...@intel.com When ODD is runtime suspended and if it can be powered off(reflected by the can_power_off flag), we will block events checking for it so that it can stay in powered off state until resumed by: 1 user pressing the eject button or inserting a disc; 2 software

[PATCH v6 4/7] libata: acpi: set can_power_off for both ODD and HD

2012-09-04 Thread Aaron Lu
From: Aaron Lu aaron...@intel.com Hard disk may also be runtime powered off, so set can_power_off flag for it too if condition satisfies. Signed-off-by: Aaron Lu aaron...@intel.com --- drivers/ata/libata-acpi.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-)

[PATCH v6 5/7] scsi: pm: add may_power_off flag

2012-09-04 Thread Aaron Lu
From: Aaron Lu aaron...@intel.com Add a new flag may_power_off for scsi device, it gives the user a chance to control when the device is runtime suspended, can we remove its power if possible. And if the device can be powered off(reflected by can_power_off flag, determined by individual driver),

[PATCH v6 7/7] libata: acpi: respect may_power_off flag

2012-09-04 Thread Aaron Lu
From: Aaron Lu aaron...@intel.com If user does not want the device being powered off when runtime suspended by setting may_power_off flag to 0, we will not choose D3 cold ACPI D-State for it. Signed-off-by: Aaron Lu aaron...@intel.com --- drivers/ata/libata-acpi.c | 4 +++- 1 file changed, 3

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Paolo Bonzini
Il 04/09/2012 16:21, Michael S. Tsirkin ha scritto: One reason is that, even though in practice I expect roughly the same number of targets and VCPUs, hotplug means the number of targets is difficult to predict and is usually fixed to 256. The other reason is that per-target vq didn't

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Michael S. Tsirkin
On Tue, Sep 04, 2012 at 04:30:35PM +0200, Paolo Bonzini wrote: Il 04/09/2012 16:21, Michael S. Tsirkin ha scritto: One reason is that, even though in practice I expect roughly the same number of targets and VCPUs, hotplug means the number of targets is difficult to predict and is usually

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Michael S. Tsirkin
On Tue, Aug 28, 2012 at 01:54:17PM +0200, Paolo Bonzini wrote: @@ -575,15 +630,19 @@ static struct scsi_host_template virtscsi_host_template = { __val, sizeof(__val)); \ }) + Pls don't add empty lines. static void virtscsi_init_vq(struct

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Michael S. Tsirkin
On Tue, Sep 04, 2012 at 04:55:56PM +0200, Paolo Bonzini wrote: Il 04/09/2012 16:47, Michael S. Tsirkin ha scritto: static void virtscsi_init_vq(struct virtio_scsi_vq *virtscsi_vq, - struct virtqueue *vq) + struct virtqueue *vq,

Re: [PATCH v6 1/7] scsi: sr: support runtime pm for ODD

2012-09-04 Thread Oliver Neukum
On Tuesday 04 September 2012 22:24:34 Aaron Lu wrote: From: Aaron Lu aaron...@intel.com The ODD will be placed into suspend state when: 1 For tray type ODD, no media inside and door closed; 2 For slot type ODD, no media inside; And together with ACPI, when we suspend the ODD's parent(the

Re: [PATCH v6 5/7] scsi: pm: add may_power_off flag

2012-09-04 Thread Oliver Neukum
On Tuesday 04 September 2012 22:24:38 Aaron Lu wrote: From: Aaron Lu aaron...@intel.com Add a new flag may_power_off for scsi device, it gives the user a chance to control when the device is runtime suspended, can we remove its power if possible. And if the device can be powered

[PATCH 1/2] scsi_dh_rdac : minor return fix for rdac

2012-09-04 Thread Moger, Babu
Minor return fix. Signed-off-by: Babu Moger babu.mo...@netapp.com --- --- linux-3.6-rc1/drivers/scsi/device_handler/scsi_dh_rdac.c.orig 2012-09-04 12:13:40.0 -0500 +++ linux-3.6-rc1/drivers/scsi/device_handler/scsi_dh_rdac.c2012-09-04 12:15:26.0 -0500 @@ -863,7 +863,7

[PATCH 1/2] scsi_dh_rdac : Add a new netapp vendor/product string

2012-09-04 Thread Moger, Babu
This patch adds a new vendor/product strings for netapp E series product. Also consolidated the strings together with similar names. Signed-off-by: Babu Moger babu.mo...@netapp.com --- --- linux-3.6-rc1/drivers/scsi/device_handler/scsi_dh_rdac.c.orig 2012-09-04 11:55:54.0 -0500

[PATCH 2/2] scsi_dh_rdac : Consolidate rdac strings together

2012-09-04 Thread Moger, Babu
This patch consolidates the strings together. Purpose is to remove minor product strings extensions. That way the future products with similar strings should not require change here. Signed-off-by: Babu Moger babu.mo...@netapp.com --- ---

[PATCH] scsi_dh_rdac : minor return fix for rdac

2012-09-04 Thread Moger, Babu
Resending with correct subject line. This is patch 1/1. Minor return fix. Signed-off-by: Babu Moger babu.mo...@netapp.com --- --- linux-3.6-rc1/drivers/scsi/device_handler/scsi_dh_rdac.c.orig 2012-09-04 12:13:40.0 -0500 +++ linux-3.6-rc1/drivers/scsi/device_handler/scsi_dh_rdac.c

Re: [PATCH v6 1/7] scsi: sr: support runtime pm for ODD

2012-09-04 Thread Alan Stern
On Tue, 4 Sep 2012, Oliver Neukum wrote: On Tuesday 04 September 2012 22:24:34 Aaron Lu wrote: From: Aaron Lu aaron...@intel.com The ODD will be placed into suspend state when: 1 For tray type ODD, no media inside and door closed; 2 For slot type ODD, no media inside; And together

continuous 'Test WP failed, assume Write Enabled' errors

2012-09-04 Thread Marcin Nowakowski
Hi, That's something that has been bothering me for a while but I hadn't got to writing a question about it ... I can see a stream of the following errors on my desktop [233755.873770] sd 6:0:0:3: [sde] Test WP failed, assume Write Enabled [233755.886450] sd 6:0:0:3: [sde] Asking for cache

Re: [PATCH 5/5] virtio-scsi: introduce multiqueue support

2012-09-04 Thread Nicholas A. Bellinger
On Tue, 2012-09-04 at 08:46 +0200, Paolo Bonzini wrote: Il 04/09/2012 04:21, Nicholas A. Bellinger ha scritto: @@ -112,6 +118,9 @@ static void virtscsi_complete_cmd(struct virtio_scsi *vscsi, void *buf) struct virtio_scsi_cmd *cmd = buf; struct scsi_cmnd *sc = cmd-sc; struct

Re: [resend PATCH] scsi_remove_target: fix softlockup regression on hot remove

2012-09-04 Thread Dan Williams
On Tue, Sep 4, 2012 at 7:02 AM, John Drescher dresche...@gmail.com wrote: On Wed, Aug 29, 2012 at 10:59 AM, Dan Williams d...@fb.com wrote: On Wed, 2012-08-29 at 06:50 +, Bart Van Assche wrote: On 08/29/12 05:12, Dan Williams wrote: John reports: BUG: soft lockup - CPU#2 stuck for 23s!