scsi:sd: provisioning_mode not being set to unmap

2012-10-26 Thread John Washer
Hi, Provisioning mode is not being set to "unmap" even though it seems that device firmware provides all the required information to SD. 1. The TPE bit is set in the Read Capacity 16 response, $ sudo sg_readcap --16 -H /dev/sg1 00 00 00 00 00 00 ff ff ff 00 00 10 00 00 01 80 00 10 00

RE: tcm_fc+ libfcoe regression on v3.7-rc2

2012-10-26 Thread Nicholas A. Bellinger
On Fri, 2012-10-26 at 23:59 +, Zou, Yi wrote: > > > > Hi MDR, Robert & Co, > > > > During the process of updating target-pending.git/master to v3.7-rc2 > > this afternoon, I noticed the following warnings below when using > > tcm_fc. > > > > The Poison overwritten appears during each I/O, bu

target-pending updated to v3.7-rc2

2012-10-26 Thread Nicholas A. Bellinger
Hi folks, This is a just friendly heads up that target-pending has been updated to latest v3.7-rc2 mainline code. As usual, the for-next* branches have been recreated from master and include in-flight target development patches destined for upstream during the v3.8 merge window. Also, a heads up

RE: tcm_fc+ libfcoe regression on v3.7-rc2

2012-10-26 Thread Zou, Yi
> > Hi MDR, Robert & Co, > > During the process of updating target-pending.git/master to v3.7-rc2 > this afternoon, I noticed the following warnings below when using > tcm_fc. > > The Poison overwritten appears during each I/O, but the LUN SCAN + I/O > are seem to be still working as expected..

tcm_fc+ libfcoe regression on v3.7-rc2

2012-10-26 Thread Nicholas A. Bellinger
Hi MDR, Robert & Co, During the process of updating target-pending.git/master to v3.7-rc2 this afternoon, I noticed the following warnings below when using tcm_fc. The Poison overwritten appears during each I/O, but the LUN SCAN + I/O are seem to be still working as expected.. AFAICT there has n

[PATCH] [trivial] qla2xxx: Fix typo in qla2xxx drivers

2012-10-26 Thread Masanari Iida
Correct spelling typo in debug messages within qla2xxx drivers. Signed-off-by: Masanari Iida --- drivers/scsi/qla2xxx/qla_iocb.c| 2 +- drivers/scsi/qla2xxx/qla_isr.c | 4 ++-- drivers/scsi/qla2xxx/qla_mid.c | 2 +- drivers/scsi/qla2xxx/qla_nx.c | 6 +++--- drivers/scsi/qla2

[PATCH 16/19] srp_transport: Add transport layer error handling

2012-10-26 Thread Bart Van Assche
Add the necessary functions in the SRP transport module to allow an SRP initiator driver to implement transport error handling. This includes: - Support for implementing fast_io_fail_tmo, the time that should elapse after having detected a transport layer problem and before failing I/O. - Suppo

[PATCH 14/19] ib_srp: Allow SRP disconnect through sysfs

2012-10-26 Thread Bart Van Assche
Make it possible to disconnect the IB RC connection used by the SRP protocol to communicate with a target. Let the SRP transport layer create a sysfs "delete" attribute for initiator drivers that support this functionality. Cc: David Dillow Cc: Roland Dreier Cc: FUJITA Tomonori Cc: Robert Jenn

[PATCH 13/19] srp_transport: Document sysfs attributes

2012-10-26 Thread Bart Van Assche
Cc: FUJITA Tomonori Cc: Robert Jennings Cc: David Dillow Cc: Roland Dreier Signed-off-by: Bart Van Assche --- Documentation/ABI/stable/sysfs-transport-srp | 12 1 file changed, 12 insertions(+) create mode 100644 Documentation/ABI/stable/sysfs-transport-srp diff --git a/Docum

[PATCH 12/19] srp_transport: Simplify attribute initialization code

2012-10-26 Thread Bart Van Assche
Eliminate the private_rport_attrs[] array and the SETUP_*() macros used to set up that array since the information in that array duplicates the information in the static device attributes. Also, verify whether SRP_RPORT_ATTRS is large enough since it is easy to forget to update that macro when addi

