Re: [PATCHv3 0/6] Support 64-bit LUNs

2014-06-02 Thread Christoph Hellwig
Do we have any good testcases for this, especially the scsilun_to_int change? Can we export big enough luns from the target core or scsi_debug? If not I'd really like to see that support to ease testing. -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a

Re: [ANNOUNCE] scsi patch queue tree

2014-06-02 Thread Christoph Hellwig
On Mon, Jun 02, 2014 at 11:25:00AM +0300, Boaz Harrosh wrote: Hi Christoph Could you please add this very trivial patch for this merge window? http://www.spinics.net/lists/linux-scsi/msg74774.html my hack here: http://www.spinics.net/lists/linux-scsi/msg74775.html Looks more like an ack

Re: [PATCH] fc: ensure scan_work isn't active when freeing fc_rport

2014-06-02 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig h...@lst.de -- 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 3/3] scsi: Implement 'ZBC' device type

2014-06-02 Thread Christoph Hellwig
On Mon, Jun 02, 2014 at 09:01:18AM +0200, Hannes Reinecke wrote: ZBC (zoned block command aka 'SMR drives') devices will have a new device type 0x14 assigned by T10. So add the necessary mappings to sd.c and make it an alias for ATA ZAC devices. The libata changes should defintively be a

Re: [PATCH 1/3] libata: consolidate ata_dev_classify()

2014-06-02 Thread Christoph Hellwig
either, but this looks cleaner to me anyway, so: Reviewed-by: Christoph Hellwig h...@lst.de But you really need to run libata changes past the linux-ide list and not just the scsi list. -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord

Re: [PATCH 2/3] libata: Implement ATA_DEV_ZAC

2014-06-02 Thread Christoph Hellwig
This also need to be run past the libata maintainers and the linux-ide list.. + if ((lbam == 0xcd) (lbah == 0xab)) { The inner braces here aren't needed. -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More

Re: [PATCH 3/3] scsi: Implement 'ZBC' device type

2014-06-02 Thread Christoph Hellwig
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index e02b3aa..0788213 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c @@ -819,6 +819,7 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result, case TYPE_COMM: case

Re: [PATCH 3/3] scsi: Implement 'ZBC' device type

2014-06-02 Thread Christoph Hellwig
On Mon, Jun 02, 2014 at 10:46:35AM +0200, Hannes Reinecke wrote: But I'm uneasy with adding anything like this for now, for one the specs aren't even anywhere close to done, and second attaching ZBC devices in general doesn't sound like a very smart idea, we really need a strategy for the

Re: [PATCH 2 08/24] hpsa: choose number of reply queues more intelligently.

2014-06-02 Thread Christoph Hellwig
On Thu, May 29, 2014 at 10:53:02AM -0500, Stephen M. Cameron wrote: From: Stephen M. Cameron scame...@beardog.cce.hp.com No sense having 8 or 16 reply queues if you only have 4 cpus, and likewise no sense limiting to 8 reply queues if you have many more cpus. I've applied this as it looks

Re: [next:master 9537/10000] drivers/scsi/be2iscsi/be_mgmt.c:182:21: sparse: incorrect type in assignment (different base types)

2014-06-02 Thread Christoph Hellwig
John, can you please review the endianess annotations and byte swaps in be2scsi? On Thu, May 29, 2014 at 10:15:03PM +0800, kbuild test robot wrote: tree: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 07dd999f99b1135fdece697e17c4f4248ab40f72 commit:

Re: [PATCH] Remove two cancel_delayed_work() calls from the mid-layer

2014-06-02 Thread Christoph Hellwig
also remove the cancel_delayed_work() call from scsi_abort_command(). Signed-off-by: Bart Van Assche bvanass...@acm.org Looks good, Reviewed-by: Christoph Hellwig h...@lst.de -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord

Re: [PATCH 1/4] mpt2sas: correct scsi_{target,device} hostdata allocation

2014-06-02 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig h...@lst.de -- 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 3/4] mpt3sas: fix possible memory leak in mpt3sas_send_trigger_data_event

2014-06-02 Thread Christoph Hellwig
On Mon, Jun 02, 2014 at 10:37:26AM -0400, Joe Lawrence wrote: If mpt3sas_send_trigger_data_event exits early without inserting a fw_event, be sure to undo any prior allocations. Looks good, but why don't we just allocate the two in a single allocation? Reviewed-by: Christoph Hellwig h

Re: [PATCH 2/4] mpt3sas: correct scsi_{target,device} hostdata allocation

2014-06-02 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig h...@lst.de -- 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 4/4] mpt2sas: annotate ioc-reply_post_host_index as __iomem

2014-06-02 Thread Christoph Hellwig
On Mon, Jun 02, 2014 at 10:38:32AM -0400, Joe Lawrence wrote: The MPT2SAS_ADAPTER reply_post_host_index[] holds calculated addresses in memory mapped register space. Add an __iomem annotation to silence the following sparse warnings: Looks good, Reviewed-by: Christoph Hellwig h...@lst.de

Re: [PATCH 0/4] mpt2/mpt3 static checker fixups

2014-06-02 Thread Christoph Hellwig
On Mon, Jun 02, 2014 at 10:34:28AM -0400, Joe Lawrence wrote: Hello Sreekanth, Dan, These are a few minor smatch and sparse static checker fixes for the LSI mpt2 and mpt3 drivers. The first three fix real potential bugs and the last cleans up a noisy complaint from sparse. Can you check if

Re: [PATCH v2] sg: add SG_FLAG_Q_AT_TAIL flag

2014-06-05 Thread Christoph Hellwig
for the sg driver. Looks good, Reviewed-by: Christoph Hellwig h...@lst.de Any chance to get a patch for the block-layer SG_IO code, too? -- 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

Re: [PATCH 1/7] mptfusion: mark file-private functions as static

2014-06-05 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig h...@lst.de -- 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 2/7] mptfusion: remove redundant kfree checks

2014-06-05 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig h...@lst.de -- 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 3/7] mptfusion: initChainBuffers should return errno

2014-06-05 Thread Christoph Hellwig
On Wed, Jun 04, 2014 at 12:49:45PM -0400, Joe Lawrence wrote: The lone caller of initChainBuffers checks the return code for 0, so it is safe to appease smatch and return the proper errno value. I don't think this is useful on it's own as the whole callchain around it uses the same -1 for

Re: [PATCH 4/7] mptfusion: zero kernel-space source of copy_to_user

2014-06-05 Thread Christoph Hellwig
On Wed, Jun 04, 2014 at 12:58:36PM -0400, Joe Lawrence wrote: Hi Dan, kzalloc silenced that smatch warning, but the code looks like: (calculate data_size) ... karg = kmalloc(data_size, GFP_KERNEL); ... if (copy_from_user(karg, uarg, data_size)) { ... if

Re: [PATCH 5/7] mptfusion: make adapter prod_name[] a pointer

2014-06-05 Thread Christoph Hellwig
/mptbase.c:2858 MptDisplayIocCapabilities() warn: this array is probably non-NULL. 'ioc-prod_name' Looks good, Reviewed-by: Christoph Hellwig h...@lst.de -- 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

Re: [PATCH 6/7] mptfusion: combine fw_event_work and its event_data

2014-06-05 Thread Christoph Hellwig
that this gets sorted out. Looks good, Reviewed-by: Christoph Hellwig h...@lst.de -- 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 7/7] mptfusion: tweak null pointer checks

2014-06-05 Thread Christoph Hellwig
JL: Comments on the above warnings, in order: Can you move these comments into the actual commit message instead of the part that gets discarded? No-brainer, the enclosing switch statement dereferences 'reply', so we can't get here unless 'reply' is valid. ok. Retry target

Re: [PATCH v3 1/6] virtio_scsi: remove ACCESS_ONCE() and smp_read_barrier_depends()

2014-06-05 Thread Christoph Hellwig
reading req_vq and decreasing tgt-reqs, but it isn't needed now because req_vq is read from scsi-req_vqs[vq-index - VIRTIO_SCSI_VQ_BASE] instead of tgt-req_vq, so remove the unnecessary barrier. Also remove related comment about the barrier. Looks good, Reviewed-by: Christoph Hellwig h...@lst.de

Re: [PATCH v3 4/6] scsi_error: fix invalid setting of host byte

2014-06-05 Thread Christoph Hellwig
-by: Ulrich Obergfell uober...@redhat.com [Fix all instances according to review comments. - Paolo] Signed-off-by: Paolo Bonzini pbonz...@redhat.com Looks good, Reviewed-by: Christoph Hellwig h...@lst.de -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message

Re: [PATCH v3 3/6] virtio-scsi: avoid cancelling uninitialized work items

2014-06-05 Thread Christoph Hellwig
, Reviewed-by: Christoph Hellwig h...@lst.de -- 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 v5] sg: relax 16 byte cdb restriction

2014-06-05 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig h...@lst.de -- 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] block SG_IO: add SG_FLAG_Q_AT_HEAD flag

2014-06-05 Thread Christoph Hellwig
This would be something for Jens to pick up. Looks good to me, Reviewed-by: Christoph Hellwig h...@lst.de Next step would be to switch to the same default for all implementations.. On Thu, Jun 05, 2014 at 10:02:22AM -0400, Douglas Gilbert wrote: After the SG_IO ioctl was copied into the block

Re: [PATCH] mpt3sas: delay scsi_add_host call to work with scsi-mq

2014-06-06 Thread Christoph Hellwig
from scsi_add_host is a bad idea, the function should eventually switch to having an int error variable for it. Looks good, Reviewed-by: Christoph Hellwig h...@lst.de -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More

Re: [PATCH] mpt3sas: delay scsi_add_host call to work with scsi-mq

2014-06-06 Thread Christoph Hellwig
earlier to clean up in reverse order. Signed-off-by: Robert Elliott elli...@hp.com Signed-off-by: Christoph Hellwig h...@lst.de --- drivers/scsi/mpt3sas/mpt3sas_scsih.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c b

Re: [PATCH] be2iscsi: add an missing goto in error path

2014-06-06 Thread Christoph Hellwig
On Fri, Jun 06, 2014 at 02:06:30PM +0200, Tomas Henzl wrote: a jump to 'free_memory' is apparently missing Signed-off-by: Tomas Henzl the...@redhat.com Looks good, Reviewed-by: Christoph Hellwig h...@lst.de -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body

Re: [PATCH 1/1] be2iscsi: remove potential junk pointer free

2014-06-06 Thread Christoph Hellwig
, Reviewed-by: Christoph Hellwig h...@lst.de -- 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: [Open-FCoE] [PATCH] fc: ensure scan_work isn't active when freeing fc_rport

2014-06-10 Thread Christoph Hellwig
On Mon, Jun 09, 2014 at 03:16:37PM -0400, Neil Horman wrote: Given fcoe is quite mature now and its patches volume is very low, so getting its kernel patches directly to scsi subsystem should work fine and should be okay with James or Christophs to pull into scsi subsystem directly once

Re: [ANNOUNCE] scsi patch queue tree

2014-06-11 Thread Christoph Hellwig
After this first pull for the 3.16 merge window it seems like this worked out fairly well - we got a large number of patches in, and all reviewed by a second pair of eyes. How should we go on from this? The drivers-for-3.16-2 branch, which had the late lpfs and hpsa updates didn't make it into

Re: [PATCH v2] notify block layer when using temporary change to cache_type

2014-06-11 Thread Christoph Hellwig
through. If not, SYNCHRONIZE CACHE command will still be generated. This patch factors out a helper that can be called from sd_revalidate_disk and cache_type_store. Signed-off-by: Vaughan Cao vaughan@oracle.com Looks good, Reviewed-by: Christoph Hellwig h...@lst.de -- To unsubscribe from

Re: [PATCH] sd: bad return code of init_sd

2014-06-11 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig h...@lst.de -- 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 v2 linux-scsi-ml] linux-firmware: qla2xxx: Update ql2{4,5}00_fw.bin to version 7.03.00

2014-06-11 Thread Christoph Hellwig
On Tue, Jun 10, 2014 at 12:00:39PM +0200, Xose Vazquez Perez wrote: resent to linux-scsi-ml, without the binary blob(244K). Firmwares were taken from http://ldriver.qlogic.com/firmware/ Looks good, while there's nothing really to review for a firmware blob update, can you get me a review or

Re: [PATCH 1/4] [SCSI] Don't build AdvanSys on ARM

2014-06-11 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig h...@lst.de -- 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 2/4] [SCSI] pas16: don't call free_dma()

2014-06-11 Thread Christoph Hellwig
on ARM, which depending on the configuration does not provide a free_dma() function, causing this build error: Looks good, Reviewed-by: Christoph Hellwig h...@lst.de -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org More

Re: [PATCH 3/4] [SCSI] qlogicfas: don't call free_dma()

2014-06-11 Thread Christoph Hellwig
builds on ARM, which depending on the configuration does not provide a free_dma() function, causing this build error: Looks good, Reviewed-by: Christoph Hellwig h...@lst.de -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org

Re: [PATCH 4/4] [SCSI] NCR53c406a: don't call free_dma() by default

