Re: [PATCH v2] target/file: add support of direct and async I/O

2018-05-07 Thread Bryant G. Ly
n a separate file, and it is another non-trivial >> task how to synchronize writing in two files, so that a following read >> operation always returns a consisten metadata for a specified block. >> >> v2: fix comments from Christoph Hellwig >> >> Cc: "Nicholas

[PATCH v2] target: Fix Fortify_panic kernel exception

2018-04-17 Thread Bryant G. Ly
t/iblock: Convert WRITE_SAME to blkdev_issue_zeroout") Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> Reviewed-by: Steven Royer <sero...@linux.vnet.ibm.com> Tested-by: Taylor Jakobson <tjak...@us.ibm.com> Cc: Christoph Hellwig <h...@lst.de> Cc: Nicholas Bell

Re: [PATCH] target: Fix Fortify_panic kernel exception

2018-04-17 Thread Bryant G. Ly
On 4/13/18 11:44 AM, Christoph Hellwig wrote: > The patch looks fine, but in general I think descriptions of what > you fixed in the code or more important than starting out with > a backtrace. > > E.g. please explain what was wrong, how you fixed it and only after > that mention how it was

[PATCH] target: Fix Fortify_panic kernel exception

2018-04-12 Thread Bryant G. Ly
ere the size passed into memcmp is greater than the size of the data passed in from ptr1 or ptr2 then a fortify_panic is posted. Fixes: 2237498f0b5c ("target/iblock: Convert WRITE_SAME to blkdev_issue_zeroout") Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> Rev

Re: [PATCH v2] target/file: add support of direct and async I/O

2018-03-22 Thread Bryant G. Ly
for f_op->read/write: https://patchwork.kernel.org/patch/9580365/ That patch was queued up for 4.11 so I guess if anyone tried to port this patch back they would hit issues if they didn't use f_op. Reviewed-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> -Bryant

Re: [PATCH] [RFC] target/file: add support of direct and async I/O

2018-03-15 Thread Bryant G. Ly
Bellinger" <n...@linux-iscsi.org> > Signed-off-by: Andrei Vagin <ava...@openvz.org> > --- > drivers/target/target_core_file.c | 124 > -- > drivers/target/target_core_file.h | 1 + > 2 files changed, 120 insertions(+), 5 delet

Re: [PATCH] tcmu: Allow reconfig to handle multiple attributes

2018-01-29 Thread Bryant G. Ly
On 1/10/18 12:26 PM, Mike Christie wrote: > On 01/04/2018 10:11 AM, Bryant G. Ly wrote: >> This patch allows for multiple attributes to be reconfigured >> and handled all in one call as compared to multiple netlinks. >> >> Example: >> set attribute dev_reconfig=d

[PATCH] tcmu: Allow reconfig to handle multiple attributes

2018-01-04 Thread Bryant G. Ly
This patch allows for multiple attributes to be reconfigured and handled all in one call as compared to multiple netlinks. Example: set attribute dev_reconfig=dev_config=fbo//home/path:dev_size=2147483648 Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> --- drivers/

[PATCH] ibmvscsis: add DRC indices to debug statements

2017-12-04 Thread Bryant G. Ly
Where applicable, changes pr_debug, pr_info, pr_err, etc. calls to the dev_* versions. This adds the DRC index of the device to the corresponding trace statement. Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> Signed-off-by: Brad Warrum <bwar...@us.ibm.com> ---

Re: [PATCH 2/8] target: remove iblock WRITE_SAME passthrough support

2017-11-14 Thread Bryant G. Ly
On 4/12/17 12:30 AM, Nicholas A. Bellinger wrote: > On Mon, 2017-04-10 at 18:08 +0200, Christoph Hellwig wrote: >> Use the pscsi driver to support arbitrary command passthrough >> instead. >> > The people who are actively using iblock_execute_write_same_direct() are > doing so in the context of

Re: [PATCH] tcmu: clean up the scatter helper

2017-11-08 Thread Bryant G. Ly
> On 11/08/2017 04:39 PM, Bryant G. Ly wrote: >> On 7/30/17 5:19 PM, Nicholas A. Bellinger wrote: >> >>> On Thu, 2017-07-13 at 14:33 +0800, lixi...@cmss.chinamobile.com wrote: >>>> From: Xiubo Li <lixi...@cmss.chinamobile.com> >>>> >

Re: [PATCH] tcmu: Oops in unmap_thread_fn()

