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 = cm

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[s

[Bug 42969] Softlockup during boot during init_sd

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

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

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 arbitra

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

2012-09-04 Thread Steffen Maier
From: Steffen Maier 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 failures. Fix this by mak

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

2012-09-04 Thread Steffen Maier
From: Steffen Maier 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 2c55b750a884b86dea8b4cc5f15e1484cc47a25c "[SCSI] zfc

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

2012-09-04 Thread Steffen Maier
From: Steffen Maier 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 arbitrarily mixed with the restor

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

2012-09-04 Thread Steffen Maier
From: Martin Peschke __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 action. zfcp_erp_wait in zfcp_e

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

2012-09-04 Thread Steffen Maier
From: Steffen Maier 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 element pl[scount]. Do n

[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 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 port->adapter->scsi_ho

[PATCH 6/8] zfcp: restore refcount check on port_remove

2012-09-04 Thread Steffen Maier
From: Steffen Maier Upstream commit f3450c7b917201bb49d67032e9f60d5125675d6a "[SCSI] zfcp: Replace local reference counting with common kref" accidentally dropped a reference count check before tearing down zfcp_ports that are potentially in use by zfcp_units. Even remote ports in use can be remo

[PATCH 1/8] zfcp: Adapt to new FC_PORTSPEED semantics

2012-09-04 Thread Steffen Maier
From: Steffen Maier Commit a9277e7783651d4e0a849f7988340b1c1cf748a4 "[SCSI] scsi_transport_fc: Getting FC Port Speed in sync with FC-GS" changed the semantics of FC_PORTSPEED defines to FDMI port attributes of FC-HBA/SM-HBA which is different from the previous bit reversed Report Port Speed Capab

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 rea

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 arbitr

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 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: >> > [] scsi_remove_target+

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 > > ha

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

[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 Stern

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

2012-09-04 Thread Aaron Lu
From: Aaron Lu 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 reduce power consumpti

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

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

2012-09-04 Thread Aaron Lu
From: Aaron Lu 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 --- block/genhd.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/genhd.c b/block/genhd.c inde

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

2012-09-04 Thread Aaron Lu
From: Aaron Lu 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 opening the block device

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

2012-09-04 Thread Aaron Lu
From: Aaron Lu 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 --- drivers/ata/libata-acpi.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/drivers/ata/libata-acpi.c

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

2012-09-04 Thread Aaron Lu
From: Aaron Lu 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), create a sysfs ent

[PATCH v6 6/7] scsi: sr: use may_power_off

2012-09-04 Thread Aaron Lu
From: Aaron Lu With the introduction of may_power_off, when deciding if we can block events checking, may_power_off should be used. Signed-off-by: Aaron Lu --- drivers/scsi/sr.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index

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

2012-09-04 Thread Aaron Lu
From: Aaron Lu 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 --- drivers/ata/libata-acpi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --gi

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

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 i

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 vi

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

2012-09-04 Thread Paolo Bonzini
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, bool affinity) >> > { >> >spin_lock_init(&virtscsi_vq->vq_lock); >> >

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 virtqu

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 > > 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 > attac

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 > > 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_

[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 --- --- 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 @@ static int rdac_bus

[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 --- --- linux-3.6-rc1/drivers/scsi/device_handler/scsi_dh_rdac.c.orig 2012-09-04 11:55:54.0 -0500 +++ linux-3.6-rc1/driver

[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 --- --- linux-3.6-rc1/drivers/scsi/device_handler/scsi_dh_rdac.c.orig 2012-09-

[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 --- --- 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:

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 > > > > 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 AC

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

2012-09-04 Thread Oliver Neukum
On Tuesday 04 September 2012 13:59:38 Alan Stern wrote: > On Tue, 4 Sep 2012, Oliver Neukum wrote: > > > On Tuesday 04 September 2012 22:24:34 Aaron Lu wrote: > > > From: Aaron Lu > > > > > > The ODD will be placed into suspend state when: > > > 1 For tray type ODD, no media inside and door clos

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 data

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;

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 wrote: > On Wed, Aug 29, 2012 at 10:59 AM, Dan Williams 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

[PATCH] [SCSI] bfa: use list_move_tail instead of list_del/list_add_tail

2012-09-04 Thread Wei Yongjun
From: Wei Yongjun Using list_move_tail() instead of list_del() + list_add_tail(). spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- drivers/scsi/bfa/bfa_ioc.c | 3 +-- drivers/scsi/bfa/bfa_fcpim.c | 37 +--

[PATCH] target: use list_move_tail instead of list_del/list_add_tail

2012-09-04 Thread Wei Yongjun
From: Wei Yongjun Using list_move_tail() instead of list_del() + list_add_tail(). spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- drivers/target/sbp/sbp_target.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) di

[PATCH] [SCSI] lpfc 8.3.32: use list_move_tail instead of list_del/list_add_tail

2012-09-04 Thread Wei Yongjun
From: Wei Yongjun Using list_move_tail() instead of list_del() + list_add_tail(). spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun --- drivers/scsi/lpfc/lpfc_sli.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff