[PATCH 0/2] iscsi changes for scsi misc

2013-04-10 Thread michaelc
The following 2 patches are for the misc branch in the scsi tree. They cleanup duplicated code from a previous patch and add better support for swap over software iscsi by using the PF_MEMALLOC/__GFP_MEMALLOC flags like what was recently added for nbd. -- To unsubscribe from this list: send the

[PATCH 2/2] iscsi_tcp: support PF_MEMALLOC/__GFP_MEMALLOC

2013-04-10 Thread michaelc
From: Mike Christie micha...@cs.wisc.edu This patch has software iscsi use PF_MEMALLOC/__GFP_MEMALLOC to be able to better support swap over iscsi disks similar to what was added for nbd. Signed-off-by: Mike Christie micha...@cs.wisc.edu --- drivers/scsi/iscsi_tcp.c | 18 +- 1

[PATCH 1/2] libiscsi: avoid unnecessary multiple NULL assignments

2013-04-10 Thread michaelc
From: Masatake YAMATO yam...@redhat.com In iscsi_free_task, NULL is assigned to task-sc twice: before and after kfifo_in invocatoin. Allocating and freeing iscsi_task are guarded with session-lock, so multiple NULL assignments cause no trouble. But people reading the source code may be confused.

[PATCH 0/2] iscsi changes for 3.17

2014-07-01 Thread michaelc
This patchset has iscsi changes built over Christoph's scsi-queue for-3.17 branch. The patches also apply to James's misc tree. They are not critical bug fixes, so they are best for 3.17 feature window. -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a

[PATCH 1/2] iscsi: kill redundant casts

2014-07-01 Thread michaelc
From: Nick Black' via open-iscsi open-is...@googlegroups.com Remove two redundant casts from char * to char *. Signed-off-by: Nick Black n...@google.com Signed-off-by: Mike Christie micha...@cs.wisc.edu --- drivers/scsi/scsi_transport_iscsi.c |4 ++-- 1 files changed, 2 insertions(+), 2

[PATCH 2/2] bnx2i, be2iscsi: fix custom stats length

2014-07-01 Thread michaelc
From: Mike Christie micha...@cs.wisc.edu The custom stats is an array with custom_length indicating the length of the array. This patch fixes bnx2i and be2iscsi's setting of the custom stats length. They both just have the one, eh_abort_cnt, so that should be in the first entry of the custom

[PATCH 2/4] qla4xxx: fix get_host_stats error propagation

2014-07-12 Thread michaelc
From: Mike Christie micha...@cs.wisc.edu qla4xxx was not always returning -EXYZ error codes when qla4xxx_get_host_stats failed. Signed-off-by: Mike Christie micha...@cs.wisc.edu Acked-by: Vikas Chaudhary vikas.chaudh...@qlogic.com --- drivers/scsi/qla4xxx/ql4_os.c |2 ++ 1 files changed, 2

[PATCH 0/4] iscsi: iscsi changes for 3.17

2014-07-12 Thread michaelc
The following patches were made over Chrisoph's scsi-queue drivers-for-3.17 branch. They are some fixes to the get_host_stats code and new error code for when a iscsi ping times out. Note for applying/merging: The patches also apply over James's scsi misc branch, but that branch is missing some

[PATCH 1/4] iscsi class: fix get_host_stats error handling

2014-07-12 Thread michaelc
From: Mike Christie micha...@cs.wisc.edu iscsi_get_host_stats was dropping the error code returned by drivers like qla4xxx. Signed-off-by: Mike Christie micha...@cs.wisc.edu --- drivers/scsi/scsi_transport_iscsi.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git

[PATCH 3/4] iscsi class: fix get_host_stats return code when not supported

2014-07-12 Thread michaelc
From: Mike Christie micha...@cs.wisc.edu When the get_host_stats call was not supported we were returing EINVAL. This has us return ENOSYS, because for software iscsi drivers where there is no host it is ok to not have this callout. Signed-off-by: Mike Christie micha...@cs.wisc.edu ---

[PATCH 4/4] libiscsi: return new error code when nop times out

2014-07-12 Thread michaelc
From: Mike Christie micha...@cs.wisc.edu When a iscsi nop as ping timedout we were failing with the common connection error code, ISCSI_ERR_CONN_FAILED. This patch adds a new error code for this problem so can properly track/distinguish in userspace. Signed-off-by: Mike Christie

[PATCH 1/1] iscsi class: Fix freeing of skb in get host error path

