Re: [PATCH] SG_SCSI_RESET ioctl should only perform requested operation

2013-02-04 Thread Douglas Gilbert
On 13-02-04 03:17 PM, Jeremy Linton wrote: From all the documentation I've found, it is not clear that users of the SG_SCSI_RESET ioctl may have their requests progress up the hierarchy of reset operations. Basically, requests for a SCSI_TRY_RESET_DEVICE may eventually result in a TARGET, BUS,

Re: [PATCH] scsi_debug: Fix endianess in partition table

2013-02-12 Thread Douglas Gilbert
On 13-02-12 04:03 AM, Martin Peschke wrote: On Mon, 2013-02-11 at 18:34 +0100, Martin Peschke wrote: Both start_sect and nr_sects in struct partition are __le32 and require cpu_to_le32() on assignment. Steffen Maier has pointed me at: block/partitions/msdos.c: return

Re: [PATCH v2 00/14] Corrections and customization of the SG_IO command whitelist (CVE-2012-4542)

2013-02-13 Thread Douglas Gilbert
On 13-02-13 03:32 AM, Paolo Bonzini wrote: Il 06/02/2013 16:15, Paolo Bonzini ha scritto: This series regards the whitelist that is used for the SG_IO ioctl. This whitelist has three problems: * the bitmap of allowed commands is designed for MMC devices (roughly, play/burn CDs without

Re: [PATCH] scsi_debug: Fix endianess in partition table

2013-02-13 Thread Douglas Gilbert
like the ones generated on my laptop. Signed-off-by: Martin Peschke mpesc...@linux.vnet.ibm.com Reviewed-by: Steffen Maier ma...@linux.vnet.ibm.com Acked-by: Douglas Gilbert dgilb...@interlog.com -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message

Re: [PATCH] [SCSI] scsi_debug: Do not respond to INQUIRY commands with CHECK CONDITION when sense pending

2013-02-14 Thread Douglas Gilbert
On 13-02-14 11:36 AM, Ewan D. Milne wrote: From: Ewan D. Milne emi...@redhat.com According to SPC, INQUIRY commands are not supposed to respond with a CHECK CONDITION due to a pending UNIT ATTENTION. This was causing failures when re-scanning a scsi_debug target. Good pick up. Reference:

Re: [PATCH v2] [SCSI] scsi_debug: Do not respond to certain commands with CHECK CONDITION when sense pending

2013-02-15 Thread Douglas Gilbert
are INQUIRY and REPORT LUNS. Signed-off-by: Ewan D. Milne emi...@redhat.com Acked-by: Douglas Gilbert dgilb...@interlog.com -- 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

[PATCH] SG_SCSI_RESET ioctl: add no_escalate values

2013-02-15 Thread Douglas Gilbert
in a similar way to support this new functionality. Signed-off-by: Douglas Gilbert dgilb...@interlog.com diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index c1b05a8..4ba79c1 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c @@ -2013,8 +2013,18

Re: [PATCH] SG_SCSI_RESET ioctl: add no_escalate values

2013-02-15 Thread Douglas Gilbert
On 13-02-15 04:48 PM, Mike Christie wrote: On 02/15/2013 01:39 PM, Douglas Gilbert wrote: Further to the thread titled: [PATCH] SG_SCSI_RESET ioctl should only perform requested operation by Jeremy Linton a patch is presented that adds no_escalate versions to the existing ioctl. This should

[PATCH v2] SG_SCSI_RESET ioctl: add no_escalate values

2013-02-16 Thread Douglas Gilbert
does not occur. The SG_SCSI_RESET ioctl is modified in both the sg driver and scsi_ioctl.c (so block devices can use it). - modify scsi_reset_provider() in the scsi_error.c file in a similar way to support this additional functionality. Signed-off-by: Douglas Gilbert dgilb

Re: WARNING: at drivers/ata/libata-core.c:5049 ata_qc_issue+0x1c7/0x3a0()

2013-02-19 Thread Douglas Gilbert
On 13-02-19 01:37 PM, Tommi Rantala wrote: Hello, Hit this WARNING once while fuzzing the kernel with trinity in a qemu virtual machine as the root user. Does this make any sense? I have occasionally seen some ATA related troubles while fuzzing in a VM, but this warning is new to me. [

Re: WARNING: at drivers/ata/libata-core.c:5049 ata_qc_issue+0x1c7/0x3a0()

2013-02-19 Thread Douglas Gilbert
On 13-02-19 04:52 PM, Dave Jones wrote: On Tue, Feb 19, 2013 at 04:04:33PM -0500, Douglas Gilbert wrote: On 13-02-19 01:37 PM, Tommi Rantala wrote: Hello, Hit this WARNING once while fuzzing the kernel with trinity in a qemu virtual machine as the root user. Does

Re: Issue with mini-SaS to eSATA to USB 3.0 setup

2013-02-21 Thread Douglas Gilbert
On 13-02-21 02:26 PM, Sarah Sharp wrote: Cc-ing the SCSI and USB storage list. Folks, does the attached picture look like a sane setup? I've never used mini-SaS to eSATA adapter before, let alone with four eSATA to USB 3.0 adapters. Well SAS to eSATA is okay (works for me: LSI SAS9212-4i4e

Re: [PATCH 0/4] scsi: 64-bit LUN support

2013-02-25 Thread Douglas Gilbert
On 13-02-21 11:32 AM, James Bottomley wrote: On Thu, 2013-02-21 at 16:15 +, Elliott, Robert (Server Storage) wrote: Regarding changes like this: - printk(MYIOC_s_NOTE_FMT [%d:%d:%d:%d] + printk(MYIOC_s_NOTE_FMT [%d:%d:%d:%llu]

Re: [PATCH 2/4] scsi: use 64-bit LUNs

2013-02-25 Thread Douglas Gilbert
On 13-02-25 10:33 AM, Steffen Maier wrote: Hi Hannes, I like the idea and most of the patch set, so I only have a few questions left and some review comments below. Just curious: Do you also plan to adapt systemd/udev, especially path_id for fc transport with its open coded copy of

Re: [GIT PULL] Final round of SCSI updates for the 3.8+ merge window

2013-03-01 Thread Douglas Gilbert
What is the status of the: - scsi: 64-bit LUN support [v2] - SG_SCSI_RESET ioctl: add no_escalate values [v2] patches? Doug Gilbert -- 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

Re: [GIT PULL] Final round of SCSI updates for the 3.8+ merge window

2013-03-01 Thread Douglas Gilbert
On 13-03-01 10:27 AM, Jeremy Linton wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 3/1/2013 9:06 AM, James Bottomley wrote: The results were interesting, there are some really strange things that happen in some of the LLD error paths. Its obvious that error injection is not part of

Re: [PATCH 1/4] scsi_scan: Fixup scsilun_to_int()

2013-03-04 Thread Douglas Gilbert
On 13-02-20 08:47 AM, Hannes Reinecke wrote: scsilun_to_int() has an error which prevents it from generating correct LUN numbers for 64bit values. Also we should remove the misleading comment about portions of the LUN being ignored; the initiator should treat the LUN as an opaque value.

lsscsi and sg3_utils betas for testing 64 bit LUNs

2013-03-06 Thread Douglas Gilbert
To facilitate testing Linux 64 bit LUNs (the kernel holds only 32 bit LUNs internally at the moment), I have put up beta versions of lsscsi and the sg3_utils packages, see the top of this page: http://sg.danny.cz/sg/ lsscsi version 0.27 (beta 1) adds a --lunhex (-x) option, here is an example of

Re: lsscsi and sg3_utils betas for testing 64 bit LUNs

2013-03-06 Thread Douglas Gilbert
On 13-03-06 10:10 AM, Douglas Gilbert wrote: To facilitate testing Linux 64 bit LUNs (the kernel holds only 32 bit LUNs internally at the moment), I have put up beta versions of lsscsi and the sg3_utils packages, see the top of this page: http://sg.danny.cz/sg/ lsscsi version 0.27 (beta 1) adds

Re: [PATCH v2][RFC] scsi_transport_fc: Implement I_T nexus reset

2013-03-07 Thread Douglas Gilbert
On 13-03-07 03:13 PM, Jeremy Linton wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 3/7/2013 1:19 PM, Mike Christie wrote: What happens for lpfc? It seems __fc_remote_port_delete ends up calling the fast io fail code right away and that sets FC_RPORT_FAST_FAIL_TIMEDOUT. We will then

Re: [patch] [SCSI] scsi_transport_sas: check for allocation failure

2013-03-08 Thread Douglas Gilbert
On 13-03-08 07:02 AM, Dan Carpenter wrote: Static checkers complain that this allocation isn't checked. We should return zero if the allocation fails. Signed-off-by: Dan Carpenter dan.carpen...@oracle.com diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c

Re: [patch] [SCSI] scsi_transport_sas: check for allocation failure

2013-03-08 Thread Douglas Gilbert
On 13-03-08 05:50 PM, James Bottomley wrote: On Fri, 2013-03-08 at 12:57 -0500, Douglas Gilbert wrote: On 13-03-08 07:02 AM, Dan Carpenter wrote: Static checkers complain that this allocation isn't checked. We should return zero if the allocation fails. Signed-off-by: Dan Carpenter

Re: [patch] [SCSI] scsi_transport_sas: check for allocation failure

2013-03-11 Thread Douglas Gilbert
On 13-03-11 09:10 AM, Dan Carpenter wrote: On Fri, Mar 08, 2013 at 10:50:19PM +, James Bottomley wrote: On Fri, 2013-03-08 at 12:57 -0500, Douglas Gilbert wrote: On 13-03-08 07:02 AM, Dan Carpenter wrote: Static checkers complain that this allocation isn't checked. We should return zero

Re: [PATCH 0/9] target: Add support for EXTENDED_COPY (VAAI) offload emulation

2013-08-23 Thread Douglas Gilbert
On 13-08-23 04:26 AM, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@daterainc.com Hi folks! This series adds support to target-core for generic EXTENDED_COPY offload emulation as defined by SPC-4 using virtual (IBLOCK, FILEIO, RAMDISK) backends. EXTENDED_COPY is a VMWare ESX VAAI

Re: [PATCH 0/9] target: Add support for EXTENDED_COPY (VAAI) offload emulation

2013-08-23 Thread Douglas Gilbert
On 13-08-23 02:33 PM, Martin K. Petersen wrote: Doug == Douglas Gilbert dgilb...@interlog.com writes: Doug The SCSI opcodes associated with it (0x83 and 0x84) have been Doug renamed THIRD PARTY COPY OUT and IN, and Where did you see that? My SPC still has EXTENDED COPY. SCSI _opcodes_

Re: [PATCH v5 0/4] [SCSI] sg: fix race condition in sg_open

2013-08-27 Thread Douglas Gilbert
On 13-08-27 10:16 AM, vaughan wrote: On 08/13/2013 11:16 AM, Douglas Gilbert wrote: On 13-08-12 10:46 PM, vaughan wrote: On 08/06/2013 04:52 AM, Douglas Gilbert wrote: On 13-08-04 10:19 PM, vaughan wrote: On 08/03/2013 01:25 PM, Douglas Gilbert wrote: On 13-08-01 01:01 AM, Douglas Gilbert

Re: PATCH: scsi: make scsi reset permissions more relaxed (RFC)

2013-08-30 Thread Douglas Gilbert
On 13-08-30 02:04 PM, Marcus Meissner wrote: Hi folks, cdrecord wants to whack the CD drive with a SCSI RESET ... So far SCSI RESET can be done at 4 levels (target, device, bus, host) and all 4 are checked for CAP_SYS_ADMIN / CAP_SYS_RAWIO. As the cdrecord author wants special permissions

Re: [PATCH 0/4] Hyper-V TRIM support

2013-09-13 Thread Douglas Gilbert
On 13-09-13 08:58 AM, Andy Whitcroft wrote: tl;dr -- enable TRIM support for Hyper-V emulated disks. The Hyper-V hypervisor can support TRIM for its devices, advertising this via the appropriate VPD pages. However the emulated disks only claim to be SPC-2 devices. According to the specs VPD

[PATCH] sg: relax 16 byte cdb restriction

2013-09-17 Thread Douglas Gilbert
as the bsg driver. Remove comment from sg.h public interface about the cmd_len field being limited to 16 bytes. Signed-off-by: Douglas Gilbert dgilb...@interlog.com diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 5cbc4bb..c46d4b2 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c

Re: Bypass block layer and Fill SCSI lower layer driver queue

2013-09-18 Thread Douglas Gilbert
On 13-09-18 03:58 AM, Jack Wang wrote: On 09/18/2013 08:41 AM, Alireza Haghdoost wrote: Hi I am working on a high throughput and low latency application which does not tolerate block layer overhead to send IO request directly to fiber channel lower layer SCSI driver. I used to work with libaio

Re: SCSI's heuristics for enabling WRITE SAME still need work [was: dm mpath: disable WRITE SAME if it fails]

2013-09-21 Thread Douglas Gilbert
On 13-09-20 06:03 PM, Martin K. Petersen wrote: Mike == Mike Snitzer snit...@redhat.com writes: Mike, Mike AFAIK the reason for these heuristics is: devices that do support Mike WRITE SAME cannot properly report as much because they don't Mike support REPORT SUPPORTED OPERATION CODES -- this

Re: [dm-devel] SCSI's heuristics for enabling WRITE SAME still need work [was: dm mpath: disable WRITE SAME if it fails]

2013-09-24 Thread Douglas Gilbert
On 13-09-24 03:12 PM, Jeremy Linton wrote: On 9/24/2013 12:39 AM, Hannes Reinecke wrote: My drives support 'report opcodes', and report that write same is supported: ... 93 16Write same(16) ... but no support for page 'b0'. And yes, these are real SAS drives. So

Re: SCSI's heuristics for enabling WRITE SAME still need work [was: dm mpath: disable WRITE SAME if it fails]

2013-09-25 Thread Douglas Gilbert
On 13-09-25 04:52 PM, Bernd Schubert wrote: On 09/24/2013 03:49 PM, Martin K. Petersen wrote: Mike == Mike Snitzer snit...@redhat.com writes: Mike So are there drives like this?: Mike 1) don't support RSOC Mike 2) do support WRITE SAME Mike 3) do populate VPD page with either WRITE SAME w/

Re: SCSI's heuristics for enabling WRITE SAME still need work [was: dm mpath: disable WRITE SAME if it fails]

2013-09-25 Thread Douglas Gilbert
On 13-09-25 08:44 PM, Martin K. Petersen wrote: Bernd == Bernd Schubert bernd.schub...@fastmail.fm writes: Hey Bernd, Bernd I'm afraid we have another problem. I'm currently working on to Bernd get discard working for our LSI2008 HBAs with attached sata-SSDs Bernd and the heuristics in

Re: SCSI's heuristics for enabling WRITE SAME still need work [was: dm mpath: disable WRITE SAME if it fails]

2013-09-26 Thread Douglas Gilbert
On 13-09-26 10:42 AM, Martin K. Petersen wrote: Bernd == Bernd Schubert bernd.schub...@fastmail.fm writes: Bernd, Bernd Both types of systems we have in-house neither block limits vpd Bernd nor READ_CAP16 return anything that would indicate discard is Bernd supported. But UNMAP and WRITE SAME

[PATCH] sg: fix memory leaks

2013-09-26 Thread Douglas Gilbert
procfs and sysfs. The patch is generated from lk 3.12.0-rc2 . Signed-off-by: Douglas Gilbert dgilb...@interlog.com diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 5cbc4bb..aa86276 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -2060,6 +2060,7 @@ sg_add_sfp(Sg_device * sdp, int

Re: [PATCH 07/10] hpsa: hide logical drives with format in progress from linux

2013-09-27 Thread Douglas Gilbert
On 13-09-27 10:41 AM, scame...@beardog.cce.hp.com wrote: On Fri, Sep 27, 2013 at 04:01:30PM +0200, Tomas Henzl wrote: On 09/27/2013 03:34 PM, scame...@beardog.cce.hp.com wrote: On Fri, Sep 27, 2013 at 03:22:19PM +0200, Tomas Henzl wrote: On 09/23/2013 08:34 PM, Stephen M. Cameron wrote:

Re: Odd behavior of a SAS-2 backplane with SGPIO commands

2013-10-03 Thread Douglas Gilbert
On 13-10-03 03:11 PM, Pasi Kärkkäinen wrote: On Mon, Sep 02, 2013 at 05:44:35PM +0300, Pasi Kärkkäinen wrote: On Sun, Sep 01, 2013 at 08:13:02PM +0300, Pasi Kärkkäinen wrote: On Fri, Aug 30, 2013 at 05:38:04PM -0400, Rich wrote: Apparently, only about 4 months. P17 firmware is out.

Re: [Bug] 12.864681 BUG: lock held when returning to user space!

2013-10-08 Thread Douglas Gilbert
On 13-10-08 02:44 AM, vaughan wrote: Hi Madper, CC to Douglas to get comments. I use the rw_semaphore o_sem to protect excl open, introduced in commit 15b06f9a02406e5460001db6d5af5c738cd3d4e7 since v3.12-rc1. Is it forbidden to do like that in kernel?... It appears you can not (allow

sg3_utils-1.37 and ddpt-0.93 betas; xcopy work

2013-10-08 Thread Douglas Gilbert
Since several people are working on xcopy; I have collected various fixes, improved documentation and debug to sg_xcopy (in sg3_utils) and ddpt into new betas dated today. They can be found in the News section at the top of: http://sg.danny.cz/sg There are a lot of other fixes to sg3_utils

[Announce] sg3_utils-1.37 available

2013-10-15 Thread Douglas Gilbert
sg3_utils is a package of command line utilities for sending SCSI and some ATA commands to devices. This package targets the Linux 3, 2.6 and 2.4 kernel series. It also has ports to FreeBSD, Tru64, Solaris, and Windows (cygwin and MinGW). This version contains many fixes, some code cleanup and

Re: [Bug] 12.864681 BUG: lock held when returning to user space!

2013-10-16 Thread Douglas Gilbert
On 13-10-16 09:24 AM, James Bottomley wrote: On Tue, 2013-10-08 at 09:45 -0400, Douglas Gilbert wrote: On 13-10-08 02:44 AM, vaughan wrote: Hi Madper, CC to Douglas to get comments. I use the rw_semaphore o_sem to protect excl open, introduced in commit

[PATCH] [SCSI] sg: late O_EXCL fix for lk 3.12-rc

2013-10-20 Thread Douglas Gilbert
The lk 3.12.0-rc series contains a series of patches from Vaughan Cao introduced by this post: [PATCH v7 0/4][SCSI] sg: fix race condition in sg_open http://marc.info/?l=linux-scsim=137774159020002w=2 Doubt was thrown on the implementation by Madper Xie in this thread: [Bug] 12.864681

Re: Is there any plan to support 64bit lun in mainline?

2013-10-20 Thread Douglas Gilbert
On 13-10-14 11:29 AM, Christoph Hellwig wrote: On Mon, Oct 14, 2013 at 12:32:22PM +0200, Hannes Reinecke wrote: However, there are two other patchsets pending (EH Deadline and asynchronous command aborts), both of which have been tested thoroughly _and_ have acked-by from various other parties.

Re: [PATCH] [SCSI] sg: late O_EXCL fix for lk 3.12-rc

2013-10-20 Thread Douglas Gilbert
On 13-10-20 01:31 PM, Bart Van Assche wrote: On 10/20/13 18:09, Douglas Gilbert wrote: Given that lk 3.12.0 release is not far away, the safest path may still be to revert Vaughan Cao's patch. I'll leave that decision to the maintainers. Hello Doug, Thanks for looking into this. But I would

Re: [PATCH] [SCSI] sg: late O_EXCL fix for lk 3.12-rc

2013-10-21 Thread Douglas Gilbert
On 13-10-21 06:35 AM, Vaughan Cao wrote: On 2013年10月21日 07:00, Douglas Gilbert wrote: On 13-10-20 01:31 PM, Bart Van Assche wrote: On 10/20/13 18:09, Douglas Gilbert wrote: Given that lk 3.12.0 release is not far away, the safest path may still be to revert Vaughan Cao's patch. I'll leave

Re: [3.12-rc] sg_open: leaving the kernel with locks still held!

2013-10-23 Thread Douglas Gilbert
On 13-10-23 03:44 AM, James Bottomley wrote: On Tue, 2013-10-22 at 20:41 -0400, Douglas Gilbert wrote: On 13-10-22 04:56 PM, Simon Kirby wrote: Hello! While trying to figure out why the request queue to sda (ext4) was clogging up on one of our btrfs backup boxes, I noticed a megarc process

[RFC]: scsi_error: interruptible scsi_block_when_processing_errors()

2013-10-23 Thread Douglas Gilbert
The existing scsi_block_when_processing_errors() function in scsi_error.c does a non-interruptible wait on the host_wait work queue. That call is made from many places in the scsi subsystem ULDs (e.g. the sg driver). In many cases (e.g. sg_open()) there is a direct path back to the user space.

[PATCH] 3.13 series, sg: O_EXCL and other lock handling

2013-10-26 Thread Douglas Gilbert
multiple callers are waiting for an O_EXCL condition to clear - change some seq_printf()s to seq_puts()s as requested by checkpatch.pl - update copyright notice, version number and date Signed-off-by: Douglas Gilbert dgilb...@interlog.com diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c

Re: Subject: [v3.8][v3.11][Regression] [SCSI] sd: Update WRITE SAME heuristics

2013-10-29 Thread Douglas Gilbert
On 13-10-29 03:21 PM, Joseph Salisbury wrote: Hi Martin, A bug was opened against the Ubuntu kernel[0]. After a kernel bisect, it was found that reverting the following commit resolved this bug: commit 66c28f97120e8a621afd5aa7a31c4b85c547d33d Author: Martin K. Petersen

[PATCH v2] sg: O_EXCL and other lock handling

2013-10-30 Thread Douglas Gilbert
. It is important that /dev/sg4 is either a scsi_debug device or a disk that you don't mind overwriting LBA 1000. Signed-off-by: Douglas Gilbert dgilb...@interlog.com diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index df5e961..99c643f 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -7,9 +7,7

[PATCH v2] sg: relax 16 byte cdb restriction

2013-10-30 Thread Douglas Gilbert
way as the bsg driver. Remove comment from sg.h public interface about the cmd_len field being limited to 16 bytes. Signed-off-by: Douglas Gilbert dgilb...@interlog.com diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 99c643f..4d434b9 100644 --- a/drivers/scsi/sg.c +++ b

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

2013-10-31 Thread Douglas Gilbert
On 13-10-31 11:56 AM, Christoph Hellwig wrote: + struct semaphore or_sem; /* protect co-incident opens and releases */ Seems like this should be a mutex. Yes, it is being used as a mutex. However looking at their semantics (mutex.h versus semaphore.h), a mutex takes into account the

Re: [Bug 64171] New: Block SCSI Generic Driver does not keep data

2013-11-02 Thread Douglas Gilbert
On 13-11-01 03:49 PM, bugzilla-dae...@bugzilla.kernel.org wrote: https://bugzilla.kernel.org/show_bug.cgi?id=64171 Bug ID: 64171 Summary: Block SCSI Generic Driver does not keep data Product: SCSI Drivers Version: 2.5 Kernel Version:

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

2013-11-02 Thread Douglas Gilbert
On 13-11-01 01:16 AM, vaughan wrote: On 11/01/2013 03:20 AM, Douglas Gilbert wrote: On 13-10-31 11:56 AM, Christoph Hellwig wrote: +struct semaphore or_sem; /* protect co-incident opens and releases */ Seems like this should be a mutex. Yes, it is being used as a mutex. However

Re: [PATCH] scsi_debug: simplify creation and destruction of driver attribute files

2013-11-03 Thread Douglas Gilbert
of the attribute files, and also removes sparse warning caused by driver_attributes which are unnecessarily declared as global. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Acked-by: Douglas Gilbert dgilb...@interlog.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert

Re: Disk wakeup on resume

2013-11-05 Thread Douglas Gilbert
On 13-11-04 09:37 PM, Phillip Susi wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 I can not figure out what is waking up disks on resume from suspend. I thought it was sd.c, and setting manage_start_stop = 0 should stop that. It does stop the message printed saying it is being started,

Re: [PATCH][SCSI] sr: Remove sr_mutex just like sd_module to optimize multi-drive performance

2013-11-05 Thread Douglas Gilbert
On 13-11-01 11:46 AM, yang jun wrote: The sr_mutex is not necessary, so we can delete it. It is ironic that you are removing a mutex that serializes the access to various calls in the sr driver at the same time we are proposing to add a mutex to the open() and release() calls in the sg driver.

Re: Disk wakeup on resume

2013-11-05 Thread Douglas Gilbert
On 13-11-05 11:23 AM, Phillip Susi wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/5/2013 10:56 AM, Douglas Gilbert wrote: I think that you might find that almost any SCSI command (translated to its ATA equivalent command) will wake up a SATA disk. Perhaps just this sequence: fd

Re: [PATCH 1/3] sd: don't bother spinning up disks on resume

2013-11-07 Thread Douglas Gilbert
On 13-11-06 08:57 PM, Phillip Susi wrote: Don't bother forcing disks to spin up on resume, as they will do so automatically when accessed, and forcing them to spin up slows down the resume. Add a second bit to the manage_start_stop flag to restore the previous behavior. SCSI disks when in

Re: [PATCH 2/5] scsi: improved eh timeout handler

2013-11-07 Thread Douglas Gilbert
On 13-11-07 01:45 AM, Hannes Reinecke wrote: On 11/06/2013 06:23 PM, Mike Christie wrote: On 11/05/2013 10:48 PM, Hannes Reinecke wrote: On 11/05/2013 08:19 PM, Mike Christie wrote: On 11/04/2013 11:05 PM, Hannes Reinecke wrote: + + scmd-eh_eflags |= SCSI_EH_ABORT_SCHEDULED; +

[PATCH v3] sg: O_EXCL and other lock handling

2013-11-12 Thread Douglas Gilbert
scsi_debug LUs. Some log noise is generated, but it is not from the sg driver: scsi 9:0:33:3: rejecting I/O to offline device scsi 9:0:33:3: [sg1000] killing request multiple times This is not seen when there are only 600 LUs. Signed-off-by: Douglas Gilbert dgilb...@interlog.com diff --git

[PATCH v3] sg: relax 16 byte cdb restriction

2013-11-12 Thread Douglas Gilbert
interface about the cmd_len field being limited to 16 bytes. - cleanup comment block at the top of sg.h, fix urls Signed-off-by: Douglas Gilbert dgilb...@interlog.com diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 843c66e..82d8b3d 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c

[ANNOUNCE] ddpt, version 0.93 available

2013-11-13 Thread Douglas Gilbert
ddpt is yet another variant of the venerable Unix dd command line utility. Some features found in ddpt which are not found in the current (GNU) dd implementation: - extended copy (xcopy) support - SCSI protection (DIF) support - bandwidth limiting - write sparing (i.e. don't write buffer

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

2013-11-14 Thread Douglas Gilbert
On 13-11-12 07:58 PM, Douglas Gilbert wrote: After feedback on version 2 and a new report of a failure in the vicinity of sg_remove() [remove device] during a shutdown on a large machine, the locking has been revised again. The shutdown problem in the vicinity of sg_remove() has been traced

Re: [PATCH 1/3] sd: don't bother spinning up disks on resume

2013-11-17 Thread Douglas Gilbert
On 13-11-17 11:15 AM, Phillip Susi wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 11/17/2013 01:43 AM, James Bottomley wrote: OK, so three people have now told you that's not how the code works. Why don't you just read it? because there's not really much point us reading your

Re: [Bug 64171] Block SCSI Generic Driver does not keep data

2013-11-18 Thread Douglas Gilbert
On 13-11-15 11:42 AM, James Bottomley wrote: On Sat, 2013-11-02 at 17:09 +, bugzilla-dae...@bugzilla.kernel.org wrote: https://bugzilla.kernel.org/show_bug.cgi?id=64171 --- Comment #2 from d gilbert dgilb...@interlog.com --- On 13-11-01 03:49 PM, bugzilla-dae...@bugzilla.kernel.org wrote:

Re: [LWN] Linux 3.13-rc1 is out

2013-11-23 Thread Douglas Gilbert
With a three week window we see this: ChangeLog: ... James Bottomley (1): first round of SCSI updates ... That begs the question: was there nothing suitable for a second round? Further, has there been any movement on the idea that Christoph Hellwig suggested in this post:

Re: qla2xxx: automatically rescan removed luns.

2013-11-26 Thread Douglas Gilbert
On 13-11-26 11:06 AM, Benjamin ESTRABAUD wrote: On 25/11/13 17:17, Ewan Milne wrote: On Mon, 2013-11-25 at 15:37 +, Benjamin ESTRABAUD wrote: Hi, Using the qla2xxx driver from Linux 3.10.1 (release), if a LUN from the target side (multiple drives exported over a LIO IBlock qla2xxx export)

Re: how to use SES driver to send SES commands?

2013-11-29 Thread Douglas Gilbert
On 13-11-29 05:07 AM, Newtech Tan wrote: Hi friends I subscribed the mailing list just now. Would you please to give me help? Who can tell me how to use SES driver(linux/driver/scsi/ses.c) to send SES command(SEND DIAGNOSTIC, RECEIVE DIAGNOSTIC RESULTS) in my linux program? (I don't

Re: [PATCH v2] sg: relax 16 byte cdb restriction

2013-12-01 Thread Douglas Gilbert
On 13-11-30 11:35 PM, James Bottomley wrote: On Wed, 2013-10-30 at 18:25 -0400, Douglas Gilbert wrote: This is essentially the same patch sent 6 weeks ago: http://marc.info/?l=linux-scsim=137943733409512w=2 re-based on '[PATCH v2] sg: O_EXCL and other lock handling'. ChangeLog

[PATCH v4] sg: relax 16 byte cdb restriction

2013-12-01 Thread Douglas Gilbert
some dead code caused by this change - cleanup comment block at the top of sg.h, fix urls Signed-off-by: Douglas Gilbert dgilb...@interlog.com diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 843c66e..2e99a4e 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -73,6 +73,9

Re: how to use SES driver to send SES commands?

2013-12-02 Thread Douglas Gilbert
I'm not sure what you expect from the ses driver in the kernel. If it likes an SES device (and it doesn't like some of them) then you will get a small, but useful, set of knobs to twiddle and read in sysfs. As far as I can see the ses driver does not create any device nodes (as found in /dev).

Re: [PATCH/RESEND v2 0/2] Hard disk resume time optimization

2013-12-03 Thread Douglas Gilbert
On 13-12-03 05:25 PM, Todd E Brandt wrote: Hi James, can you give me some feedback on this patch set? It includes changes based on your feedback to v1. The essential issue behind hard disks' lengthy resume time is the ata port driver blocking until the ATA port hardware is finished coming

Re: CONFIG_SCSI_MULTI_LUN default

2013-12-09 Thread Douglas Gilbert
On 13-12-09 07:37 PM, James Bottomley wrote: On Mon, 2013-12-09 at 13:24 -0500, Alan Stern wrote: James: Is there any good reason why CONFIG_SCSI_MULTI_LUN still doesn't default to Y? Assuming we've got all the screw ups (mostly CD ROMS) blacklisted, I think the only real reason is that some

Re: Do anybody know the format of bsg device node name?

2013-12-10 Thread Douglas Gilbert
On 13-12-10 02:32 AM, Newtech Tan wrote: For example of bsg device node name: [4:0:0:0] Each field is Hex or Dec? [BackGroup] I am using lsscsi -g command to get SCSI device list as the following. If bsg device name's target number field is over ten, Will it display [4:0:10:0] or [4:0:a:0]?

Re: [PATCH v4 2/4] Documentation: Add APM X-Gene SoC 15Gbps Multi-purpose PHY driver binding documentation

2013-12-12 Thread Douglas Gilbert
On 13-12-12 02:27 PM, Arnd Bergmann wrote: On Thursday 12 December 2013, Loc Ho wrote: +- reg : First PHY memory resource is the SDS PHY access + resource. + Second PHY memory resoruce is the clock and reset +

Re: [PATCH v4] sg: relax 16 byte cdb restriction

2013-12-17 Thread Douglas Gilbert
On 13-12-17 03:21 PM, James Bottomley wrote: On Sun, 2013-12-01 at 17:13 +0100, Douglas Gilbert wrote: ChangeLog: - remove the 16 byte CDB (SCSI command) length limit from the sg driver by handling longer CDBs the same way as the bsg driver. Remove comment from

Re: [PATCH 6/6] scsi_debug: add ability to enable clustering

2014-01-05 Thread Douglas Gilbert
to test commands with more than that transfer length. Signed-off-by: Akinobu Mita akinobu.m...@gmail.com Cc: James E.J. Bottomley jbottom...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: Martin K. Petersen martin.peter...@oracle.com Cc: linux-scsi@vger.kernel.org --- drivers/scsi

Re: REQ_PM vs REQ_TYPE_PM_RESUME

2014-01-09 Thread Douglas Gilbert
On 14-01-07 10:40 AM, Phillip Susi wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 1/7/2014 10:20 AM, Alan Stern wrote: This raises two questions: Should the host's resume be allowed to complete while the host is still in error recovery? Wouldn't it be better to wait until the

Re: Terrible performance of sequential O_DIRECT 4k writes in SAN environment. ~3 times slower then Solars 10 with the same HBA/Storage.

2014-01-09 Thread Douglas Gilbert
On 14-01-08 08:57 AM, Sergey Meirovich wrote: Hi James, On 7 January 2014 22:57, James Smart james.sm...@emulex.com wrote: Sergey, The Thor chipset is a bit old - a 4Gig adapter. Most of our performance improvements, including parallelization, have gone into the 8G and 16G adapters. But you

Re: REQ_PM vs REQ_TYPE_PM_RESUME

2014-01-09 Thread Douglas Gilbert
On 14-01-09 02:20 PM, Phillip Susi wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 1/9/2014 1:29 PM, Douglas Gilbert wrote: When REQUEST SENSE had its original semantics, TEST UNIT READY was the only game in town for monitoring power management. From my reading of spc4r36n.pdf section

Re: [PATCH 07/14] target/sbc: Add P_TYPE + PROT_EN bits to READ_CAPACITY_16

2014-01-12 Thread Douglas Gilbert
On 14-01-12 12:21 PM, Martin K. Petersen wrote: Doug == Douglas Gilbert dgilb...@interlog.com writes: So this takes me to a corner I still don't understand, if a LUN is pre-formatted as T10-protected, what happens to unwritten blocks read? I mean, SCSI login executes some reads from sevel

Re: [LSF/MM TOPIC] copy offloading

2014-01-15 Thread Douglas Gilbert
On 14-01-15 06:10 PM, Nicholas A. Bellinger wrote: On Wed, 2014-01-15 at 12:27 -0800, Zach Brown wrote: Discussing copy offloading at LSF is appropriate because it can involve so many layers of the stack: - high level syscall interface - in-kernel high level entry point for nfsd - fs

[LSF/MM TOPIC] [ATTEND] new generation copy offload (ODX)

2014-01-17 Thread Douglas Gilbert
Hannes Reinecke and I would like to attend LSF and present a talk on the new generation copy offload (a.k.a. ODX). Most discussions about copy offload at the storage level are based on T10's 15 year old xcopy(LID1), specifically its disk-disk copy. This year T10 hopes to standardize a new

Re: XHCI issues: WD MyBook 1230 - reset SuperSpeed USB device

2014-01-17 Thread Douglas Gilbert
On 14-01-17 02:35 AM, Hannes Reinecke wrote: On 01/16/2014 09:48 PM, Alan Stern wrote: It's now clear that this is _not_ an XHCI issue, contrary to what $SUBJECT says. On Thu, 16 Jan 2014, Peter Palúch wrote: Alan, I am attaching the usbmon trace after the drive has been plugged into the

Re: [PATCH] scsi-sg: pass flag to inhibit setting LUN

2014-01-19 Thread Douglas Gilbert
On 14-01-03 03:10 PM, Douglas Gilbert wrote: On 14-01-02 08:19 AM, Jiří Pinkava wrote: Hi, This patch implements support for inhibiting setting LUN number for SCSI custom command send via /dev/sgX with ioctl(.., SG_IO, ...) call. This solves problems with some devices which claim support

Re: [PATCH v2 0/7] scsi_debug: several bug fixes and enable clustering support

2014-01-19 Thread Douglas Gilbert
...@parallels.com Cc: Douglas Gilbert dgilb...@interlog.com Cc: Martin K. Petersen martin.peter...@oracle.com Cc: linux-scsi@vger.kernel.org The parts of this patch that I understand look fine. Perhaps Martin should ack it, if he sees fit. Reviewed-by: Douglas Gilbert dgilb...@interlog.com

Re: Open/INQUIRY fails on RESERVE'd tape device

2014-01-24 Thread Douglas Gilbert
On 14-01-24 03:35 AM, kai.makis...@kolumbus.fi wrote: Matthias Eble [psychotr...@gmail.com] kirjoitti: Hi list, When a tape device is reserved with old reserve/release commands, we see inquiry only works on the scsi generic device. For scsi tape devices open() fails already: # lsscsi -g |

Re: [PATCH] sg: fix integer overflow

2014-01-24 Thread Douglas Gilbert
On 14-01-24 11:34 AM, Mikulas Patocka wrote: On alpha, USER_HZ may be higher than HZ. This results in integer overflow in MULDIV. Signed-off-by: Mikulas Patocka mpato...@redhat.com Acked-by: Douglas Gilbert dgilb...@interlog.com Cc: sta...@vger.kernel.org --- drivers/scsi/sg.c |2

Re: [PATCH] st: Do not rewind for SG_IO

2014-02-03 Thread Douglas Gilbert
On 14-02-03 10:08 AM, Jeremy Linton wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2/3/2014 9:06 AM, Hannes Reinecke wrote: That's due to udev. Udev is getting events for each device it should create a device node for. So for 'st' it'll get a series of events for 'stX', and another

Re: [PATCH][RFC] Add EVPD page 0x83 entries to sysfs

2014-02-06 Thread Douglas Gilbert
On 14-02-06 08:04 AM, Hannes Reinecke wrote: EVPD page 0x83 is used to uniquely identify the device. So instead of having each and every program issue a separate SG_IO call to retrieve this information it does make far more sense to display it in sysfs. Cc: Jeremy Linton jlin...@tributary.com

Re: [PATCH] st: Do not rewind for SG_IO

2014-02-06 Thread Douglas Gilbert
On 14-02-06 10:13 AM, Hannes Reinecke wrote: On 02/06/2014 03:38 PM, James Bottomley wrote: On Thu, 2014-02-06 at 08:50 -0500, Martin K. Petersen wrote: Hannes == Hannes Reinecke h...@suse.de writes: My patch provides both the original VPD 0x83 and 0x80 bits as well as a handle identical to

Re: [PATCH 2/3] Add EVPD page 0x83 to sysfs

2014-03-07 Thread Douglas Gilbert
On 14-03-07 12:01 PM, James Bottomley wrote: On Fri, 2014-03-07 at 11:51 +0100, Hannes Reinecke wrote: On 03/07/2014 11:39 AM, James Bottomley wrote: On Thu, 2014-03-06 at 10:01 +0100, Hannes Reinecke wrote: So the only 'proper' solution would be to add a bitmap of supported pages; however,

Re: [PATCH 2/5] scsi: Return VPD page length in scsi_vpd_inquiry()

2014-03-12 Thread Douglas Gilbert
On 14-03-12 10:14 PM, Muthukumar R wrote: On Mon, Mar 10, 2014 at 7:28 AM, Hannes Reinecke h...@suse.de wrote: We should be returning the number of bytes of the requested VPD page in scsi_vpd_inquiry. This makes it easier for the caller to verify the required space. Signed-off-by: Hannes

[Announce] sg3_utils-1.38 available

2014-04-02 Thread Douglas Gilbert
sg3_utils is a package of command line utilities for sending SCSI and some ATA commands to devices. This package targets the Linux 3, 2.6 and 2.4 kernel series. It also has ports to FreeBSD, Tru64, Solaris, and Windows (cygwin and MinGW). Users of sg_xcopy note that the default recipient of the

Re: [PATCH] sg3_utils: Strip spaces at the end of various fields in INQUIRY response

2014-04-03 Thread Douglas Gilbert
Hi, scsiinfo: Eric Youngdale ** - 11/1/93. Version 1.0. Version 1.81 was ported to sginfo in 1998 and placed in the sg_utils package. For more than 10 years I have been trying to discourage people from using it. It contains next to no modern VPD or mode pages and many of the standard INQUIRY

[ANNOUNCE] ddpt, version 0.94 available

2014-04-07 Thread Douglas Gilbert
ddpt is yet another variant of the venerable Unix dd command line utility. This version adds application side support for a second offloaded copy mechanism defined by T10 around two years ago and already on the market under the name ODX. For more information and downloads see:

Re: [PATCH] scsi_debug: simple short transfer injection

2014-04-28 Thread Douglas Gilbert
On 14-04-28 11:58 AM, Christoph Hellwig wrote: Add an option to only transfer half the data for every n-th command. Signed-off-by: Christoph Hellwig h...@lst.de Acked-by: Douglas Gilbert dgilb...@interlog.com --- drivers/scsi/scsi_debug.c |8 1 file changed, 8 insertions

[Announce] smp_utils-0.98 available

2014-05-27 Thread Douglas Gilbert
smp_utils is a package of command line utilities for invoking SMP functions to monitor and manage SAS expanders. SMP is the Serial Attached SCSI (SAS) Serial Management Protocol. A SAS Host Bus Adapter (HBA) includes a SMP initiator (along with SSP and STP initiators). A SAS expander contains a

<    1   2   3   4   5   6   7   8   >