2017-11-08 Thread Bryant G. Ly
On 8/6/17 6:27 PM, Nicholas A. Bellinger wrote: > On Tue, 2017-08-01 at 23:09 +0300, Dan Carpenter wrote: >> Calling list_del() on the iterator pointer in list_for_each_entry() will >> cause an oops. We need to user the _safe() version for that. >> >> Fixes: c73d02f63c16 ("tcmu: Add fifo type

Re: [PATCH] tcmu: clean up the scatter helper

2017-11-08 Thread Bryant G. Ly
On 7/30/17 5:19 PM, Nicholas A. Bellinger wrote: > On Thu, 2017-07-13 at 14:33 +0800, lixi...@cmss.chinamobile.com wrote: >> From: Xiubo Li >> >> Add some comments to make the scatter code to be more readable. >> >> Signed-off-by: Xiubo Li

Re: [PATCHv2] tcmu: Add fifo type waiter list support to avoid starvation

2017-11-08 Thread Bryant G. Ly
On 7/30/17 5:10 PM, Nicholas A. Bellinger wrote: > Hi Xiubo, > > Apologies for the delayed response. Comments below. > > On Wed, 2017-07-12 at 15:16 +0800, lixi...@cmss.chinamobile.com wrote: >> From: Xiubo Li >> >> The fifo type waiter list will hold the udevs

Re: [PATCH 1/6] target: Fix QUEUE_FULL + SCSI task attribute handling

2017-11-08 Thread Bryant G. Ly
t; matching what target_execute_cmd() does. > > Cc: Michael Cyr <mike...@linux.vnet.ibm.com> > Cc: Bryant G. Ly <bryan...@linux.vnet.ibm.com> > Cc: Mike Christie <mchri...@redhat.com> > Cc: Hannes Reinecke <h...@suse.com> > Signed-off-by: Nicholas Bellinger <n...@linux-iscsi.org> > --- > Reviewed-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com>

Re: [PATCH 3/6] target: Fix quiese during transport_write_pending_qf endless loop

2017-11-08 Thread Bryant G. Ly
hristie <mchri...@redhat.com> > Cc: Hannes Reinecke <h...@suse.com> > Cc: Bryant G. Ly <bryan...@linux.vnet.ibm.com> > Cc: Michael Cyr <mike...@linux.vnet.ibm.com> > Cc: Potnuri Bharat Teja <bha...@chelsio.com> > Cc: Sagi Grimberg <s...@grimberg.m

Re: [PATCH] ibmvscsis: Fix write_pending failure path

2017-10-03 Thread Bryant G. Ly
On 10/2/17 9:51 PM, Martin K. Petersen wrote: Bryant, For write_pending if the queue is down or client failed then return -EIO so that LIO can properly process the completed command. Prior we returned 0 since LIO could not handle it properly. Now with: target: Fix unknown fabric callback

[PATCH] ibmvscsis: Fix write_pending failure path

2017-10-02 Thread Bryant G. Ly
From: "Bryant G. Ly" <b...@us.ibm.com> For write_pending if the queue is down or client failed then return -EIO so that LIO can properly process the completed command. Prior we returned 0 since LIO could not handle it properly. Now with: target: Fix unknown fabric callback q

Re: [PATCHv2] tcmu: Fix possbile memory leak when recalculating the cmd base size

2017-07-11 Thread Bryant G. Ly
his, just memset all the entry memory before using it, and also to be more readable we adjust the bidi code. Fixed: fe25cc34795(tcmu: Recalculate the tcmu_cmd size to save cmd area memories) Reported-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> Tested-by: Damien Le Moal <dam

Re: [PATCH 0/5] target: Zoned block device support and bug fixes

2017-06-28 Thread Bryant G. Ly
This series introduce zoned block device support for the pscsi backstore and also fixes several problems with sense data handling for failed requests. The first patch is only a cleanup, so not really necessary but nice to have I think. Patch 2 and 3 introduce support for host managed zoned

Re: [PATCH] configfs: Fix race between create_link and configfs_rmdir

2017-06-08 Thread Bryant G. Ly
Thanks Nic, applied to the configfs-for-next tree. I'm not entirely sure if we should bother adding this to 4.12 or if it hits rarely enough? It hits for us pretty often when we have a GPFS setup with 10 hosts and 1k+ vms. That is how we discovered the bug in the first place. -Bryant

Re: [PATCH 2/7] scsi: ibmvscsi_tgt: remove use of class_attrs

2017-06-08 Thread Bryant G. Ly
The class_attrs pointer is going away and it's not even being used in this driver, so just remove it entirely. Cc: "Bryant G. Ly" <bryan...@linux.vnet.ibm.com> Cc: Michael Cyr <mike...@linux.vnet.ibm.com> Cc: "James E.J. Bottomley" <j...@linux.vn

[PATCH v1] ibmvscsis: Use tpgt passed in by user

2017-06-06 Thread Bryant G. Ly
ibmvscsis always returned 0 for the tpg/tag, since it did not parse the value passed in by the user. When functions like ALUA members exports the value, it will be incorrect because targetcli/rtslib starts the tpg numbering at 1. Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com>

[PATCH v4 3/5] tcmu: Make dev_size configurable via userspace

2017-06-06 Thread Bryant G. Ly
Allow tcmu backstores to be able to set the device size after it has been configured via set attribute. Part of support in userspace to support certain backstores changing device size. Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> --- drivers/target/target_core_user.

[PATCH v4 5/5] tcmu: Add Type of reconfig into netlink

2017-06-06 Thread Bryant G. Ly
This patch adds more info about the attribute being changed, so that usersapce can easily figure out what is happening. Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> --- drivers/target/target_core_user.c | 20 ++-- include/uapi/linux/target_core_user.

[PATCH v4 4/5] tcmu: Make dev_config configurable

2017-06-06 Thread Bryant G. Ly
This allows for userspace to change the device path after it has been created. Thus giving the user the ability to change the path. The use case for this is to allow for virtual optical to have media change. Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> --- drivers/

[PATCH v4 2/5] tcmu: Add netlink for device reconfiguration

2017-06-06 Thread Bryant G. Ly
This gives tcmu the ability to handle events that can cause reconfiguration, such as resize, path changes, write_cache, etc... Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> Reviewed-By: Mike Christie <mchri...@redhat.com> --- drivers/target/target_core_use

[PATCH v4 0/5] tcmu: Add Type of reconfig into netlink

2017-06-06 Thread Bryant G. Ly
From: "Bryant G. Ly" <b...@us.ibm.com> This patch consists of adding a netlink to allow for reconfiguration of a device in tcmu. It also changes and adds some attributes that are reconfigurable: write_cache, device size, and device path. V2 - Fixes kfree in tcmu: Make dev_config

[PATCH v4 1/5] tcmu: Support emulate_write_cache

2017-06-06 Thread Bryant G. Ly
This will enable the toggling of write_cache in tcmu through targetcli-fb Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> Reviewed-By: Mike Christie <mchri...@redhat.com> --- drivers/target/target_core_user.c | 30 ++ 1 file changed, 30 inserti

[PATCH v3 4/5] tcmu: Make dev_config configurable

2017-05-31 Thread Bryant G. Ly
This allows for userspace to change the device path after it has been created. Thus giving the user the ability to change the path. The use case for this is to allow for virtual optical to have media change. v3 - Fix kree spelling error to kfree Signed-off-by: Bryant G. Ly <br

[PATCH v2 1/5] tcmu: Support emulate_write_cache

2017-05-30 Thread Bryant G. Ly
This will enable the toggling of write_cache in tcmu through targetcli-fb Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> Reviewed-By: Mike Christie <mchri...@redhat.com> --- drivers/target/target_core_user.c | 30 ++ 1 file changed, 30 inserti

[PATCH v2 5/5] tcmu: Add Type of reconfig into netlink

2017-05-30 Thread Bryant G. Ly
This patch adds more info about the attribute being changed, so that usersapce can easily figure out what is happening. Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> --- drivers/target/target_core_user.c | 27 +-- include/uapi/linux/target_core_user.

[PATCH v2 0/5] TCMU Enable Reconfiguration Patches

2017-05-30 Thread Bryant G. Ly
This patch consists of adding a netlink to allow for reconfiguration of a device in tcmu. It also changes and adds some attributes that are reconfigurable: write_cache, device size, and device path. Bryant G. Ly (5): tcmu: Support emulate_write_cache tcmu: Add netlink for device

[PATCH v2 2/5] tcmu: Add netlink for device reconfiguration

2017-05-30 Thread Bryant G. Ly
This gives tcmu the ability to handle events that can cause reconfiguration, such as resize, path changes, write_cache, etc... Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> Reviewed-By: Mike Christie <mchri...@redhat.com> --- drivers/target/target_core_use

[PATCH v2 4/5] tcmu: Make dev_config configurable

2017-05-30 Thread Bryant G. Ly
This allows for userspace to change the device path after it has been created. Thus giving the user the ability to change the path. The use case for this is to allow for virtual optical to have media change. Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> --- drivers/

[PATCH v2 3/5] tcmu: Make dev_size configurable via userspace

2017-05-30 Thread Bryant G. Ly
Allow tcmu backstores to be able to set the device size after it has been configured via set attribute. Part of support in userspace to support certain backstores changing device size. Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> --- drivers/target/target_core_user.

[PATCH v1 4/4] tcmu: Make dev_config configurable

2017-05-26 Thread Bryant G. Ly
This allows for userspace to change the device path after it has been created. Thus giving the user the ability to change the path. The use case for this is to allow for virtual optical to have media change. Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> --- drivers/

[PATCH v1 1/4] tcmu: Support emulate_write_cache

2017-05-26 Thread Bryant G. Ly
This will enable the toggling of write_cache in tcmu through targetcli-fb Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> Reviewed-By: Mike Christie <mchri...@redhat.com> --- drivers/target/target_core_user.c | 30 ++ 1 file changed, 30 inserti

[PATCH v1 3/4] tcmu: Make dev_size configurable via userspace

2017-05-26 Thread Bryant G. Ly
Allow tcmu backstores to be able to set the device size after it has been configured via set attribute. Part of support in userspace to support certain backstores changing device size. Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> --- drivers/target/target_core_user.

[PATCH v1 0/4] TCMU Enable Reconfiguration Patches

2017-05-26 Thread Bryant G. Ly
This patch consists of adding a netlink to allow for reconfiguration of a device in tcmu. It also changes and adds some attributes that are reconfigurable: write_cache, device size, and device path. Bryant G. Ly (4): tcmu: Support emulate_write_cache tcmu: Add netlink for device

[PATCH v1 2/4] tcmu: Add netlink for device reconfiguration

2017-05-26 Thread Bryant G. Ly
This gives tcmu the ability to handle events that can cause reconfiguration, such as resize, path changes, write_cache, etc... Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> Reviewed-By: Mike Christie <mchri...@redhat.com> --- drivers/target/target_core_use

[PATCH] ibmvscsis: Enable Logical Partition Migration Support

2017-05-16 Thread Bryant G. Ly
inally another new VIOCTL to let phyp know once we're ready for the Suspend. Signed-off-by: Michael Cyr <mike...@us.ibm.com> Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> --- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 148 --- drivers/scsi/ibmvscsi_

Re: [PATCH v1] ibmvscsis: Fix cleaning up pointers

2017-05-11 Thread Bryant G. Ly
On 5/9/17 10:45 PM, Nicholas A. Bellinger wrote: On Tue, 2017-05-09 at 11:50 -0500, Bryant G. Ly wrote: This patch is dependent on: 'commit 25e78531268e ("ibmvscsis: Do not send aborted task response")' This patch cleans up some pointers after usage. Signed-off-by: Bryant G.

[PATCH v2] ibmvscsis: Fix the incorrect req_lim_delta

2017-05-10 Thread Bryant G. Ly
can send a new command, and we could find ourselves short of command elements. Not likely, but could happen. This patch depends on both: commit 25e78531268e ("ibmvscsis: Do not send aborted task response") commit 38b2788edbd6 ("ibmvscsis: Clear left-over abort_cmd pointers")

[PATCH v1] ibmvscsis: Fix the incorrect req_lim_delta

2017-05-10 Thread Bryant G. Ly
ed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> Reviewed-by: Michael Cyr <mike...@linux.vnet.ibm.com> Cc: <sta...@vger.kernel.org> # v4.8+ --- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) d

[PATCH v1] ibmvscsis: Fix cleaning up pointers

2017-05-09 Thread Bryant G. Ly
This patch is dependent on: 'commit 25e78531268e ("ibmvscsis: Do not send aborted task response")' This patch cleans up some pointers after usage. Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> Reviewed-by: Michael Cyr <mike...@linux.vnet.ibm.com> Cc: <sta..

[PATCH v4] ibmvscsis: Do not send aborted task response

2017-05-08 Thread Bryant G. Ly
to reset the cmd->abort_cmd pointer after finding it in send_messages. Cc: <sta...@vger.kernel.org> # v4.8+ Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> Signed-off-by: Michael Cyr <mike...@linux.vnet.ibm.com> --- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 117 +++

[PATCH v3] ibmvscsis: Do not send aborted task response

2017-05-05 Thread Bryant G. Ly
Cc: <sta...@vger.kernel.org> # v4.8+ Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> Signed-off-by: Michael Cyr <mike...@linux.vnet.ibm.com> --- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 114 --- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.h | 2 + 2 fi

Re: [PATCH v2] ibmvscsis: Do not send aborted task response

2017-05-04 Thread Bryant G. Ly
On 5/3/17 1:55 PM, Bryant G. Ly wrote: On 5/3/17 11:38 AM, Bryant G. Ly wrote: Hi Nick, On 5/2/17 10:43 PM, Nicholas A. Bellinger wrote: On Tue, 2017-05-02 at 13:54 -0500, Bryant G. Ly wrote: The driver is sending a response to the actual scsi op that was aborted by an abort task TM

Re: [PATCH v2] ibmvscsis: Do not send aborted task response

2017-05-03 Thread Bryant G. Ly
On 5/3/17 11:38 AM, Bryant G. Ly wrote: Hi Nick, On 5/2/17 10:43 PM, Nicholas A. Bellinger wrote: On Tue, 2017-05-02 at 13:54 -0500, Bryant G. Ly wrote: The driver is sending a response to the actual scsi op that was aborted by an abort task TM, while LIO is sending a response to the abort

Re: [PATCH v2] ibmvscsis: Do not send aborted task response

2017-05-03 Thread Bryant G. Ly
Hi Nick, On 5/2/17 10:43 PM, Nicholas A. Bellinger wrote: On Tue, 2017-05-02 at 13:54 -0500, Bryant G. Ly wrote: The driver is sending a response to the actual scsi op that was aborted by an abort task TM, while LIO is sending a response to the abort task TM. ibmvscsis_tgt does not send

[PATCH v2] ibmvscsis: Do not send aborted task response

2017-05-02 Thread Bryant G. Ly
spec says that the initiator that sends the abort task TM NEVER gets a response to the aborted op and with the current code it will send a response. Thus this fix will remove that response if the TAS bit is set. Cc: <sta...@vger.kernel.org> # v4.8+ Signed-off-by: Bryant G. Ly

[PATCH v3] target/user: PGR Support

2017-04-21 Thread Bryant G. Ly
This adds initial PGR support for just TCMU, since tcmu doesn't have the necessary IT_NEXUS info to process PGR in userspace, so have those commands be processed in kernel. HA support is not available yet, we will work on it if this patch is acceptable. Signed-off-by: Bryant G. Ly <br

[PATCH v2] target/user: PGR Support

2017-04-21 Thread Bryant G. Ly
This adds initial PGR support for just TCMU, since tcmu doesn't have the necessary IT_NEXUS info to process PGR in userspace, so have those commands be processed in kernel. HA support is not available yet, we will work on it if this patch is acceptable. Signed-off-by: Bryant G. Ly <br

[PATCH] target: Add WRITE_VERIFY_16

2017-04-18 Thread Bryant G. Ly
This patch addresses clients who needs write_verify_16 for large volume groups such as AIX. Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> --- drivers/target/target_core_sbc.c | 2 ++ include/scsi/scsi_proto.h| 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/

[PATCH] ibmvscsis: Do not send aborted task response

2017-04-10 Thread Bryant G. Ly
the abort task TM NEVER gets a response to the aborted op and with the current code it will send a response. Thus this fix will remove that response if the TAS bit is set. Cc: <sta...@vger.kernel.org> # v4.8+ Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> --- drivers/scsi/

Re: [PATCH] ibmvscsis: Do not send aborted task response

2017-04-07 Thread Bryant G. Ly
On 4/7/17 11:36 AM, Bart Van Assche wrote: On Fri, 2017-04-07 at 11:12 -0500, Bryant G. Ly wrote: So from this stack trace it looks like the ibmvscsis driver is sending an extra response through send_messages even though an abort was issued. IBMi, reported this issue internally when they were

Re: [PATCH] ibmvscsis: Do not send aborted task response

2017-04-07 Thread Bryant G. Ly
On 4/7/17 10:49 AM, Bryant G. Ly wrote: The driver is sending a response to the aborted task response along with LIO sending the tmr response. SCSI spec says that the initiator that sends the abort task TM NEVER gets a response to the aborted op and with the current code it will send

[PATCH] ibmvscsis: Do not send aborted task response

2017-04-07 Thread Bryant G. Ly
if the op is aborted. Cc: <sta...@vger.kernel.org> # v4.8+ Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> --- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 60 +--- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.h | 1 + 2 files changed, 40 insertions(+),

[PATCH] target/user: PGR Support

2017-03-30 Thread Bryant G. Ly
This adds PGR support for just TCMU, since tcmu doesn't have the necessary IT_NEXUS info to process PGR in userspace, so have those commands be processed in kernel. Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> --- drivers/target/target_core_configfs.c | 10 +- drivers/

Re: [PATCHv4 0/4] tcmu: bug fix and dynamic growing data area support

2017-03-21 Thread Bryant G. Ly
On 3/21/17 3:36 AM, lixi...@cmss.chinamobile.com wrote: From: Xiubo Li Changed for V4: - re-order the #3, #4 at the head. - merge most of the #5 to others. Changed for V3: - [PATCHv2 2/5] fix double usage of blocks and possible page fault call trace. -

Re: [PATCHv2 5/5] target/user: Clean up tcmu_queue_cmd_ring

2017-03-16 Thread Bryant G. Ly
From: Xiubo Li Add two helpers to simplify the code, and move some code out of the cmdr spin lock to reduce the size of critical region. Signed-off-by: Xiubo Li --- drivers/target/target_core_user.c | 54

Re: [PATCHv2 3/5] target/user: Fix possible overwrite of t_data_sg's last iov[]

2017-03-16 Thread Bryant G. Ly
cmulib_cmd->iovec)+4) $6 = {iov_base = 0x1306e853c0028, iov_len = 128} <--- bad pointer and length So this fix would be great! Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com>