2014-08-03 Thread michaelc
From: Mike Christie micha...@cs.wisc.edu If get_host_stats failes we are using kfree to free the skb. We should be using kfree_skb. This patch was made over Christoph's scsi-queue drivers-for-3.17 branch. Signed-off-by: Mike Christie micha...@cs.wisc.edu --- drivers/scsi/scsi_transport_iscsi.c

[PATCH 1/1] libiscsi: fix potential buffer overrun in __iscsi_conn_send_pdu

2014-09-02 Thread michaelc
From: Mike Christie micha...@cs.wisc.edu This patches fixes a potential buffer overrun in __iscsi_conn_send_pdu. This function is used by iscsi drivers and userspace to send iscsi PDUs/ commands. For login commands, we have a set buffer size. For all other commands we do not support data buffers.

[PATCH 2/2] iscsi_tcp: export port being used

2014-09-29 Thread michaelc
From: Mike Christie micha...@cs.wisc.edu This just has iscsi_tcp support ISCSI_PARAM_LOCAL_PORT which exports the local port being used by the iscsi connection. Signed-off-by: Mike Christie micha...@cs.wisc.edu --- drivers/scsi/iscsi_tcp.c | 10 -- drivers/scsi/libiscsi.c |1 + 2

[PATCH 1/2] be2iscsi: check ip buffer before copying

2014-09-29 Thread michaelc
From: Mike Christie micha...@cs.wisc.edu Dan Carpenter found a issue where be2iscsi would copy the ip from userspace to the driver buffer before checking the len of the data being copied: http://marc.info/?l=linux-scsim=140982651504251w=2 This patch just has us only copy what we the driver

[PATCH 0/2] iscsi patches for 3.18

2014-09-29 Thread michaelc
A couple patches made over the scsi-queue drivers-for-3.18 branch. They just fix a possible bug with be2iscsi that Dan reported and also export the iscsi port being used. -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a message to majord...@vger.kernel.org

[PATCH 1/5] block: set the nr of sectors a dev can compare and write atomically

2014-10-15 Thread michaelc
From: Mike Christie micha...@cs.wisc.edu This adds blk settings helpers to allow drivers to tell the block layer how many sectors it can process in a COMPARE_AND_WRITE/ATS request. Signed-off-by: Mike Christie micha...@cs.wisc.edu --- block/blk-settings.c | 20

[PATCH 5/5] lio iblock: add support for REQ_CMP_AND_WRITE

2014-10-15 Thread michaelc
From: Mike Christie micha...@cs.wisc.edu This patch has the iblock backing store use blkdev_issue_cmp_and_write if the backing store device/queue supports it. Signed-off-by: Mike Christie micha...@cs.wisc.edu --- drivers/target/target_core_iblock.c | 85 --- 1

[PATCH 2/5] block: add function to issue compare and write

2014-10-15 Thread michaelc
From: Mike Christie micha...@cs.wisc.edu This patch adds block layer helpers to send a compare and write request. It differs from requests like discard and write same in that there is a setup function and a issue one. I did this to allow callers add multiple pages with variying offsets and

[PATCH 3/5] scsi: add support for COMPARE_AND_WRITE

2014-10-15 Thread michaelc
From: Mike Christie micha...@cs.wisc.edu This patch adds support to detect if a device supports COMPARE_AND_WRITE and execute REQ_COMPARE_AND_WRITE commands. Signed-off-by: Mike Christie micha...@cs.wisc.edu --- drivers/scsi/scsi_lib.c |7 + drivers/scsi/sd.c | 63

reserve mem for REQ_TYPE_BLOCK_PC reqs and covert sg to block/bio helpers

2007-10-19 Thread michaelc
This patchset has to goals. The first is to be able to reserve memory (bio, bio vec and pages), for REQ_TYPE_BLOCK_PC commands. This is needed for multipath where we need to make forward progress when failing over the device. And it is needed if all the paths are failed and we need userspace or

[PATCH 06/10] use GFP_NOIO in dm rdac

2007-10-19 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] The pg_init path needs to be GFP_NOIO since it used to failover a deviec and we cannot end up calling back into the device. Signed-off-by: Mike Christie [EMAIL PROTECTED] --- drivers/md/dm-mpath-rdac.c |4 ++-- 1 files changed, 2 insertions(+), 2

[PATCH 05/10] have block/scsi_ioctl user GFP_NOIO

2007-10-19 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] Because user spaces uses block/scsi_ioctl for path testing and to readd devices, we cannot use GFP_KERNEL. Signed-off-by: Mike Christie [EMAIL PROTECTED] --- block/scsi_ioctl.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 02/10] rm block device arg from bio map user functions

