Re: [patch 069/104] lib/string_helpers.c:string_get_size(): remove redundant prefixes

2015-02-13 Thread James Bottomley
On Fri, 2015-02-13 at 17:02 -0800, Andrew Morton wrote: > On Fri, 13 Feb 2015 16:05:54 -0800 James Bottomley > wrote: > > > @@ -42,31 +44,60 @@ void string_get_size(u64 size, const enum > > string_size_units units, > > [STRING_UNITS_2] = 1024, > > }; > > int i, j; > > - u3

[PATCH 8/8] target: Set LBPWS10 bit in Logical Block Provisioning EVPD

2015-02-13 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch sets the missing LBPWS10 bit within spc_emulate_evpd_b2() in order to signal WRITE_SAME (10) w/ UNMAP support, following the existing LBPWS bit to signal WRITE_SAME (16) w/ UNMAP support. Cc: Martin Petersen Cc: Christoph Hellwig Signed-off-by: Nicholas Bell

[PATCH 6/8] target: Fail WRITE_SAME w/ UNMAP=1 when emulate_tpws=0

2015-02-13 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds a check within sbc_setup_write_same() to fail a WRITE_SAME w/ UNMAP=1 op, if the backend device has emulate_tpws disabled. Cc: Martin Petersen Cc: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- drivers/target/target_core_sbc.c | 5 + 1 fi

[PATCH 5/8] target: Add sanity checks for DPO/FUA bit usage

2015-02-13 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds a sbc_check_dpofua() function that performs sanity checks for DPO/FUA command bits. It introduces checks to fail when either bit is set, but the backend device is not advertising support for them. It also moves the existing cmd->se_cmd_flags |= SCF_FUA a

[PATCH 7/8] target: Fail UNMAP when emulate_tpu=0

2015-02-13 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds a check within sbc_parse_cdb() to fail a UNMAP op, if the backend device has emulate_tpu disabled. Cc: Martin Petersen Cc: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- drivers/target/target_core_sbc.c | 5 + 1 file changed, 5 insertions

[PATCH 4/8] target: Perform PROTECT sanity checks for WRITE_SAME

2015-02-13 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds a call to sbc_check_prot() within sbc_setup_write_same() code to perform the various protection releated sanity checks, including failing if WRPROTECT or RDPROTECT is set for a backend device that has not advertised support for T10-PI. Also, since WRITE_S

[PATCH 3/8] target: Fail I/O with PROTECT bit when protection is unsupported

2015-02-13 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds an explicit check for WRPROTECT + RDPROTECT bit usage within sbc_check_prot(), and fails with TCM_INVALID_CDB_FIELD if the backend device does not have protection enabled. Also, update sbc_check_prot() to return sense_reason_t in order to propigate up the

[PATCH 2/8] target: Check for LBA + sectors wrap-around in sbc_parse_cdb

2015-02-13 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds a check to sbc_parse_cdb() in order to detect when an LBA + sector vs. end-of-device calculation wraps when the LBA is sufficently large enough (eg: 0x). Cc: Martin Petersen Cc: Christoph Hellwig Signed-off-by: Nicholas Bellinger --- d

[PATCH 0/8] target: Fixes for SPC/SBC device emulation

2015-02-13 Thread Nicholas A. Bellinger
From: Nicholas Bellinger Hi all, The following patch series contains a number of target SPC/SBC related emulation fixes that address failures occurring while using Ronnie Sahlberg's excellent libiscsi test suite. The first two are the important ones. Patch #1 adds a missing end-of-device sanit

[PATCH 1/8] target: Add missing WRITE_SAME end-of-device sanity check

2015-02-13 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds a check to sbc_setup_write_same() to verify the incoming WRITE_SAME LBA + number of blocks does not exceed past the end-of-device. Also check for potential LBA wrap-around as well. Reported-by: Bart Van Assche Cc: Martin Petersen Cc: Christoph Hellwig

chelsio: Use a more common const struct pci_device_id foo[] style

2015-02-13 Thread Joe Perches
Chelsio code shares a pci_device_table from an #include file. Make the include guard simpler and make the arrays const. Reduces data by moving tables to text. Removed unnecessary macros: o CH_PCI_DEVICE_ID_TABLE_DEFINE_BEGIN o CH_PCI_DEVICE_ID_TABLE_DEFINE_END o CH_PCI_ID_TABLE_ENTRY (moved to th