Re: [PATCH] target: Fix NULL dereference during LUN lookup + active I/O shutdown

2017-02-23 Thread Bryant G. Ly
From: Nicholas Bellinger When transport_clear_lun_ref() is shutting down a se_lun via configfs with new I/O in-flight, it's possible to trigger a NULL pointer dereference in transport_lookup_cmd_lun() due to the fact percpu_ref_get() doesn't do any __PERCPU_REF_DEAD

[PATCH] ibmvscsis: Fix max transfer length

2017-01-11 Thread Bryant G. Ly
Current code incorrectly calculates the max transfer length, since it is assuming a 4k page table, but ppc64 all run on 64k page tables. Cc: sta...@vger.kernel.org Reported-by: Steven Royer <sero...@linux.vnet.ibm.com> Tested-by: Steven Royer <sero...@linux.vnet.ibm.com> Signed-off-

[PATCH] ibmvscsis: Fix max transfer length

2017-01-11 Thread Bryant G. Ly
Current code incorrectly calculates the max transfer length, since it is assuming a 4k page table, but ppc64 all run on 64k page tables. Cc: sta...@vger.kernel.org Reported-by: Steven Royer <sero...@linux.vnet.ibm.com> Tested-by: Steven Royer <sero...@linux.vnet.ibm.com> Signed-off-

