Re: [PATCH v2 1/1] block: blk-merge: don't merge the pages with non-contiguous descriptors

2013-01-15 Thread Subhash Jadavani
On 1/15/2013 9:49 PM, James Bottomley wrote: On Tue, 2013-01-15 at 21:31 +0530, Subhash Jadavani wrote: blk_rq_map_sg() function merges the physically contiguous pages to use same scatter-gather node without checking if their page descriptors are contiguous or not. Now when dma_map_sg() is call

Re: [PATCH 2/2] virtio-scsi: reset virtqueue affinity when doing cpu hotplug

2013-01-15 Thread Wanlong Gao
On 01/16/2013 11:31 AM, Rusty Russell wrote: > Wanlong Gao writes: >> Add hot cpu notifier to reset the request virtqueue affinity >> when doing cpu hotplug. > > You need to be careful to get_online_cpus() and put_online_cpus() here, > so CPUs can't go up and down in the middle of operations. >

Re: [PATCH 2/2] virtio-scsi: reset virtqueue affinity when doing cpu hotplug

2013-01-15 Thread Rusty Russell
Wanlong Gao writes: > Add hot cpu notifier to reset the request virtqueue affinity > when doing cpu hotplug. You need to be careful to get_online_cpus() and put_online_cpus() here, so CPUs can't go up and down in the middle of operations. In particular, get_online_cpus()/put_online_cpus() around

[GIT PULL] target fixes for v3.8-rc4

2013-01-15 Thread Nicholas A. Bellinger
Hi Linus, The following are the target pending fixes headed into v3.8-rc4. Please go ahead and pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git master This includes an important >= v3.6 regression bugfix for active I/O shutdown (Roland), some TMR related failure

Re: [PATCH v2 1/1] block: blk-merge: don't merge the pages with non-contiguous descriptors

2013-01-15 Thread James Bottomley
On Tue, 2013-01-15 at 21:31 +0530, Subhash Jadavani wrote: > blk_rq_map_sg() function merges the physically contiguous pages to use same > scatter-gather node without checking if their page descriptors are > contiguous or not. > > Now when dma_map_sg() is called on the scatter gather list, it woul

[PATCH v2 1/1] block: blk-merge: don't merge the pages with non-contiguous descriptors

2013-01-15 Thread Subhash Jadavani
blk_rq_map_sg() function merges the physically contiguous pages to use same scatter-gather node without checking if their page descriptors are contiguous or not. Now when dma_map_sg() is called on the scatter gather list, it would take the base page pointer from each node (one by one) and iterates

[PATCH] scsi_transport_fc: Make 'port_state' writeable

2013-01-15 Thread Hannes Reinecke
Multipath might detect a path down even though the LLDD hasn't registered a link down event. This patch makes the 'port_state' FC attribute writeable to enforce a link down scenario in these cases, allowing for a fast failover to the remaining ports. Cc: Chad Dupuis Cc: Andrew Vasquez Cc: James

[PATCH 2/2] virtio-scsi: reset virtqueue affinity when doing cpu hotplug

2013-01-15 Thread Wanlong Gao
Add hot cpu notifier to reset the request virtqueue affinity when doing cpu hotplug. Signed-off-by: Wanlong Gao --- drivers/scsi/virtio_scsi.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index 16b0ef

[PATCH 1/2] virtio-scsi: split out request queue set affinity function

2013-01-15 Thread Wanlong Gao
These two patches are based on the multi-queue virtio-scsi patch set. We set cpu affinity when the num_queues equals to the number of VCPUs. Split out the set affinity function, this also fix the bug when CPU IDs are not consecutive. Signed-off-by: Wanlong Gao --- drivers/scsi/virtio_scsi.c | 5

[PATCH v13 3/9] libata: move acpi notification code to zpodd

2013-01-15 Thread Aaron Lu
Since the ata acpi notification code introduced in commit 3bd46600a7a7e938c54df8cdbac9910668c7dfb0 is solely for ZPODD, and we now have a dedicated place for it, move these code there. And the ata_acpi_add_pm_notifier code is changed a little bit in that it is now invoked when scsi device is not b

[PATCH v13 4/9] libata: check zero power ready status for ZPODD

2013-01-15 Thread Aaron Lu
Per the Mount Fuji spec, the ODD is considered zero power ready when: - For slot type ODD, no media inside; - For tray type ODD, no media inside and tray closed. The information can be retrieved by either the returned information of command GET_EVENT_STATUS_NOTIFICATION(the command is used to

[PATCH v13 7/9] libata: scsi: no poll when ODD is powered off

2013-01-15 Thread Aaron Lu
When the ODD is powered off, any action the user did to the ODD that would generate a media event will trigger an ACPI interrupt, so the poll for media event is no longer necessary. And the poll will also cause a runtime status change, which will stop the ODD from staying in powered off state, so t

[PATCH v13 6/9] libata: expose pm qos flags for ata device

2013-01-15 Thread Aaron Lu
Expose pm qos flags to user space so that user has a chance to disable ZPODD feature, if he/she has a broken platform or devices or simply does not like this feature. This flag is exposed to user space only for ZPODD devices. Due to this flag, it is possible the ODD is ZP ready but we didn't powe

[PATCH v13 9/9] scsi: remove can_power_off flag from scsi_device

2013-01-15 Thread Aaron Lu
Commit 166a2967b45ede2e2e56f3ede3cd32053dc17812 "libata: tell scsi layer device supports runtime power off" introduced the can_power_off flag for scsi_device and is used to support ZPODD implementation in SCSI layer. Since ZPODD is now implemented in ATA layer, that flag is no longer needed, so rem

[PATCH v13 1/9] scsi: sr: support runtime pm

2013-01-15 Thread Aaron Lu
This patch adds runtime pm support for sr. It did this by increasing the runtime usage_count of the device when: - its block device is opened; - the events checking is to run. And decreasing the runtime usage_count of the device when: - its block device is closed; - After the events checking is d

[PATCH v13 5/9] libata: handle power transition of ODD

2013-01-15 Thread Aaron Lu
When ata port is runtime suspended, it will check if the ODD attched to it is a zero power(ZP) capable ODD and if the ZP capable ODD is in zero power ready state. And if this is not the case, the highest acpi state will be limited to ACPI_STATE_D3_HOT to avoid powering off the ODD. And if the ODD c

[PATCH v13 8/9] libata: do not suspend port if normal ODD is attached

2013-01-15 Thread Aaron Lu
For ODDs, the upper layer will poll for media change every few seconds, which will make it enter and leave suspend state very often. And as each suspend will also cause a hard/soft reset, the gain of runtime suspend is very little while the ODD may malfunction after constantly being reset. So the i

[PATCH v13 2/9] libata: identify and init ZPODD devices

2013-01-15 Thread Aaron Lu
The ODD can be enabled for ZPODD if the following three conditions are satisfied: 1 The ODD supports device attention; 2 The platform can runtime power off the ODD through ACPI; 3 The ODD is either slot type or drawer type. For such ODDs, zpodd_init is called and a new structure is allocated for it

[PATCH v13 0/9] ZPODD Patches

2013-01-15 Thread Aaron Lu
v13: Use atomic type for disk_events_disable_depth, so that disabling can stack and has its own synchronization rule as suggested by Tejun Heo; Set zp_ready to false whenever we found the ODD is not in ZP ready state due to support of NO_POWEROFF qos flag. This change is made in patch 6 instead of