2007-10-19 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] Everyone is passing in NULL, so let's just drop the block device argument from the bio mapping functions. Signed-off-by: Mike Christie [EMAIL PROTECTED] --- block/ll_rw_blk.c |4 ++-- fs/bio.c| 17 ++--- include/linux/bio.h |

[PATCH 03/10] Extend bio_sets to pool pages for bios in sets.

2007-10-19 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] If we have REQ_BLOCK_PC commands that transfer data like, an inquiry, read of sector 0, or mode page, then we need to make sure that we can allocate memory for the data. sg and st have implemented their own reserve buffers. This patch adds a mempool of pages

[PATCH 08/10] split bioset_add_pages for sg mmap use

2007-10-19 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] open(/dev/sg) mmap() write(/dev/sg) read(/dev/sg) Then can do write(/dev/sg) read(/dev/sg) multiple times. close(/dev/sg) The pages for the mmap operation are reused for each sg request, so they cannot be freed when the bio is like with the copy or map

[PATCH 09/10] Add REQ_TYPE_BLOCL_PC mmap helpers

2007-10-19 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] sg supports a sg io mmap operation. These patches add some mmap helpers based on the existing bio and blk functions. This patch also modifies bioset_pagepool_create so that it takes the number of pagepool entries. This is needed by sg mmap (and other sg

[PATCH 10/10] convert sg.c to blk/bio helpers

2007-10-19 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] This patch converts sg to use the block/bio layer helpers to map and copy data. Signed-off-by: Mike Christie [EMAIL PROTECTED] --- drivers/scsi/sg.c | 1061 - 1 files changed, 310 insertions(+), 751

[PATCH 01/10] use seperate bioset for REQ_TYPE_BLOCK_PC

2007-10-19 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] If we are failing over a device or trying to do sg io to add a path to a device where all paths are failed, we do not want to allocate bios from the same bioset as the FS above it, because the device could have been internally queueing IO while there were no

[PATCH 04/10] convert blk_rq_map helpers to use bioset's page pool helper

2007-10-19 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] This patch converts the blk_rq map helpers to use the page pool helpers instead of bio_copy_user. bio_copy/uncopy_user used to allocate the bio, set up biovecs, allocate pages and copy/uncopy the data. Now the bio page pool helper only takes care of

[PATCH 1/2] iscsi_tcp: fix potential lockup with write commands

2007-11-14 Thread michaelc
From: Tony Battersby [EMAIL PROTECTED] There is a race condition in iscsi_tcp.c that may cause it to forget that it received a R2T from the target. This race may cause a data-out command (such as a write) to lock up. The race occurs here: static int iscsi_send_unsol_pdu(struct iscsi_conn

iscsi update for 2.6.25

2007-12-04 Thread michaelc
This patchset was made over scsi-rc-fixes (it also applies to Linus's git tree). It will not apply over scsi-misc, because there are some patches which went into scsi-rc-fixes/2.6.24-rc4 and scsi-misc has not been updated for the scsi-rc-fixes patches. Sorry for the bigger than normal update.

[PATCH 01/23] libiscsi, iscsi_tcp: add device support

2007-12-04 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] This patch adds logical unit reset support. This should work for ib_iser, but I have not finished testing that driver so it is not hooked in yet. This patch also temporarily reverts the iscsi_tcp r2t write out patch. That code is completely rewritten in this

[PATCH 07/23] libiscsi: do not block session during logout

2007-12-04 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] There is not need to block the session during logout. Since we are going to fail the commands that were blocked just fail them immediately instead. Signed-off-by: Mike Christie [EMAIL PROTECTED] --- drivers/infiniband/ulp/iser/iser_initiator.c | 11 +--

[PATCH 08/23] iscsi class: Use our own workq instead of common system one.

2007-12-04 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] There is just too much going on through the common workq and something like a scsi device removal through sysfs affects how long it will take to recover the transport, mark it as failed, or shut it down gracefully. Signed-off-by: Mike Christie [EMAIL

[PATCH 09/23] libiscsi: grab eh_mutex during host reset

2007-12-04 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] I thought we may not need the eh mutex during host reset, but that is wrong with the new shutdown code. When start_session_recovery sets the state to terminate then drops the session lock. The scsi eh thread could then grab the session lock see that we are

[PATCH 10/23] libiscsi: fix shutdown

2007-12-04 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] We were using the device delete sysfs file to remove each device then logout. Now in 2.6.21 and .22 this will not work because the sysfs delete file returns immediately and does not wait for the device removal to complete. This causes a hang if a cache sync

[PATCH 11/23] libiscsi: fix nop handling