[PATCH] ibmvscsis: Fix max transfer length

2017-01-11 Thread Bryant G. Ly
Current code incorrectly calculates the max transfer length, since it is assuming a 4k page table, but ppc64 all run on 64k page tables. Cc: sta...@vger.kernel.org Reported-by: Steven Royer <sero...@linux.vnet.ibm.com> Tested-by: Steven Royer <sero...@linux.vnet.ibm.com> Signed-off-

Re: [PATCH] ibmvscsis: Fix max transfer length

2017-01-11 Thread Bryant G. Ly
On 1/11/17 12:57 PM, Bart Van Assche wrote: On Wed, 2017-01-11 at 12:02 -0600, Bryant G. Ly wrote: Current code incorrectly calculates the max transfer length, since it is assuming a 4k page table, but ppc64 all run on 64k page tables. Cc: sta...@vger.kernel.org Reported-by: Steven Royer

[PATCH] ibmvscsis: fix sleeping in interrupt context

2017-01-11 Thread Bryant G. Ly
; Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> --- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c index 792a8bd..8e308fd 100644

[PATCH] ibmvscsis: Fix max transfer length

2017-01-11 Thread Bryant G. Ly
Current code incorrectly calculates the max transfer length, since it is assuming a 4k page table, but ppc64 all run on 64k page tables. Cc: sta...@vger.kernel.org Reported-by: Steven Royer <sero...@linux.vnet.ibm.com> Tested-by: Steven Royer <sero...@linux.vnet.ibm.com> Signed-off-