2014-06-11 Thread Christoph Hellwig
is defined as a boolean that is either 0 or 1, but always present. One case where it gets in the way is randconfig builds on ARM, which depending on the configuration does not provide a free_dma() function, causing this build error: Looks good, Reviewed-by: Christoph Hellwig h...@lst.de

Re: [PATCH v3 3/6] virtio-scsi: avoid cancelling uninitialized work items

2014-06-11 Thread Christoph Hellwig
Can I get a second review on this one from anyone? On Wed, Jun 04, 2014 at 01:34:56PM +0200, Paolo Bonzini wrote: Calling the workqueue interface on uninitialized work items isn't a good idea even if they're zeroed. It's not failing catastrophically only through happy accidents.

Re: [PATCH 2/2] scsi: Handle power-on reset unit attention

2014-06-11 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig h...@lst.de -- 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: SCSI eats error from flush failure during hot plug

2014-06-11 Thread Christoph Hellwig
On Mon, Jun 09, 2014 at 10:29:06AM -0700, James Bottomley wrote: I'll do it as a bug fix, but I do need Jens to make sure nothing else breaks first. Best I can tell, the state model for compound commands like flush doesn't expect us to change the request type ... nothing puts it back to

Re: [PATCH 1/2] scsi_scan: Send TEST UNIT READY to the LUN before scanning

2014-06-11 Thread Christoph Hellwig
? Otherwise looks good to me, Reviewed-by: Christoph Hellwig h...@lst.de -- 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: [ANNOUNCE] scsi patch queue tree

2014-06-11 Thread Christoph Hellwig
On Wed, Jun 11, 2014 at 07:17:34AM -0700, James Bottomley wrote: No, I was waiting to check if there was any reason to have them split, but I think we've scope today or tomorrow. The only other outstanding thing is the fsync bug fix, which is waiting Jens' investigation of the block issues

Re: [PATCH 01/14] block: Get rid of bdev_integrity_enabled()

2014-06-11 Thread Christoph Hellwig
On Wed, May 28, 2014 at 11:28:35PM -0400, Martin K. Petersen wrote: bdev_integrity_enabled() is only used by bio_integrity_enabled(). Combine these two functions. Signed-off-by: Martin K. Petersen martin.peter...@oracle.com Looks good, Reviewed-by: Christoph Hellwig h...@lst.de

Re: [PATCH 02/14] block: Replace bi_integrity with bi_special

2014-06-11 Thread Christoph Hellwig
On Wed, May 28, 2014 at 11:28:36PM -0400, Martin K. Petersen wrote: For commands like REQ_COPY we need a way to pass extra information along with each bio. Like integrity metadata this information must be available at the bottom of the stack so bi_private does not suffice. Rename the

Re: [PATCH 03/14] block: Deprecate integrity tagging functions

2014-06-11 Thread Christoph Hellwig
On Wed, May 28, 2014 at 11:28:37PM -0400, Martin K. Petersen wrote: None of the filesystems appear interested in using the integrity tagging feature. Potentially because very few storage devices actually permit using the application tag space. Deprecate the tagging functions. This patch

Re: [PATCH 04/14] block: Remove bip_buf

2014-06-11 Thread Christoph Hellwig
On Wed, May 28, 2014 at 11:28:38PM -0400, Martin K. Petersen wrote: bip_buf is not really needed so we can remove it. Signed-off-by: Martin K. Petersen martin.peter...@oracle.com Looks good, Reviewed-by: Christoph Hellwig h...@lst.de -- To unsubscribe from this list: send the line

Re: [PATCH 05/14] block: Deprecate the use of the term sector in the context of block integrity

2014-06-11 Thread Christoph Hellwig
On Wed, May 28, 2014 at 11:28:39PM -0400, Martin K. Petersen wrote: The protection interval is not necessarily tied to the logical block size of a block device. Stop using the terms sector and sectors. This does more than just renaming symbols, so it needs a better description or even better

Re: [PATCH 07/14] block: Add prefix to block integrity profile flags

2014-06-11 Thread Christoph Hellwig
...@oracle.com Looks good, Reviewed-by: Christoph Hellwig h...@lst.de -- 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 09/14] block: Relocate integrity flags

2014-06-11 Thread Christoph Hellwig
On Wed, May 28, 2014 at 11:28:43PM -0400, Martin K. Petersen wrote: Move flags affecting the integrity code out of the bio bi_flags and into the block integrity payload. It seems like bip is guaranteed to be non-NULL in all callers of the getters and setters. I'd recommend just dropping them

Re: [PATCH 10/14] block: Integrity checksum flag