[PATCH 11/19] srp_transport: Fix attribute registration

2012-10-26 Thread Bart Van Assche
Register transport attributes after the attribute array has been set up instead of before. The current code can trigger a race condition because the code reading the attribute array can run on another thread than the code that initialized that array. Make sure that any code reading the attribute ar

[PATCH 00/19, v5] Make ib_srp better suited for H.A. purposes

2012-10-26 Thread Bart Van Assche
This patch series makes the ib_srp driver better suited for use in a H.A. setup because: - multipathd is notified faster about transport layer failures. - Transport layer failures reliably result in SCSI host removal. - Switchover can be triggered explicitly by deleting an initiator device. - Di

[PATCH 7/7] Remove get_device() / put_device() pair from scsi_request_fn()

2012-10-26 Thread Bart Van Assche
Since all scsi_request_fn() callers hold a reference on the SCSI device that function is invoked for and since blk_cleanup_queue() waits until scsi_request_fn() has finished it is safe to remove the get_device() / put_device() pair from scsi_request_fn(). Cc: James Bottomley Cc: Mike Christie Cc

[PATCH 6/7] Fix race between starved list processing and device removal

2012-10-26 Thread Bart Van Assche
The SCSI core maintains a "starved list" per SCSI host. This is a list of devices for which one or more requests have been queued but that have not yet been passed to the SCSI LLD. The function scsi_run_queue() examines all SCSI devices on the starved list. Since scsi_remove_device() can be invoked

[PATCH 5/7] block: Make blk_cleanup_queue() wait until request_fn finished

2012-10-26 Thread Bart Van Assche
Some request_fn implementations, e.g. scsi_request_fn(), unlock the queue lock. Make sure that blk_cleanup_queue() waits until all active request_fn invocations have finished. A block driver may start cleaning up resources needed by its request_fn as soon as blk_cleanup_queue() finished, so blk_cle

[PATCH 4/7] block: Avoid that request_fn is invoked on a dead queue

2012-10-26 Thread Bart Van Assche
A block driver may start cleaning up resources needed by its request_fn as soon as blk_cleanup_queue() finished, so request_fn must not be invoked after draining finished. Cc: James Bottomley Cc: Mike Christie Cc: Jens Axboe Cc: Tejun Heo Cc: Chanho Min Signed-off-by: Bart Van Assche --- bl

[PATCH 3/7] block: Rename queue dead flag

2012-10-26 Thread Bart Van Assche
QUEUE_FLAG_DEAD is used to indicate that queuing new requests must stop. After this flag has been set queue draining starts. However, during the queue draining phase it is still safe to invoke the queue's request_fn, so QUEUE_FLAG_DYING is a better name for this flag. This patch has been generated

[PATCH 2/7] block: Let blk_drain_queue() caller obtain the queue lock

2012-10-26 Thread Bart Van Assche
Let the caller of blk_drain_queue() obtain the queue lock to improve readability of the patch called "Avoid that request_fn is invoked on a dead queue". Cc: James Bottomley Cc: Mike Christie Cc: Jens Axboe Cc: Tejun Heo Cc: Chanho Min Signed-off-by: Bart Van Assche --- block/blk-core.c |

[PATCH 1/7] block: Avoid that blk_drain_queue() finishes early

2012-10-26 Thread Bart Van Assche
Code like "drain |= q->nr_rqs[i]" might result in blk_drain_queue() to finish early if the expression at the RHS is a multiple of 256 since the drain variable is only eight bits wide. Avoid this by changing the type of the drain variable from bool into unsigned. Cc: James Bottomley Cc: Mike Chris

[PATCH 0/7 v5] More device removal fixes

2012-10-26 Thread Bart Van Assche
Fix a few race conditions that can be triggered by removing a device: - Avoid that request_fn() can be invoked on a dead queue. - Avoid that blk_cleanup_queue() can finish while request_fn is still running. - Fix a race between starved list processing and device removal. These patches have been