Re: [PATCH] ibmvscsis: Fix srp_transfer_data fail return code

2017-01-09 Thread Bryant G. Ly
On 1/9/17 10:47 AM, Greg KH wrote: On Mon, Jan 09, 2017 at 10:21:20AM -0600, Bryant G. Ly wrote: From: "Bryant G. Ly" <b...@us.ibm.com> If srp_transfer_data fails within ibmvscsis_write_pending, then the most likely scenario is that the client timed out the op and removed

[PATCH] ibmvscsis: Fix srp_transfer_data fail return code

2017-01-09 Thread Bryant G. Ly
From: "Bryant G. Ly" <b...@us.ibm.com> If srp_transfer_data fails within ibmvscsis_write_pending, then the most likely scenario is that the client timed out the op and removed the TCE mapping. Thus it will loop forever retrying the op that is pretty much guaranteed to fail f

Re: [PATCH v1 1/3] Synchronization of cmds during termination conditions

2016-10-12 Thread Bryant G. Ly
On 10/11/16 5:58 PM, Michael Cyr wrote: Signed-off-by: Michael Cyr --- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 1082 +- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.h |5 +- 2 files changed, 486 insertions(+), 601 deletions(-) I would make

[PATCH v1] Ibmvscsis: Fixed unused variable

2016-09-16 Thread Bryant G. Ly
Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> --- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c b/drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c index b29fef9..f8ba2a0 100644 --- a/driver