2007-12-04 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] During root boot and shutdown the target could send us nops. At this time iscsid cannot be running, so the target will drop the session and the boot or shutdown will hang. To handle this and allow us to better control when to check the network this patch

[PATCH 13/23] Do not fail commands immediately during logout

2007-12-04 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] If the target requests a logout, then we do not want to fail commands to scsi-ml right away. This patch just fails in pending commands for a requeue immediately, and then lets iscsid handle running commands like normal recovery. Signed-off-by: Mike Christie

[PATCH 14/23] clear conn-ctask when task is completed early

2007-12-04 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] If the current ctask is failed early, we legt the conn-ctask pointer pointing to a invalid task. When the xmit thread would send data for it, we would then oops. Signed-off-by: Mike Christie [EMAIL PROTECTED] --- drivers/scsi/libiscsi.c |5 - 1

[PATCH 15/23] Drop host lock in queuecommand

2007-12-04 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] The driver does not need the host lock in queuecommand so drop it. Signed-off-by: Mike Christie [EMAIL PROTECTED] --- drivers/scsi/libiscsi.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/drivers/scsi/libiscsi.c

[PATCH 06/23] libiscsi, iscsi_tcp: iscsi pool cleanup

2007-12-04 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] from [EMAIL PROTECTED] iscsi_pool_init simplified iscsi_pool_init currently has a lot of duplicate kfree() calls it does when some allocation fails. This patch simplifies the code a little by using iscsi_pool_free to tear down the pool in case of an error.

[PATCH 02/23] iscsi_tcp: rewrite recv path

2007-12-04 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] From Olaf Kirch: Rewrite recv path. Fixes: - data digest processing and error handling. - ahs support. Some fixups by Mike Christie Signed-off-by: [EMAIL PROTECTED] Signed-off-by: Mike Christie [EMAIL PROTECTED] --- drivers/scsi/iscsi_tcp.c | 1018

[PATCH 18/23] iscsi_tcp: drop session when itt does not match any command

2007-12-04 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] A target should never send us a itt that does not match a running task. If it does we do not really know what is coming down after the header, unless we evaluate the hdr and do some guessing sometimes. However, even if we know what is coming we probably do

[PATCH 19/23] libiscsi, iscsi class: set tmf to a safe default and export in sysfs

2007-12-04 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] Older tools will not be setting the tmf time outs since they did not exists, so set them to a safe default. And export abort and lu reset timeout values in sysfs. Signed-off-by: Mike Christie [EMAIL PROTECTED] --- drivers/scsi/libiscsi.c |2

[PATCH 20/23] iscsi_tcp: enable sg chaining

2007-12-04 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] The previous patches converted iscsi_tcp to support sg chaining. This patch sets the proper flags and sets sg_table size to 4096. This allows fs io to be capped at max_sectors, but passthrough IO to be limited by some other part of the kernel. Signed-off-by:

[PATCH 21/23] iscsi_tcp: hold lock during data rsp processing

2007-12-04 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] iscsi_data_rsp needs to hold the sesison lock when it calls iscsi_update_cmdsn. Signed-off-by: Mike Christie [EMAIL PROTECTED] --- drivers/scsi/iscsi_tcp.c | 14 ++ 1 files changed, 6 insertions(+), 8 deletions(-) diff --git

[PATCH 22/23] libiscsi: use is_power_of_2

2007-12-04 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] Patch from vignesh babu [EMAIL PROTECTED]: Replacing n (n - 1) for power of 2 check by is_power_of_2(n) Signed-off-by: vignesh babu [EMAIL PROTECTED] Signed-off-by: Mike Christie [EMAIL PROTECTED] --- drivers/scsi/libiscsi.c |3 ++- 1 files changed, 2

[PATCH 23/23] iscsi_tcp: fix setting of r2t

2007-12-04 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] If we negotiate for X r2ts we have to use only X r2ts. We cannot round up (we could send less though). It is ok to fail if it is not something the driver can handle, so this patch just does that. Signed-off-by: Mike Christie [EMAIL PROTECTED] ---

[PATCH 12/23] iscsi_tcp: update the website URL

2007-12-04 Thread michaelc
From: FUJITA Tomonori [EMAIL PROTECTED] Use open-iscsi.org instead of linux-iscsi.sf.net, which hasn't been updated for ages. Signed-off-by: FUJITA Tomonori [EMAIL PROTECTED] Signed-off-by: Mike Christie [EMAIL PROTECTED] --- drivers/scsi/Kconfig |2 +- 1 files changed, 1 insertions(+), 1

[PATCH 03/23] Prettify resid handling and some extra checks