2014-06-11 Thread Christoph Hellwig
On Wed, May 28, 2014 at 11:28:44PM -0400, Martin K. Petersen wrote: Make the choice of checksum a per-I/O property by introducing a flag that can be inspected by the SCSI layer. Why? -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to

Re: [PATCH 11/14] block: Don't merge requests if integrity flags differ

2014-06-11 Thread Christoph Hellwig
On Wed, May 28, 2014 at 11:28:45PM -0400, Martin K. Petersen wrote: We'd occasionally merge requests with conflicting integrity flags. Introduce a merge helper which checks that the requests have compatible integrity payloads. Looks good, Reviewed-by: Christoph Hellwig h...@lst.de

Re: [PATCH 12/14] block: Add specific data integrity errors

2014-06-11 Thread Christoph Hellwig
On Wed, May 28, 2014 at 11:28:46PM -0400, Martin K. Petersen wrote: Introduce a set of error codes that can be used by the block integrity subsystem to signal which class of error was encountered by either the I/O controller or the storage device. Signed-off-by: Martin K. Petersen

Re: [PATCH 08/14] block: Add a disk flag to block integrity profile

2014-06-11 Thread Christoph Hellwig
On Wed, May 28, 2014 at 11:28:42PM -0400, Martin K. Petersen wrote: So far we have relied on the app tag size to determine whether a disk has been formatted with T10 protection information or not. However, not all target devices provide application tag storage. Add a flag to the block

Re: [PATCH 13/14] lib: Add T10 Protection Information functions