[PATCH v1 2/3] Ibmvscsis: Code cleanup of print statements

2016-08-31 Thread Bryant G. Ly
Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> Signed-off-by: Michael Cyr <mike...@linux.vnet.ibm.com> --- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 26 ++ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/drivers/scsi/ibmvscsi_tgt/ib

[PATCH v1 3/3] Ibmvscsis: Fixed a bug reported by Dan Carpenter

2016-08-31 Thread Bryant G. Ly
SUPPORTED_FORMATS is 1 << 1 so it's never zero. Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> Signed-off-by: Michael Cyr <mike...@linux.vnet.ibm.com> --- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[PATCH v1 1/3] Ibmvscsis: Properly deregister target sessions

2016-08-31 Thread Bryant G. Ly
The driver currently doesn't properly deregisters target sessions completely, so this will address that. Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> Signed-off-by: Michael Cyr <mike...@linux.vnet.ibm.com> --- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 2 ++ 1 fil

[PATCH v1 0/3] Ibmvscsis fixes and code cleanup

2016-08-31 Thread Bryant G. Ly
Here are some small fixes and cleanups for Ibmvscsis Target Driver. The only one of significance is the first one where there is a possibility of a kernel crash due to inproper deregister of target session since we didn't sync up work and didn't deregister_configfs. Bryant G. Ly (3): Ibmvscsis