2007-12-04 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] from Boaz Harrosh: - Check to see that OVERFLOW is not negative indicating a bug. - Unify handling of UNDERFLOW and OVERFLOW to the same code. - Also handle BIDI_OVERFLOW. Signed-off-by: Boaz Harrosh [EMAIL PROTECTED] Signed-off-by: Mike

[PATCH 17/23] iscsi_tcp: stop leaking r2t_info's when the incoming R2T is bad

2007-12-04 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] from [EMAIL PROTECTED]: iscsi_r2t_rsp checks the incoming R2T for sanity, and if it thinks it's fishy, it will drop it silently. In this case, we leaked an r2t_info object. If we do this often enough, we run into a BUG_ON some time later. Removed r2t

[PATCH 04/23] iscsi_tcp, libiscsi: initial AHS Support

2007-12-04 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] at libiscsi generic code - currently code assumes a storage space of pdu header is allocated at llds ctask and is pointed to by iscsi_cmd_task-hdr. Here I add a hdr_max field pertaining to that storage, and an hdr_len that accumulates the

[PATCH 05/23] iser patching for AHS support

2007-12-04 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] from Boaz Harrosh [EMAIL PROTECTED] - The default initialization of hdr_max is the minimum - sizeof(struct iscsi_cmd) - Once this patch goes into iser the default initialization at libiscsi can be removed. - This is not yet full support for AHSs

[PATCH 08/24] iscsi class: Use our own workq instead of common system one.

2007-12-13 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] There is just too much going on through the common workq and something like a scsi device removal through sysfs affects how long it will take to recover the transport, mark it as failed, or shut it down gracefully. Signed-off-by: Mike Christie [EMAIL

[PATCH 10/24] libiscsi: fix shutdown

2007-12-13 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] We were using the device delete sysfs file to remove each device then logout. Now in 2.6.21 this will not work because the sysfs delete file returns immediately and does not wait for the device removal to complete. This causes a hang if a cache sync is needed

[PATCH 13/24] Do not fail commands immediately during logout

2007-12-13 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] If the target requests a logout, then we do not want to fail commands to scsi-ml right away. This patch just fails in pending commands for a requeue immediately, and then lets iscsid handle running commands like normal recovery. Signed-off-by: Mike Christie

[PATCH 14/24] clear conn-ctask when task is completed early

2007-12-13 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] If the current ctask is failed early, we legt the conn-ctask pointer pointing to a invalid task. When the xmit thread would send data for it, we would then oops. Signed-off-by: Mike Christie [EMAIL PROTECTED] --- drivers/scsi/libiscsi.c |5 - 1

[PATCH 18/24] iscsi_tcp: drop session when itt does not match any command

2007-12-13 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] A target should never send us a itt that does not match a running task. If it does we do not really know what is coming down after the header, unless we evaluate the hdr and do some guessing sometimes. However, even if we know what is coming we probably do

[PATCH 19/24] libiscsi, iscsi class: set tmf to a safe default and export in sysfs

2007-12-13 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] Older tools will not be setting the tmf time outs since they did not exists, so set them to a safe default. And export abort and lu reset timeout values in sysfs. Signed-off-by: Mike Christie [EMAIL PROTECTED] --- drivers/scsi/libiscsi.c |2

[PATCH 21/24] iscsi_tcp: hold lock during data rsp processing

2007-12-13 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] iscsi_data_rsp needs to hold the sesison lock when it calls iscsi_update_cmdsn. Signed-off-by: Mike Christie [EMAIL PROTECTED] --- drivers/scsi/iscsi_tcp.c | 14 ++ 1 files changed, 6 insertions(+), 8 deletions(-) diff --git

[PATCH 22/24] libiscsi: use is_power_of_2

2007-12-13 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] Patch from vignesh babu [EMAIL PROTECTED]: Replacing n (n - 1) for power of 2 check by is_power_of_2(n) Signed-off-by: vignesh babu [EMAIL PROTECTED] Signed-off-by: Mike Christie [EMAIL PROTECTED] --- drivers/scsi/libiscsi.c |3 ++- 1 files changed, 2

[PATCH 23/24] iscsi_tcp: fix setting of r2t

2007-12-13 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] If we negotiate for X r2ts we have to use only X r2ts. We cannot round up (we could send less though). It is ok to fail if it is not something the driver can handle, so this patch just does that. Signed-off-by: Mike Christie [EMAIL PROTECTED] ---

[PATCH 17/24] iscsi_tcp: stop leaking r2t_info's when the incoming R2T is bad