2014-06-11 Thread Christoph Hellwig
static struct blk_integrity dif_type1_integrity_crc = { .name = T10-DIF-TYPE1-CRC, - .generate_fn= sd_dif_type1_generate_crc, - .verify_fn = sd_dif_type1_verify_crc, - .tuple_size = sizeof(struct sd_dif_tuple), +

scsi-mq

2014-06-12 Thread Christoph Hellwig
With all the required blk-mq work, and the previous set of scsi midlayer updates in Linus' tree this is the time for the first format scsi-mq submission. At this point the code is ready for merging and use by developers and early adopters. The core blk-mq code isn't that suitable for slow

[PATCH 14/14] fnic: reject device resets without assigned tags for the blk-mq case

2014-06-12 Thread Christoph Hellwig
will have to come up with a similar hack for the blk-mq case, or we'll have to bite the bullet and fix the way the EH ioctls work for real, but until that happens we fail these explicit requests here. Signed-off-by: Christoph Hellwig h...@lst.de Cc: Hiral Patel hiral...@cisco.com Cc: Suma Ramars

[PATCH 12/14] scatterlist: allow chaining to preallocated chunks

2014-06-12 Thread Christoph Hellwig
list that uses a preallocated first chunks and dynamically allocated additional chunks. That way the scsi-mq code can preallocate a first page worth of S/G entries as part of the request, and dynamically extent the S/G list when needed. Signed-off-by: Christoph Hellwig h...@lst.de --- drivers

[PATCH 13/14] scsi: add support for a blk-mq based I/O path.

2014-06-12 Thread Christoph Hellwig
. Based on the earlier scsi-mq prototype by Nicholas Bellinger. Thanks to Bart Van Assche and Robert Elliot for testing, benchmarking and various sugestions and code contributions. Signed-off-by: Christoph Hellwig h...@lst.de --- drivers/scsi/hosts.c | 30 ++- drivers/scsi/scsi.c |5

[PATCH 10/14] scsi: only maintain target_blocked if the driver has a target queue limit

2014-06-12 Thread Christoph Hellwig
This saves us an atomic operation for each I/O submission and completion for the usual case where the driver doesn't set a per-target can_queue value. Only a few iscsi hardware offload drivers set the per-target can_queue value at the moment. Signed-off-by: Christoph Hellwig h...@lst.de

[PATCH 08/14] scsi: convert device_busy to atomic_t

2014-06-12 Thread Christoph Hellwig
in the request_fn due to the way the interface works, but it'll allow us to prepare for using the blk-mq code, which doesn't use the queue_lock at all, and it at least avoids a queue_lock rountrip in scsi_device_unbusy, which is still important given how busy the queue_lock is. Signed-off-by: Christoph

[PATCH 07/14] scsi: convert host_busy to atomic_t

2014-06-12 Thread Christoph Hellwig
Avoid taking the host-wide host_lock to check the per-host queue limit. Instead we do an atomic_inc_return early on to grab our slot in the queue, and if nessecary decrement it after finishing all checks. Signed-off-by: Christoph Hellwig h...@lst.de --- drivers/scsi/advansys.c |4

[PATCH 09/14] scsi: fix the {host,target,device}_blocked counter mess

2014-06-12 Thread Christoph Hellwig
completion. With the new model the _busy counters can temporarily go negative, so all the readers are updated to check for 0 values. Longer term every successful I/O completion will reset the counters to zero, so the temporarily negative values will not cause any harm. Signed-off-by: Christoph Hellwig

[PATCH 11/14] scsi: unwind blk_end_request_all and blk_end_request_err calls

2014-06-12 Thread Christoph Hellwig
. Signed-off-by: Christoph Hellwig h...@lst.de --- drivers/scsi/scsi_lib.c | 61 --- 1 file changed, 42 insertions(+), 19 deletions(-) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 763b3c9..e438726 100644 --- a/drivers/scsi

[PATCH 06/14] scsi: convert target_busy to an atomic_t

2014-06-12 Thread Christoph Hellwig
Avoid taking the host-wide host_lock to check the per-target queue limit. Instead we do an atomic_inc_return early on to grab our slot in the queue, and if nessecary decrement it after finishing all checks. Signed-off-by: Christoph Hellwig h...@lst.de --- drivers/scsi/scsi_lib.c| 52

[PATCH 04/14] scsi: set -scsi_done before calling scsi_dispatch_cmd

2014-06-12 Thread Christoph Hellwig
The blk-mq code path will set this to a different function, so make the code simpler by setting it up in a legacy-request specific place. Signed-off-by: Christoph Hellwig h...@lst.de --- drivers/scsi/scsi.c | 23 +-- drivers/scsi/scsi_lib.c | 20

[PATCH 01/14] sd: don't use rq-cmd_len before setting it up

2014-06-12 Thread Christoph Hellwig
Unlike the old request code blk-mq doesn't initialize cmd_len with a default value, so don't rely on it being set in sd_setup_write_same_cmnd. Signed-off-by: Christoph Hellwig h...@lst.de --- drivers/scsi/sd.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi

[PATCH 03/14] scsi: centralize command re-queueing in scsi_dispatch_fn

2014-06-12 Thread Christoph Hellwig
Make sure we only have the logic for requeing commands in one place. Signed-off-by: Christoph Hellwig h...@lst.de --- drivers/scsi/scsi.c | 36 +--- drivers/scsi/scsi_lib.c |9 ++--- 2 files changed, 19 insertions(+), 26 deletions(-) diff --git

[PATCH 02/14] scsi: split __scsi_queue_insert

2014-06-12 Thread Christoph Hellwig
Factor out a helper to set the _blocked values, which we'll reuse for the blk-mq code path. Signed-off-by: Christoph Hellwig h...@lst.de --- drivers/scsi/scsi_lib.c | 44 ++-- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/drivers/scsi

Re: [PATCH v4] sg: O_EXCL and other lock handling

2014-06-13 Thread Christoph Hellwig
Hi Doug, this looks generally good to me, but I don't think open_cnt and exclude have to use atomic_t, as they are only ever modified under open_rel_lock. Can you take a look at the version below? This changes open_cnt to an int, exclude to a bool, removes the open_cnt underflow check that the

Re: [GIT PULL] target updates for v3.16-rc1

2014-06-13 Thread Christoph Hellwig
On Thu, Jun 12, 2014 at 02:05:16PM -0700, Nicholas A. Bellinger wrote: The first is with virtio-scsi between what has been merged in scsi.git for virtio_scsi: use cmd_size, and the virtio-scsi: Enable DIF/DIX modes in SCSI host LLD below. (Adding Paolo + hch CC') Just curious, why did we

Re: [PATCH 1/2] scsi_error: set DID_TIME_OUT correctly

2014-06-13 Thread Christoph Hellwig
On Fri, Jun 13, 2014 at 10:32:14AM -0400, Ewan Milne wrote: See Paolo's patch series which includes: [PATCH v3 4/6] scsi_error: fix invalid setting of host byte I think your patch won't apply after his. Might make sense to rebase this, which shouldn't be too hard. I already have a local

Re: [PATCH 2/2] scsi: Do not complete timed-out command

2014-06-13 Thread Christoph Hellwig
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index ff176a6..cde9c11 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -125,11 +125,13 @@ scmd_eh_abort_handler(struct work_struct *work) scmd_printk(KERN_INFO, scmd,

Re: [GIT PULL] target updates for v3.16-rc1

2014-06-13 Thread Christoph Hellwig
On Fri, Jun 13, 2014 at 08:21:01AM -0700, James Bottomley wrote: We've been ineffectively trying to split them between target and initiator, since it's effectively both. Now that we seem to have a workable process, why don't we just take everything (target scsi-queue and vhost) through the

Re: [PATCH 1/1] Add defines for new FC port speeds.

2014-06-13 Thread Christoph Hellwig
On Fri, Jun 13, 2014 at 04:40:36PM +, Dick Kennedy wrote: These speeds are to support the next generation of FCoE port speeds. Signed-off-by: rkenn...@emulex.com Looks good, Reviewed-by: Christoph Hellwig h...@lst.de (next time please add your fully name to the signoff line

Re: virtio-scsi issues duplicate tags when async_abort is enabled

2014-06-13 Thread Christoph Hellwig
On Fri, Jun 13, 2014 at 10:58:22AM -0700, Venkatesh Srinivas wrote: CC-ing stable as 3.14 and 3.15 are affected; a conservative fix is to enable no_async_abort until the problem is better-understood. No patch attached. Nevermind this is not a consdervative fix, but a band aid. The proper fix

Re: [PATCH v4] sg: O_EXCL and other lock handling

2014-06-16 Thread Christoph Hellwig
On Fri, Jun 13, 2014 at 10:33:37AM -0400, Douglas Gilbert wrote: this looks generally good to me, but I don't think open_cnt and exclude have to use atomic_t, as they are only ever modified under open_rel_lock. They are read by 'cat /proc/scsi/sg/debug' [in sg_proc_seq_show_debug()] but

Re: [PATCH 10/14] scsi: only maintain target_blocked if the driver has a target queue limit

2014-06-23 Thread Christoph Hellwig
On Sat, Jun 21, 2014 at 10:10:14PM +, Elliott, Robert (Server Storage) wrote: not_ready: /* * lock q, handle tag, requeue req, and decrement device_busy. We There's an extra in that if statement. Indeed, this crept in during a rebase and a later patch fixes it. I'll

Re: scsi-mq

2014-06-23 Thread Christoph Hellwig
On Sat, Jun 21, 2014 at 12:52:22AM +, Elliott, Robert (Server Storage) wrote: Some of those context switches might be from scsi_end_request(), which always schedules the scsi_requeue_run_queue() function via the requeue_work workqueue for scsi-mq. That causes lots of context switches

Re: [PATCH v2 2/3] libiscsi, iser: Adjust data_length to include protection information

2014-06-23 Thread Christoph Hellwig
This patch causes a regression when using the iscsi initiator over TCP for me. When mounting a newly created ext4 filesystem I get the following BUG: [ 31.611803] BUG: unable to handle kernel NULL pointer dereference at 000c [ 31.613563] IP: [8197b38d]

Re: [PATCHv2 RESENDv2 2/9] target: Don't unlock/relock tpg_lun_lock in loop in add_node_to_devs

2014-06-24 Thread Christoph Hellwig
- * + * Called with tpg_lun_lock held irqs off */ Instead of writing this down the code should assert the pre-conditions, e.g. assert_spin_locked(tpg-tpg_lun_lock); WARN_ON_ONCE(!irqs_disabled()); if (core_enable_device_list_for_node(lun, lacl, lacl-mapped_lun,

Re: [PATCHv2 RESENDv2 4/9] target: core_tpg_post_dellun can return void

2014-06-24 Thread Christoph Hellwig
On Mon, Jun 23, 2014 at 04:55:33PM -0700, Andy Grover wrote: Nothing in it can raise an error. Signed-off-by: Andy Grover agro...@redhat.com Looks good, Reviewed-by: Christoph Hellwig h...@lst.de -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message

Re: [PATCHv2 RESENDv2 5/9] target: Change core_dev_del_lun to take a se_lun instead of unpacked_lun

2014-06-24 Thread Christoph Hellwig
, Reviewed-by: Christoph Hellwig h...@lst.de -- 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: [PATCHv2 RESENDv2 8/9] target: Remove core_tpg_release_virtual_lun0 function

2014-06-24 Thread Christoph Hellwig
On Mon, Jun 23, 2014 at 04:55:37PM -0700, Andy Grover wrote: Simple and just called from one place. Signed-off-by: Andy Grover agro...@redhat.com Looks good, Reviewed-by: Christoph Hellwig h...@lst.de -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body

Re: [PATCHv2 RESENDv2 6/9] target: Rename core_tpg_post_dellun to remove_lun

2014-06-24 Thread Christoph Hellwig
On Mon, Jun 23, 2014 at 04:55:35PM -0700, Andy Grover wrote: A clearer name, now that pre_dellun is gone. Signed-off-by: Andy Grover agro...@redhat.com Looks good, but might be worth merging into the previous patch. Reviewed-by: Christoph Hellwig h...@lst.de -- To unsubscribe from this list

Re: [PATCH RESEND] target: Fix a comment in emulate_evpd_86

2014-06-24 Thread Christoph Hellwig
agro...@redhat.com Looks good, Reviewed-by: Christoph Hellwig h...@lst.de -- 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 v2 1/3] scsi_cmnd: Introduce scsi_transfer_length helper

2014-06-24 Thread Christoph Hellwig
On Tue, Jun 24, 2014 at 08:53:25AM -0400, Martin K. Petersen wrote: Oh, I see. So things break because iSCSI uses scsi_transfer_length() where the scatterlist length was used in the past. How about this? This fixes the regression for me. -- To unsubscribe from this list: send the line

Re: [PATCH 1/5] ibmvstgt: remove

2014-06-24 Thread Christoph Hellwig
On Fri, May 23, 2014 at 11:29:57AM -0500, Brian King wrote: Adding Paul and Nathan to cc here. I'm pretty sure the backend for ibmvscsi in KVM was all done in qemu and there is no dependency on ibmvstgt. Unless there is a use case for KVM, I'm OK with this, as the ibmvstgt driver has never

Re: [PATCHv2 RESENDv2 3/9] target: Allocate se_dev_entrys in device list only when used

2014-06-24 Thread Christoph Hellwig
+ /* + * Wait for any in process SPEC_I_PT=1 or REGISTER_AND_MOVE + * PR operation to complete. + */ + while (atomic_read(deve-pr_ref_count) != 0) + cpu_relax(); A busy loop under an irq disabling spinlock is fairly nasty. Can we just remove the pointer

Re: [PATCHv2 RESENDv2 7/9] target: Allocate se_luns only when used

2014-06-24 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig h...@lst.de -- 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 v2 1/3] scsi_cmnd: Introduce scsi_transfer_length helper

2014-06-24 Thread Christoph Hellwig
On Tue, Jun 24, 2014 at 04:08:25PM +0300, Sagi Grimberg wrote: Oh, I see. So things break because iSCSI uses scsi_transfer_length() where the scatterlist length was used in the past. Ohhh, didn't notice this one and sent out a duplicate... The patch looks good to me obviously. Can you

Re: [PATCH v2 1/3] scsi_cmnd: Introduce scsi_transfer_length helper

2014-06-24 Thread Christoph Hellwig
On Tue, Jun 24, 2014 at 11:08:54AM -0500, Michael Christie wrote: static inline unsigned scsi_transfer_length(struct scsi_cmnd *scmd) { - unsigned int xfer_len = blk_rq_bytes(scmd-request); + unsigned int xfer_len = scsi_out(scmd)-length; unsigned int prot_op =

Re: [PATCH v2 1/3] scsi_cmnd: Introduce scsi_transfer_length helper

2014-06-24 Thread Christoph Hellwig
On Tue, Jun 24, 2014 at 07:27:46PM +0300, Sagi Grimberg wrote: This condition only matters in the bidi case, which is not relevant for the PI case. I suggested to condition that in libiscsi (posted in the second thread, copy-paste below). Although I do agree that scsi_transfer_length() helper

Re: [ANNOUNCE] scsi patch queue tree

2014-06-24 Thread Christoph Hellwig
I'm also going to put together driver fixes tomorrow, as a gentle reminder to patch author: please try to look for reviewer, as I want a second pair of eyes veriying each patch. -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to

Re: [ANNOUNCE] scsi patch queue tree

2014-06-24 Thread Christoph Hellwig
I've pushed another update to the core-for-3.16 branch. This includes the two error handling fixes (Ewan verified that Hannes patch fixes the issues he was seeing), and the fix for the iscsi regression: Hannes Reinecke (1): scsi_error: set DID_TIME_OUT correctly Martin K. Petersen (1):

Re: Possible use after free in scsi_put_command()?

2014-06-25 Thread Christoph Hellwig
On Wed, Jun 25, 2014 at 09:45:07AM +0200, Bart Van Assche wrote: Hello James and Christoph, Is it correct that the patch mentioned above has not yet been queued up ? Has it already been decided in which kernel version that patch should be included ? I've got it in my local pending queue for

<    1   2   3   4   5   6   7   8   9   10   >