Re: [PATCH 2/3] xen-scsiback: One function call less in scsiback_device_action() after error detection

2016-07-19 Thread Juergen Gross
On 20/07/16 07:10, SF Markus Elfring wrote: > @@ -606,7 +606,7 @@ static void scsiback_device_action(struct > vscsibk_pend *pending_req, > tmr = kzalloc(sizeof(struct scsiback_tmr), GFP_KERNEL); > if (!tmr) { > target_put_sess_cmd(se_cmd); > - goto

Re: [PATCH 2/3] xen-scsiback: One function call less in scsiback_device_action() after error detection

2016-07-19 Thread SF Markus Elfring
@@ -606,7 +606,7 @@ static void scsiback_device_action(struct vscsibk_pend *pending_req, tmr = kzalloc(sizeof(struct scsiback_tmr), GFP_KERNEL); if (!tmr) { target_put_sess_cmd(se_cmd); - goto err; + goto do_resp; } >>>

Re: [PATCH 2/3] xen-scsiback: One function call less in scsiback_device_action() after error detection

2016-07-19 Thread Juergen Gross
On 19/07/16 16:56, SF Markus Elfring wrote: >>> @@ -606,7 +606,7 @@ static void scsiback_device_action(struct vscsibk_pend >>> *pending_req, >>> tmr = kzalloc(sizeof(struct scsiback_tmr), GFP_KERNEL); >>> if (!tmr) { >>> target_put_sess_cmd(se_cmd); >>> - goto err;

Re: [PATCH 2/3] sd: enable single-threaded I/O submission for zoned devices

2016-07-19 Thread Damien Le Moal
On 7/19/16 23:02, Hannes Reinecke wrote: zoned devices require single-thread I/O submission to guarantee sequential I/O, so enable the block layer flag for it. Signed-off-by: Hannes Reinecke --- drivers/scsi/sd.c | 1 + 1 file changed, 1 insertion(+) Reviewed-by: Damien Le

Re: [PATCH 1/3] block: add flag for single-threaded submission

2016-07-19 Thread Damien Le Moal
On 7/19/16 23:02, Hannes Reinecke wrote: Some devices (most notably SMR drives) support only one I/O stream eg for ensuring ordered I/O submission. This patch adds a new block queue flag 'BLK_QUEUE_SINGLE' to support these devices. Signed-off-by: Hannes Reinecke ---

Re: [PATCH 6/6] block: Add 'BLK_MQ_RQ_QUEUE_DONE' return value

2016-07-19 Thread Damien Le Moal
On 7/19/16 22:20, Hannes Reinecke wrote: Add a return value BLK_MQ_RQ_QUEUE_DONE to terminate a request without error. Signed-off-by: Hannes Reinecke --- block/blk-mq.c | 1 + drivers/scsi/scsi_lib.c | 3 +++ include/linux/blk-mq.h | 1 + 3 files changed, 5

Re: [kbuild-all] [target:master 1/2] drivers/target/target_core_transport.o: warning: objtool: __transport_wait_for_tasks()+0x22: function has unreachable instruction

2016-07-19 Thread Fengguang Wu
Hi Nicholas, Sorry please ignore this one -- it looks like false warning from old gcc 4.4 and 4.6 -- we just enabled old compiler tests which triggered 10k these warnings.. Thanks, Fengguang On Tue, Jul 19, 2016 at 09:43:35PM +0800, kbuild test robot wrote: tree:

Re: [PATCH 5/6] block: Introduce BLKPREP_DONE

2016-07-19 Thread Damien Le Moal
On 7/19/16 22:20, Hannes Reinecke wrote: Add a new blkprep return code BLKPREP_DONE to signal completion without I/O error. Signed-off-by: Hannes Reinecke --- block/blk-core.c| 6 +- drivers/scsi/scsi_lib.c | 1 + include/linux/blkdev.h | 1 + 3 files changed, 7

Re: [PATCH 3/6] block: Implement support for zoned block devices

2016-07-19 Thread Damien Le Moal
On 7/19/16 22:20, Hannes Reinecke wrote: Implement a RB-Tree holding the zone information and add support functions for maintaining the RB-Tree. Signed-off-by: Hannes Reinecke --- block/Kconfig | 9 +++ block/Makefile | 1 + block/blk-core.c | 5

Re: [PATCH 2/6] block: update chunk_sectors in blk_stack_limits()

2016-07-19 Thread Damien Le Moal
On 7/19/16 22:20, Hannes Reinecke wrote: Signed-off-by: Hannes Reinecke --- block/blk-settings.c | 4 1 file changed, 4 insertions(+) Reviewed-by: Damien Le Moal Tested-by: Damien Le Moal -- Damien Le Moal, Ph.D. Sr.

Re: [PATCH 1/6] blk-sysfs: Add 'chunk_sectors' to sysfs attributes

2016-07-19 Thread Damien Le Moal
On 7/19/16 22:20, Hannes Reinecke wrote: The queue limits already have a 'chunk_sectors' setting, so we should be presenting it via sysfs. Signed-off-by: Hannes Reinecke --- block/blk-sysfs.c | 11 +++ 1 file changed, 11 insertions(+) Reviewed-by: Damien Le Moal

Re: [PATCH 1/5] sd: configure ZBC devices

2016-07-19 Thread Damien Le Moal
On 7/19/16 22:25, Hannes Reinecke wrote: For ZBC devices I/O must not cross zone boundaries, so setup the 'chunk_sectors' block queue setting to the zone size. This is only valid for REPORT ZONES SAME type 2 or 3; for other types the zone sizes might be different for individual zones. So issue

Re: [PATCH 3/5] sd: Implement support for ZBC devices

2016-07-19 Thread Damien Le Moal
On 7/19/16 22:25, Hannes Reinecke wrote: Implement ZBC support functions to read in the zone information and setup the zone tree. Signed-off-by: Hannes Reinecke --- drivers/scsi/Kconfig | 8 + drivers/scsi/Makefile | 1 + drivers/scsi/sd.c | 129 ++--

Re: [PATCH 2/5] sd: Implement new RESET_WP provisioning mode

2016-07-19 Thread Damien Le Moal
Hi Hannes, On 7/19/16 22:25, Hannes Reinecke wrote: We can map the RESET WRITE POINTER command onto a 'discard' request. Signed-off-by: Hannes Reinecke --- drivers/scsi/sd.c | 65 --- drivers/scsi/sd.h | 1 + 2 files changed,

Re: [BUG] Slab corruption during XFS writeback under memory pressure

2016-07-19 Thread Dave Chinner
On Tue, Jul 19, 2016 at 02:22:47PM -0700, Calvin Owens wrote: > On 07/18/2016 07:05 PM, Calvin Owens wrote: > >On 07/17/2016 11:02 PM, Dave Chinner wrote: > >>On Sun, Jul 17, 2016 at 10:00:03AM +1000, Dave Chinner wrote: > >>>On Fri, Jul 15, 2016 at 05:18:02PM -0700, Calvin Owens wrote: >

Re: [PATCH v4] libata-scsi: minor cleanup in ata_mselect_*()

2016-07-19 Thread Tom Yan
Wrongly marked this as a "v4". It's actually a "v1". On 20 July 2016 at 05:11, wrote: > From: Tom Yan > > 1. Removed a repeated bit masking in ata_mselect_control() > 2. Moved `wce`/`d_sense` assignment below the page validity checks > 3. Added/Removed

[PATCH v2] libata-scsi: fix read-only bits checking in ata_mselect_*()

2016-07-19 Thread tom . ty89
From: Tom Yan Commit 7780081c1f04 ("libata-scsi: Set information sense field for invalid parameter") changed how ata_mselect_*() make sure read-only bits are not modified. The new implementation introduced a bug that the read-only bits in the byte that has a changeable bit

Re: [PATCH] libata-scsi: fix read-only bits checking in ata_mselect_*()

2016-07-19 Thread Tom Yan
Oops I put the wrong action under the opposite condition. Sending a v2. On 20 July 2016 at 06:50, wrote: > From: Tom Yan > > Commit 7780081c1f04 ("libata-scsi: Set information sense field for > invalid parameter") changed how ata_mselect_*() make sure

[PATCH] libata-scsi: fix read-only bits checking in ata_mselect_*()

2016-07-19 Thread tom . ty89
From: Tom Yan Commit 7780081c1f04 ("libata-scsi: Set information sense field for invalid parameter") changed how ata_mselect_*() make sure read-only bits are not modified. The new implementation introduced a bug that the read-only bits in the byte that has a changeable bit

Re: [BUG] Slab corruption during XFS writeback under memory pressure

2016-07-19 Thread Calvin Owens
On 07/18/2016 07:05 PM, Calvin Owens wrote: On 07/17/2016 11:02 PM, Dave Chinner wrote: On Sun, Jul 17, 2016 at 10:00:03AM +1000, Dave Chinner wrote: On Fri, Jul 15, 2016 at 05:18:02PM -0700, Calvin Owens wrote: Hello all, I've found a nasty source of slab corruption. Based on seeing similar

[PATCH v4] libata-scsi: minor cleanup in ata_mselect_*()

2016-07-19 Thread tom . ty89
From: Tom Yan 1. Removed a repeated bit masking in ata_mselect_control() 2. Moved `wce`/`d_sense` assignment below the page validity checks 3. Added/Removed empty lines where appropriate Signed-off-by: Tom Yan diff --git a/drivers/ata/libata-scsi.c

Re: [PATCH v4] libata-scsi: better style in ata_msense_*()

2016-07-19 Thread Tom Yan
FWIW, I end up using `bool d_sense = (dev->flags & ATA_DFLAG_D_SENSE)`, which was introduced to ata_scsi_set_sense() in commit 06dbde5f3a44 ("libata: Implement control mode page to select sense format"), in the polished ata_msense_control(). @Sergei, I kept the parentheses for the bit

[PATCH v4] libata-scsi: better style in ata_msense_*()

2016-07-19 Thread tom . ty89
From: Tom Yan `changeable` is the "version" of mode page requested by the user. It will be less confusing/misleading if we do not check it "together" with the setting bits of the drive. Not to mention that we currently have ata_mselect_*() implemented in a way that each of

Re: [net-next v2 1/6] libcxgb: add library module for Chelsio drivers

2016-07-19 Thread David Miller
From: Varun Prakash Date: Sat, 16 Jul 2016 22:49:15 +0530 > } > + > +static int __init libcxgb_init(void) > +{ > + return 0; > +} > + > +static void __exit libcxgb_exit(void) > +{ > +} > + > +module_init(libcxgb_init); > +module_exit(libcxgb_exit); If these functions

Re: [PATCH 1/2] lpfc: call lpfc_sli_validate_fcp_iocb() with the hbalock held

2016-07-19 Thread James Smart
The check is better and is fine to accept. However, in reviewing the code, there may still be some raciness as some of the fields validated aren't set under lock. We'll look deeper. Regardless, holding the lock while counting is a very good thing to do. Signed-off-by: James Smart

Re: [PATCH 2/3] xen-scsiback: One function call less in scsiback_device_action() after error detection

2016-07-19 Thread SF Markus Elfring
>> @@ -606,7 +606,7 @@ static void scsiback_device_action(struct vscsibk_pend >> *pending_req, >> tmr = kzalloc(sizeof(struct scsiback_tmr), GFP_KERNEL); >> if (!tmr) { >> target_put_sess_cmd(se_cmd); >> -goto err; >> +goto do_resp; >> } > >

[PATCH 3/3] dm-zoned: New device mapper target for zoned block devices

2016-07-19 Thread Hannes Reinecke
From: Damien Le Moal dm-zoned presents a regular block device fully randomly writeable, hiding write constraints of host-managed zoned block devices and mitigating potential performance degradation of host-aware devices. Signed-off-by: Damien Le Moal

[PATCH 2/3] sd: enable single-threaded I/O submission for zoned devices

2016-07-19 Thread Hannes Reinecke
zoned devices require single-thread I/O submission to guarantee sequential I/O, so enable the block layer flag for it. Signed-off-by: Hannes Reinecke --- drivers/scsi/sd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index

[PATCH 1/3] block: add flag for single-threaded submission

2016-07-19 Thread Hannes Reinecke
Some devices (most notably SMR drives) support only one I/O stream eg for ensuring ordered I/O submission. This patch adds a new block queue flag 'BLK_QUEUE_SINGLE' to support these devices. Signed-off-by: Hannes Reinecke --- block/blk-core.c | 2 ++ include/linux/blkdev.h |

[PATCH 0/3] dm-zoned target for ZBC devices

2016-07-19 Thread Hannes Reinecke
Hi all, this patchset implements a 'dm-zoned' device-mapper target to handle ZBC host-managed (and host-aware) devices as 'normal' disks. Patch has been made over Tejuns 'libata/for-4.8' repository. It relies on the patchsets "Support for zoned block devices" and "Add support for ZBC

Re: [net-next v2 6/6] cxgb3i,cxgb4i: fix symbol not declared sparse warning

2016-07-19 Thread kbuild test robot
Hi, [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/Varun-Prakash/common-library-for-Chelsio-drivers/20160717-012538 config: x86_64-randconfig-s2-07191802 (attached as .config) compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7 reproduce: # save the

[target:master 1/2] drivers/target/target_core_transport.o: warning: objtool: __transport_wait_for_tasks()+0x22: function has unreachable instruction

2016-07-19 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git master head: 39993fc9aebdf68a25134b140447b335a2418a76 commit: 15ce22fa491aa3bab7acd89ac40a9fc27aeed915 [1/2] target: Fix for hang of Ordered task in TCM config: x86_64-randconfig-a0-07191719 (attached as .config)

[PATCH 1/5] sd: configure ZBC devices

2016-07-19 Thread Hannes Reinecke
For ZBC devices I/O must not cross zone boundaries, so setup the 'chunk_sectors' block queue setting to the zone size. This is only valid for REPORT ZONES SAME type 2 or 3; for other types the zone sizes might be different for individual zones. So issue a warning if the type is found to be

[PATCH 3/5] sd: Implement support for ZBC devices

2016-07-19 Thread Hannes Reinecke
Implement ZBC support functions to read in the zone information and setup the zone tree. Signed-off-by: Hannes Reinecke --- drivers/scsi/Kconfig | 8 + drivers/scsi/Makefile | 1 + drivers/scsi/sd.c | 129 ++-- drivers/scsi/sd.h | 54 +

[PATCH 4/5] sd: Limit messages for ZBC disks capacity change

2016-07-19 Thread Hannes Reinecke
From: Damien Le Moal For ZBC disks with RC_BASIS=0, limit the message indicating the capacity adjustment to the disk first scan. Signed-off-by: Damien Le Moal --- drivers/scsi/sd.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-)

[PATCH 5/5] sd_zbc: Fix handling of ZBC read after write pointer

2016-07-19 Thread Hannes Reinecke
From: Damien Le Moal For read requests beyond a sequential write required zone write pointer, zero-out the request buffer and directly complete the command. For read requests straddling the write pointer position, limit the request size to the number of valid sectors. The

[PATCH 2/5] sd: Implement new RESET_WP provisioning mode

2016-07-19 Thread Hannes Reinecke
We can map the RESET WRITE POINTER command onto a 'discard' request. Signed-off-by: Hannes Reinecke --- drivers/scsi/sd.c | 65 --- drivers/scsi/sd.h | 1 + 2 files changed, 53 insertions(+), 13 deletions(-) diff --git

[PATCH] scsi: introduce a quirk for false cache reporting

2016-07-19 Thread Oliver Neukum
Some SATA to USB bridges fail to cooperate with some drives resulting in no cache being present being reported to the host. That causes the host to skip sending a command to synchronize caches. That causes data loss when the drive is powered down. Signed-off-by: Oliver Neukum

[PATCH 0/5] Add support for ZBC host-managed devices

2016-07-19 Thread Hannes Reinecke
Hi James, this patchset adds support for ZBC host-managed devices to sd. Support for it is selected with the new 'SCSI_ZBC' config option. Patch has been made over Tejuns 'libata/for-4.8' repository. It relies on the patchset "Support for zoned block devices" posted earlier. As usual, comments

[PATCH 2/6] block: update chunk_sectors in blk_stack_limits()

2016-07-19 Thread Hannes Reinecke
Signed-off-by: Hannes Reinecke --- block/blk-settings.c | 4 1 file changed, 4 insertions(+) diff --git a/block/blk-settings.c b/block/blk-settings.c index f679ae1..bfaf579 100644 --- a/block/blk-settings.c +++ b/block/blk-settings.c @@ -630,6 +630,10 @@ int

[PATCH 5/6] block: Introduce BLKPREP_DONE

2016-07-19 Thread Hannes Reinecke
Add a new blkprep return code BLKPREP_DONE to signal completion without I/O error. Signed-off-by: Hannes Reinecke --- block/blk-core.c| 6 +- drivers/scsi/scsi_lib.c | 1 + include/linux/blkdev.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git

[PATCH 1/6] blk-sysfs: Add 'chunk_sectors' to sysfs attributes

2016-07-19 Thread Hannes Reinecke
The queue limits already have a 'chunk_sectors' setting, so we should be presenting it via sysfs. Signed-off-by: Hannes Reinecke --- block/blk-sysfs.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index 9920596..73200b8

[PATCH 4/6] block: Add 'zoned' sysfs queue attribute

2016-07-19 Thread Hannes Reinecke
Add a sysfs queue attribute 'zoned' to display the zone layout for zoned devices. Signed-off-by: Hannes Reinecke --- block/blk-sysfs.c | 46 ++ 1 file changed, 46 insertions(+) diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index

[PATCH 0/6] Support for zoned block devices

2016-07-19 Thread Hannes Reinecke
Hi Jens, this patchset adds support for zoned block devices to the block layer. Support for it is selected with the new 'BLK_DEV_ZONED' config option. Patch has been made over Tejuns 'libata/for-4.8' repository. As usual, comments and reviews are welcome. Hannes Reinecke (6): blk-sysfs: Add

[PATCH 6/6] block: Add 'BLK_MQ_RQ_QUEUE_DONE' return value

2016-07-19 Thread Hannes Reinecke
Add a return value BLK_MQ_RQ_QUEUE_DONE to terminate a request without error. Signed-off-by: Hannes Reinecke --- block/blk-mq.c | 1 + drivers/scsi/scsi_lib.c | 3 +++ include/linux/blk-mq.h | 1 + 3 files changed, 5 insertions(+) diff --git a/block/blk-mq.c

[PATCH 3/6] block: Implement support for zoned block devices

2016-07-19 Thread Hannes Reinecke
Implement a RB-Tree holding the zone information and add support functions for maintaining the RB-Tree. Signed-off-by: Hannes Reinecke --- block/Kconfig | 9 +++ block/Makefile | 1 + block/blk-core.c | 5 block/blk-zoned.c | 70

[PATCH] tcm_fc: set and unset FCP_SPPF_TARG_FCN

2016-07-19 Thread Hannes Reinecke
When registering and unregistering as an target port we should be setting the FC-4 service params correctly. Signed-off-by: Hannes Reinecke --- drivers/target/tcm_fc/tfc_sess.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/target/tcm_fc/tfc_sess.c

Re: [PATCH 2/2] fcoe: implement FIP VLAN responder

2016-07-19 Thread Johannes Thumshirn
On Tue, Jul 19, 2016 at 01:49:40PM +0200, Hannes Reinecke wrote: > When running in VN2VN mode there is no central instance which > would send out any FIP VLAN discovery notifications. So this > patch adds a new sysfs attribute 'fip_vlan_responder' which > will activate a FIP VLAN discovery

Re: [PATCH 1/2] fcoe: Rename 'fip_frame' to 'fip_vn2vn_notify_frame'

2016-07-19 Thread Johannes Thumshirn
On Tue, Jul 19, 2016 at 01:49:39PM +0200, Hannes Reinecke wrote: > Do not use a generic name to avoid confusions with other > usages. > > Signed-off-by: Hannes Reinecke Very nice :-) Acked-by: Johannes Thumshirn -- Johannes Thumshirn

[PATCH 2/2] fcoe: implement FIP VLAN responder

2016-07-19 Thread Hannes Reinecke
When running in VN2VN mode there is no central instance which would send out any FIP VLAN discovery notifications. So this patch adds a new sysfs attribute 'fip_vlan_responder' which will activate a FIP VLAN discovery responder. Signed-off-by: Hannes Reinecke ---

[PATCH 1/2] fcoe: Rename 'fip_frame' to 'fip_vn2vn_notify_frame'

2016-07-19 Thread Hannes Reinecke
Do not use a generic name to avoid confusions with other usages. Signed-off-by: Hannes Reinecke --- drivers/scsi/fcoe/fcoe_ctlr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/fcoe/fcoe_ctlr.c b/drivers/scsi/fcoe/fcoe_ctlr.c index

[RFC] scsi: ufs: add support for BLKSECDISCARD

2016-07-19 Thread Pawel Wodkowski
Add BLKSECDISCAD feature support if LU is provisioned for TPRZ (bProvisioningType = 3). To perform BLKSECDISCAD driver issue purge operation after each discard SCSI command with REQ_SECURE flag set, and delay calling scsi_done() till purge finish. This operation might long so block requests from