2007-12-13 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] from [EMAIL PROTECTED]: iscsi_r2t_rsp checks the incoming R2T for sanity, and if it thinks it's fishy, it will drop it silently. In this case, we leaked an r2t_info object. If we do this often enough, we run into a BUG_ON some time later. Removed r2t

[PATCH 05/24] iser patching for AHS support

2007-12-13 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] from Boaz Harrosh [EMAIL PROTECTED] - The default initialization of hdr_max is the minimum - sizeof(struct iscsi_cmd) - Once this patch goes into iser the default initialization at libiscsi can be removed. - This is not yet full support for AHSs

[PATCH 04/24] iscsi_tcp, libiscsi: initial AHS Support

2007-12-13 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] at libiscsi generic code - currently code assumes a storage space of pdu header is allocated at llds ctask and is pointed to by iscsi_cmd_task-hdr. Here I add a hdr_max field pertaining to that storage, and an hdr_len that accumulates the

RFC: add target reset handler to scsi_error.c

2007-12-18 Thread michaelc
These patches add a target reset handler to scsi_error.c's error handler. It is needed because drivers like qla4xxx either have to do a target reset in the eh_device_reset_handler then do some tricks so that when that handler is called again we do not send extra resets, or the driver has to do its

[PATCH 1/2] scsi error: add target reset eh handler

2007-12-18 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] Drivers like qla4xxx and bnx2i (and it looks like some fcp drivers too), want to be able to send a lun reset in the eh device handler and then a target reset in some other handler. The old linux-iscsi driver, which did the host per session like open-iscsi did

[PATCH 2/2] qla4xxx: Add target reset functionality

2007-12-18 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] This patch adds target reset functionalty. Signed-off-by: Mike Christie [EMAIL PROTECTED] --- drivers/scsi/qla4xxx/ql4_fw.h |1 + drivers/scsi/qla4xxx/ql4_glbl.h |2 + drivers/scsi/qla4xxx/ql4_mbx.c | 39

[PATCH 1/1] scsi_dh_alua: fix stpg sense handling

2013-03-05 Thread michaelc
From: Mike Christie micha...@cs.wisc.edu For the stpg_endio path we are not evaluating the sense. The bug is that 1. The error value is set to -EIO when there is sense, so we hit the first error check and always return SCSI_DH_IO. 2. h-senselen is set to zero in submit_stpg. It is not later set

[PATCH] block: free bios when failing blk_execute_rq_nowait calls

2013-09-18 Thread michaelc
From: Mike Christie micha...@cs.wisc.edu If the queue is dying then we only call the rq-end_io callout. This leaves bios setup on the request, because the caller assumes when the blk_execute_rq_nowait/blk_execute_rq call has completed that the rq-bios have been cleaned up. This patch has

[PATCH 0/6] iscsi changes for scsi-misc

2013-12-20 Thread michaelc
The following patches are some features and fixes for scsi-misc. James, if you were going to merge the libiscsi locking changes here http://www.spinics.net/lists/linux-scsi/msg69903.html do not bother. The qlogic patches that were just merged had a conflict. The patches in the following emails

[PATCH 2/6] SCSI/libiscsi: Reduce locking contention in fast path

2013-12-20 Thread michaelc
From: Shlomo Pongratz shlo...@mellanox.com Replace the session lock with two locks, a forward lock and a backwards lock named frwd_lock and back_lock respectively. The forward lock protects resources that change while sending a request to the target, such as cmdsn, queued_cmdsn, and allocating

[PATCH 1/6] SCSI/libiscsi: Restructure iscsi_tcp r2t response logic

2013-12-20 Thread michaelc
From: Shlomo Pongratz shlo...@mellanox.com Restructure the iscsi_tcp_r2t_rsp routine in order to avoid allocating r2t from r2tpool.queue and returning it back in case the parameters rhdr-data_length and or rhdr-data_offset prohibit the requing. Since the values of these parameters are known

[PATCH 6/6] iscsi_tcp: check for valid session before accessing

2013-12-20 Thread michaelc
From: Mike Christie micha...@cs.wisc.edu Check that the session is setup before accessing its connection. This fixes a oops where userspace tries to get the ip address before the session is bound to a host. Signed-off-by: Mike Christie micha...@cs.wisc.edu --- drivers/scsi/iscsi_tcp.c |3

[PATCH 3/6] SCSI/libiscsi: Remove unneeded code

2013-12-20 Thread michaelc
From: Shlomo Pongratz shlo...@mellanox.com We never will have a closed window and something on one of those lists. Signed-off-by: Mike Christie micha...@cs.wisc.edu Signed-off-by: Shlomo Pongratz shlo...@mellanox.com --- drivers/scsi/libiscsi.c | 12 1 files changed, 0