Re: [PATCH -next] ibmvscsis: Use list_move_tail instead of list_del/list_add_tail

2016-08-26 Thread Bryant G. Ly
On 7/22/16, 9:03 AM, "Wei Yongjun" wrote: Using list_move_tail() instead of list_del() + list_add_tail(). Signed-off-by: Wei Yongjun --- drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 3

Re: [PATCH v9] ibmvscsis: Initial commit of IBM VSCSI Tgt Driver

2016-07-20 Thread Bryant G. Ly
Hi Nic, < SNIP > > Note the deletion of drivers/scsi/libsrp.c + include/scsi/libsrp.h has > been dropped from the above commit, as it looks like they where changes > specific to your local tree. > Please have a quick look, and let me know if anything doesn't look >

[PATCH] target: Unsupported SCSI Opcode Fix

2016-06-30 Thread Bryant G. Ly
ommand with an Ordered Task is sent, it causes a hang, since dev->simple_cmds is at -1. Signed-off-by: Michael Cyr <mike...@linux.vnet.ibm.com> Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> --- drivers/target/target_core_transport.c | 6 ++ include/target/target_core_base.h

Re: [PATCH v8] ibmvscsis: Initial commit of IBM VSCSI Tgt Driver

2016-06-29 Thread Bryant G. Ly
On 6/29/16, 9:54 AM, "Bart Van Assche" <target-devel-ow...@vger.kernel.org on behalf of bart.vanass...@sandisk.com> wrote: On 06/29/2016 04:43 PM, Bryant G. Ly wrote: >> It looks like the masking fixes the device mapper’s ability to find the >> disk…. > Is

Re: [PATCH v8] ibmvscsis: Initial commit of IBM VSCSI Tgt Driver

2016-06-29 Thread Bryant G. Ly
On 6/29/16, 12:49 AM, "Bart Van Assche" wrote: >> I was hoping someone in the community can help answer this: >> >> If I were to remove the masking off of the lun addressing method prior to >>

Re: [PATCH v8] ibmvscsis: Initial commit of IBM VSCSI Tgt Driver

2016-06-28 Thread Bryant G. Ly
On 6/27/16, 3:17 PM, "Michael Cyr" wrote: + cmd->se_cmd.tag = be64_to_cpu(srp->tag); + + spin_lock_bh(>intr_lock); + list_add_tail(>list, >active_q); + spin_unlock_bh(>intr_lock); + +

Re: [PATCH v7] ibmvscsis: Initial commit of IBM VSCSI Tgt Driver

2016-06-23 Thread Bryant G. Ly
..@us.ibm.com) IBM Corp. >> + * Santiago Leon (san...@us.ibm.com) IBM Corp. >> + * Linda Xie (l...@us.ibm.com) IBM Corp. >> + * >> + * Copyright (C) 2005-2011 FUJITA Tomonori <to...@acm.org> >> + * Copyright (C) 201

Re: [PATCH v4] ibmvscsis: Initial commit of IBM VSCSI Tgt Driver

2016-06-15 Thread Bryant G. Ly
On 6/14/16, 9:57 AM, "Christoph Hellwig" wrote: >On Tue, Jun 14, 2016 at 10:46:09AM +0200, Bart Van Assche wrote: >> All what's needed is something like the (untested) patch below. As one >> can see no new function pointers have been added to target_core_fabric_ops. >> All