Re: [patch 069/104] lib/string_helpers.c:string_get_size(): remove redundant prefixes

2015-02-13 Thread Andrew Morton
On Fri, 13 Feb 2015 16:05:54 -0800 James Bottomley wrote: > @@ -42,31 +44,60 @@ void string_get_size(u64 size, const enum > string_size_units units, > [STRING_UNITS_2] = 1024, > }; > int i, j; > - u32 remainder = 0, sf_cap; > + u32 remainder = 0, sf_cap, exp; >

Re: [patch 069/104] lib/string_helpers.c:string_get_size(): remove redundant prefixes

2015-02-13 Thread James Bottomley
On Thu, 2015-02-12 at 15:55 -0800, Andrew Morton wrote: > On Thu, 12 Feb 2015 15:45:29 -0800 James Bottomley > wrote: > > > ... > > > > > I don't get it. As the man says, this is presently dead code and > > > string_get_size() will need to be changed to work for disks larger than > > > 2^64 byt

Re: [PATCH] [SCSI] bsg: fix unkillable I/O wait deadlock with scsi-mq

2015-02-13 Thread Tony Battersby
On 02/11/2015 11:31 AM, Tony Battersby wrote: > Note: I did a number of tests with this patch, but I do not have any > programs to test commands with bidirectional data transfer. I would > appreciate if someone could test that. Replying to myself, I was able to test bidirectional data transfer us

Re: [PATCH v2 1/2] [SCSI] sg: fix unkillable I/O wait deadlock with scsi-mq

2015-02-13 Thread Douglas Gilbert
On 15-02-13 12:09 PM, Tony Battersby wrote: When using the write()/read() interface for submitting commands, the SCSI generic driver does not call blk_put_request() on a completed SCSI command until userspace calls read() to get the command completion. Since scsi-mq uses a fixed number of preallo

[PATCH v2 2/2] [SCSI] sg: fix EWOULDBLOCK errors with scsi-mq

2015-02-13 Thread Tony Battersby
With scsi-mq enabled, userspace programs can get unexpected EWOULDBLOCK (a.k.a. EAGAIN) errors when submitting commands to the SCSI generic driver. Fix by calling blk_get_request() with GFP_KERNEL instead of GFP_ATOMIC. Note: to avoid introducing a potential deadlock, this patch should be applied

[PATCH v2 1/2] [SCSI] sg: fix unkillable I/O wait deadlock with scsi-mq

2015-02-13 Thread Tony Battersby
When using the write()/read() interface for submitting commands, the SCSI generic driver does not call blk_put_request() on a completed SCSI command until userspace calls read() to get the command completion. Since scsi-mq uses a fixed number of preallocated requests, this makes it possible for us

[Bug 90601] panic on write to 3ware raid array

2015-02-13 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=90601 --- Comment #12 from Alex Elsayed --- Created attachment 166681 --> https://bugzilla.kernel.org/attachment.cgi?id=166681&action=edit Hardware of a second machine with the issue Intel CPUs on an ASUS board - here's the output of lshw on the mach

Re: scsi: Implement per-cpu logging buffer

2015-02-13 Thread Josh Triplett
On Fri, Feb 13, 2015 at 09:48:36AM +0100, Hannes Reinecke wrote: > On 02/12/2015 06:18 PM, Josh Triplett wrote: > > On Thu, Feb 12, 2015 at 02:29:35PM +0100, Hannes Reinecke wrote: > >> On 02/12/2015 01:36 PM, Geert Uytterhoeven wrote: > >>> On Wed, Feb 11, 2015 at 8:16 PM, Linux Kernel Mailing Lis

Re: scsi: Implement per-cpu logging buffer

2015-02-13 Thread Hannes Reinecke
On 02/12/2015 06:18 PM, Josh Triplett wrote: > On Thu, Feb 12, 2015 at 02:29:35PM +0100, Hannes Reinecke wrote: >> On 02/12/2015 01:36 PM, Geert Uytterhoeven wrote: >>> On Wed, Feb 11, 2015 at 8:16 PM, Linux Kernel Mailing List >>> wrote: Gitweb: http://git.kernel.org/linus/;a=commi

[Bug 90601] panic on write to 3ware raid array

2015-02-13 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=90601 --- Comment #11 from mer...@liao.homelinux.org --- I can confirm it's still happening with 3.19 here. @Alex: What server hardware are you using? We are using Supermicro boards and Intel CPUs. -- You are receiving this mail because: You are the a