[PATCH 4/6] be2iscsi: fix lun test in device reset callout

2013-12-20 Thread michaelc
From: Mike Christie micha...@cs.wisc.edu We want to be checking the scsi_cmnd's lun against the possible tasks in the driver. Current check tests task against itself which was useless. Signed-off-by: Mike Christie micha...@cs.wisc.edu --- drivers/scsi/be2iscsi/be_main.c |2 +- 1 files

[PATCH 5/6] iscsi_boot_sysfs: Fix a memory leak in iscsi_boot_destroy_kset()

2013-12-20 Thread michaelc
From: Ethan Zhao ethan.ker...@gmail.com Load and unload iscsi_ibft module will cause kernel memory leak, fix it in scsi/iscsi_boot_sysfs.c iscsi_boot_destroy_kset(). Signed-off-by: Ethan Zhao ethan.ker...@gmail.com Signed-off-by: Mike Christie micha...@cs.wisc.edu ---

[PATCH 0/6]: iscsi changes for scsi-misc (v2)

2014-02-06 Thread michaelc
This patchset has Mellanox's libiscsi locking changes, and various fixes. V2 - Fix for MaxCmdSn handling in patch 3/6 where the part of the function that also updates the MaxCmdSn also got cut by accident. -- To unsubscribe from this list: send the line unsubscribe linux-scsi in the body of a

[PATCH 6/6] iscsi_tcp: check for valid session before accessing

2014-02-06 Thread michaelc
From: Mike Christie micha...@cs.wisc.edu Check that the session is setup before accessing its connection. This fixes a oops where userspace tries to get the ip address before the session is bound to a host. Signed-off-by: Mike Christie micha...@cs.wisc.edu --- drivers/scsi/iscsi_tcp.c |3

[PATCH 4/6] be2iscsi: fix lun test in device reset callout

2014-02-06 Thread michaelc
From: Mike Christie micha...@cs.wisc.edu We want to be checking the scsi_cmnd's lun against the possible tasks in the driver. Current check tests task against itself which was useless. Signed-off-by: Mike Christie micha...@cs.wisc.edu --- drivers/scsi/be2iscsi/be_main.c |2 +- 1 files

[PATCH 1/6] SCSI/libiscsi: Restructure iscsi_tcp r2t response logic

2014-02-06 Thread michaelc
From: Shlomo Pongratz shlo...@mellanox.com Restructure the iscsi_tcp_r2t_rsp routine in order to avoid allocating r2t from r2tpool.queue and returning it back in case the parameters rhdr-data_length and or rhdr-data_offset prohibit the requing. Since the values of these parameters are known

[PATCH 3/6] libiscsi: remove unneeded queue work when max_cmdsn is increased

2014-02-06 Thread michaelc
From: Mike Christie micha...@cs.wisc.edu iscsi_queuecommand will only take in commands that can fit in the current window. So, if a command is on the cmdqueue then it can fit in the current window. If a command is on the mgmtqueue, then we are setting the immediate bit so they will also fit in

[PATCH 2/6] SCSI/libiscsi: Reduce locking contention in fast path (v2)

2014-02-06 Thread michaelc
From: Shlomo Pongratz shlo...@mellanox.com Replace the session lock with two locks, a forward lock and a backwards lock named frwd_lock and back_lock respectively. The forward lock protects resources that change while sending a request to the target, such as cmdsn, queued_cmdsn, and allocating

iscsi features bugfixes

2007-05-30 Thread michaelc
The following patches were made against scsi-misc. They contain fixes and features including: - Features: 1. Export sysfs values needed for OF/BIOS assisted iscsi boot. 2. Export sysfs values needed to be able to bind sessions to a hba/port/NIC/netdev. This is needed for software iscsi so it can

[PATCH 4/19] iscsi class, qla4xxx: have class lookup host for drivers

2007-05-30 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] We are going to be adding more host level sysfs attrs and set_params, so this patch has them take a scsi_host instead of either a scsi_host or host no. Signed-off-by: Mike Christie [EMAIL PROTECTED] --- drivers/scsi/qla4xxx/ql4_os.c | 19

[PATCH 5/19] iscsi class: add iscsi host set param event

2007-05-30 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] The iscsi class uses the set_param event to set session and connection params. This patch adds a set_host_param so we can set host level values. Signed-off-by: Mike Christie [EMAIL PROTECTED] --- drivers/scsi/scsi_transport_iscsi.c | 29