Re: [PATCH v4] ibmvscsis: Initial commit of IBM VSCSI Tgt Driver

2016-06-15 Thread Bryant G. Ly
On 6/14/16, 3:46 AM, "Bart Van Assche" <bart.vanass...@sandisk.com> wrote: >On 06/14/2016 08:35 AM, Nicholas A. Bellinger wrote: >> On Fri, 2016-06-10 at 12:05 -0700, Bart Van Assche wrote: >>> On 06/09/2016 02:26 PM, Bryant G. Ly wrote: >>>> +/** &g

Re: [PATCH v4] ibmvscsis: Initial commit of IBM VSCSI Tgt Driver

2016-06-15 Thread Bryant G. Ly
On 6/14/16, 3:09 AM, "Bart Van Assche" <bart.vanass...@sandisk.com> wrote: >On 06/09/2016 11:26 PM, Bryant G. Ly wrote: >> This driver is a pick up of the old IBM VIO scsi Target Driver >> that was started by Nick and Fujita 2-4 years ago. >> http://comm

[PATCH] target: Fix for hang of Ordered task in TCM

2016-06-08 Thread Bryant G. Ly
Nicholas Bellinger <n...@linux-iscsi.org> Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> --- drivers/target/target_core_internal.h | 1 + drivers/target/target_core_sbc.c | 2 +- drivers/target/target_core_transport.c | 62 +++--- in

[PATCH v3] ibmvscsis: Initial commit of IBM VSCSI Tgt Driver

2016-05-27 Thread Bryant G. Ly
ed-off-by: Tyrel Datwyler <tyr...@linux.vnet.ibm.com> Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> --- MAINTAINERS | 10 + drivers/scsi/Kconfig | 27 +- drivers/scsi/Makefile|2 +- drivers/scsi/ibmvscsi/Mak

[PATCH v2] ibmvscsis: Initial commit of IBM VSCSI Tgt Driver

2016-05-26 Thread Bryant G. Ly
, this disregards my previous post splitting up the changes into patches, and makes them ammends with different versions of the original patch. This patch also contains internal IBM sign offs. Signed-off-by: Bryant G. Ly <bryan...@linux.vnet.ibm.com> Signed-off-by: Steven Royer <sero...@linux.vne

[PATCH 2/3] ibmvscsis: Addressing Bart's comments

2016-05-25 Thread Bryant G. Ly
From: bryantly This patch contains cleaning up the code for styling and also addresses Bart's comments. Signed-off-by: bryantly --- MAINTAINERS | 4 +- drivers/scsi/Kconfig | 36 +--

[PATCH 3/3] ibmvscsis: clean up functions

2016-05-25 Thread Bryant G. Ly
From: bryantly This patch removes forward declarations and re-organizes the functions within the driver. This patch also fixes MAINTAINERS for ibmvscsis. Signed-off-by: bryantly --- MAINTAINERS |4 +-

IBM VSCSI Target Driver Initial Patch Sets

2016-05-25 Thread Bryant G. Ly
This patch series addresses comments by Joe with runing checkpatch with a --strict. It cleans up all the misc styling and removes all the forward declarations. The patch also addresses all of Bart's comments besides the preallocation of buffers before IO starts and the merging of unpack_lun with

Re: [PATCH] ibmvscsis: Initial commit of IBM VSCSI Tgt Driver

2016-05-24 Thread Bryant G Ly
Quoting Bart Van Assche <bart.vanass...@sandisk.com>: On 05/24/2016 06:52 AM, Bryant G. Ly wrote: +config SCSI_IBMVSCSIS + tristate "IBM Virtual SCSI Server support" + depends on PPC_PSERIES && SCSI_SRP && TARGET_CORE + help + Th

[PATCH] ibmvscsis: Initial commit of IBM VSCSI Tgt Driver

2016-05-24 Thread Bryant G. Ly
drivers/scsi/ibmvscsi/viosrp.h +IBM Power Virtual SCSI Device Target Driver +M: Bryant G. Ly <bryan...@linux.vnet.ibm.com> +L: linux-scsi@vger.kernel.org +L: target-de...@vger.kernel.org +S: Supported +F: drivers/scsi/ibmvscsi/ibmvscsis.c +F: drivers/scsi/ibmvs

Re: [PATCH] Fix for hang of Ordered task in TCM

2016-05-23 Thread Bryant G Ly
Quoting "Nicholas A. Bellinger" : So AFAICT for delayed commands, the above patch ends up skipping these three checks subsequently when doing __target_execute_cmd() directly from target_restart_delayed_cmds(), no..? After pondering this some more, what about moving