[PATCH 7/19] iscsi class, qla4xxx, iscsi_tcp, ib_iser: export/set initiator name

2007-05-30 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] For iscsi root boot, software iscsi needs to know what the BIOS/OF initiator used for the initiator name so this puts it in sysfs for userspace to be able to pick up. For hw iscsi, it is nice to see what the card is using. This patch adds the new param, and

[PATCH 3/19] qla4xxx: export mac as hw address

2007-05-30 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] Export mac as hw address. Signed-off-by: Mike Christie [EMAIL PROTECTED] --- drivers/scsi/qla4xxx/ql4_os.c | 39 +++ 1 files changed, 35 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/qla4xxx/ql4_os.c

[PATCH 6/19] libiscsi, iscsi_tcp, ib_iser : add sw iscsi host get/set params helpers

2007-05-30 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] iscsid and udev need to key off the hw address being used so add some helpers for iser and iscsi tcp. Also convert them. Signed-off-by: Mike Christie [EMAIL PROTECTED] --- drivers/infiniband/ulp/iser/iscsi_iser.c |4 +++ drivers/scsi/iscsi_tcp.c

[PATCH 1/19] Check iscsi interface skb allocation return value

2007-05-30 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] Let's not oops when we cannot allocate a skb! Add a check for if alloc_skb fails. Signed-off-by: Mike Christie [EMAIL PROTECTED] --- drivers/scsi/scsi_transport_iscsi.c | 10 -- 1 files changed, 4 insertions(+), 6 deletions(-) diff --git

[PATCH 2/19] iscsi class: export hw address

2007-05-30 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] Add hw address sysfs file. Signed-off-by: Mike Christie [EMAIL PROTECTED] --- drivers/scsi/scsi_transport_iscsi.c | 35 +-- include/scsi/iscsi_if.h |8 include/scsi/scsi_transport_iscsi.h |5

[PATCH 10/19] iscsi class, iscsi_tcp, ib_iser: add sysfs chap file

2007-05-30 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] The attached patches add sysfs files for the chap settings to the iscsi transport class, iscsi_tcp and ib_iser. This is needed for software iscsi because there are times when iscsid can die and it will need to reread the values it was using. And it is needed

[PATCH 9/19] iscsi: Some fixes in preparation for bidirectional support - total_length

2007-05-30 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] - Remove shadow of request length from struct iscsi_cmd_task. - change all users to use scsi_cmnd-request_bufflen directly (With bidi we will use scsi-ml API to retrieve in/out length) Signed-off-by: Boaz Harrosh [EMAIL PROTECTED] Signed-off-by: Benny

[PATCH 8/19] iscsi: Some fixes in preparation for bidirectional support - exp_datasn

2007-05-30 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] This patch fixes handling of expected datasn/r2tsn as received from target. It is done according to: T10 rfc3720 section 3.2.2.3. Data Sequencing. . unify expected datasn/r2tsn into one counter . calculate than check expected datasn/r2tsn. On error print a

[PATCH 11/19] iscsi tcp: fix iscsi xmit state machine

2007-05-30 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] If iscsi_tcp partially sends a header, it would recalculate the header size and readd the size of the digest (if header digests are used).This would cause us to send sizeof(digest) extra bytes when we sent the rest of the header. Signed-off-by: Mike Christie

[PATCH 12/19] libiscsi: fix iscsi cmdsn allocation

2007-05-30 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] The cmdsn allocation and pdu transmit code can race, and we can end up sending a pdu with cmdsn 10 before a pdu with 5. The target will then fail the connection/session. This patch fixes the problem by delaying the cmdsn allocation until we are about to send

[PATCH 13/19] libiscsi: make can_queue configurable

2007-05-30 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] This patch allows us to set can_queue and cmds_per_lun from userspace when we create the session/host. From there we can set it on a per target basis. The patch fully converts iscsi_tcp, but only hooks up ib_iser for cmd_per_lun since it currently has a lots

[PATCH 16/19] qla4xxx: add iscsi_transport capps for fw capacilities

2007-05-30 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] Userspace will want to know what the driver/FW/HW capabilites when it comes to some operations like if the hardware can do discovery or if it can store iscsi info like what target was used for boot. This patch adds some new caps so userspace can tell if the

[PATCH 17/19] iscsi_tcp: fix fd leak

2007-05-30 Thread michaelc
From: Mike Christie [EMAIL PROTECTED] This patch should fix the file descriptor leak problem. A quick look through the kernel shows that users of sockfd_lookup use sockfd_put to release their handle. We were using sock_release which from the comments and code look like it does not release the

  1   2   >