Commit Graph

3969 Commits

Author SHA1 Message Date
Yan Burman
e900e70a06 isert: Fix race between target_del_all() and iscsit_unregister_transport()
When iscsi-scstd exits for some reason, release on character device ctr_name is called.
The release function of this character device calls target_del_all().
In order to avoid a scenario where isert-scst is being removed at the same time
as iscsi-scstd is closing ctr_name device, increment reference count in portal creation
so that the module will not disappear before target_del_all() finishes using it.

This scenario is only relevant for isert-scst, as iscsi-scst will have positive reference count
at least untill target_del_all() finishes due to __fput() being called only after the release
method of the character device has returned.

Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5327 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-13 14:48:33 +00:00
Yan Burman
0d0d959485 Merged revisions 5246-5256,5260,5264,5266-5277,5281-5296,5300-5312,5315-5316,5320 via svnmerge from
svn+ssh://yanb123@svn.code.sf.net/p/scst/svn/trunk

........
  r5246 | vlnb | 2014-01-29 05:30:24 +0200 (Wed, 29 Jan 2014) | 3 lines
  
  Put CDB control byte parsing in one place
........
  r5247 | vlnb | 2014-01-29 06:16:58 +0200 (Wed, 29 Jan 2014) | 3 lines
  
  Better version of the previous patch
........
  r5248 | vlnb | 2014-01-30 03:40:48 +0200 (Thu, 30 Jan 2014) | 7 lines
  
  [PATCH 1/2] scst_sysfs: Make it easier to add new target sysfs attributes
  
  This patch does not change any functionality.
  
  Signed-off-by: Bart Van Assche <bvanassche@acm.org>
........
  r5249 | vlnb | 2014-01-30 03:41:54 +0200 (Thu, 30 Jan 2014) | 10 lines
  
  [PATCH 2/2] scst_sysfs: Add I/O statistics per target
  
  Although it is possible to obtain these statistics by iterating over
  all sessions and by computing the sum of the per-target statistics,
  make per-target statistics directly available such that these can be
  retrieved easily.
  
  Signed-off-by: Bart Van Assche <bvanassche@acm.org>
........
  r5250 | vlnb | 2014-01-30 04:32:44 +0200 (Thu, 30 Jan 2014) | 3 lines
  
  Update for 3.13 kernels
........
  r5251 | bvassche | 2014-01-30 11:16:27 +0200 (Thu, 30 Jan 2014) | 1 line
  
  nightly build: Add kernel 3.13 build infrastructure
........
  r5252 | bvassche | 2014-01-30 11:30:18 +0200 (Thu, 30 Jan 2014) | 1 line
  
  scripts/kernel-functions: Add a bug fix for the kernel 3.13 series that is not yet present in the kernel 3.13 stable series
........
  r5253 | bvassche | 2014-01-30 11:31:32 +0200 (Thu, 30 Jan 2014) | 1 line
  
  nightly build: Add kernel version 3.13.1
........
  r5254 | vlnb | 2014-01-31 04:32:02 +0200 (Fri, 31 Jan 2014) | 10 lines
  
  scst_pres: Simplify PR locking
  
  Since the time during which a PR read or write lock is held is short,
  use a mutex to implement PR read and write locking. So although this
  patch excludes multiple simultaneous readers that shouldn't affect the
  time needed to process a PR operation measurably.
  
  Signed-off-by: Bart Van Assche <bvanassche@acm.org>
........
  r5255 | vlnb | 2014-01-31 04:33:11 +0200 (Fri, 31 Jan 2014) | 5 lines
  
  scst_vdisk: Check that "filename" is specified at most once
  
  Signed-off-by: Bart Van Assche <bvanassche@acm.org>
........
  r5256 | vlnb | 2014-01-31 04:35:20 +0200 (Fri, 31 Jan 2014) | 5 lines
  
  scst_vdisk: Sort "add_device_parameters" alphabetically
  
  Signed-off-by: Bart Van Assche <bvanassche@acm.org>
........
  r5260 | bvassche | 2014-02-03 11:03:03 +0200 (Mon, 03 Feb 2014) | 1 line
  
  scripts/list-source-files: Handle Mercurial subdirectories properly
........
  r5264 | bvassche | 2014-02-06 14:46:51 +0200 (Thu, 06 Feb 2014) | 9 lines
  
  scst_local: Fix a kernel oops for kernel versions < 2.6.37
  
  Avoid that scst_local triggers "BUG: unable to handle kernel NULL
  pointer dereference" on kernel versions before 2.6.37. This patch
  fixes a regression introduced via patch "scst_local: Avoid
  deadlock during module removal with kernel 3.6" (trunk r4566).
  
  Reported-by: Sebastian Herbszt <herbszt@gmx.de>
........
  r5266 | bvassche | 2014-02-06 15:30:06 +0200 (Thu, 06 Feb 2014) | 14 lines
  
  Hush Coverity warning of scst_ws_push_single_write() uninitialized pointer
  
  Coverity warns that sgv may be used uninitialized. The warning
  applies to WRITE SAME commands with LBDATA == PBDATA == 0 (replicate
  a single block of user data into the specified LBA range).
  
  The warning appears to be spurious - when LBDATA == PBDATA == 0,
  scst_ws_write_cmd_finished() will not use the uninitialized value
  saved by scst_ws_push_single_write().
  
  Move initialization of sgv earlier in the function to quiesce the warning.
  
  Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
........
  r5267 | bvassche | 2014-02-06 15:38:28 +0200 (Thu, 06 Feb 2014) | 7 lines
  
  qla2x00t: Re-sync help text with the code
  
  The ql2xfdmienable module parameter defaults to 1, but the help text
  claims it defaults to zero.
  
  Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
........
  r5268 | bvassche | 2014-02-06 16:17:49 +0200 (Thu, 06 Feb 2014) | 6 lines
  
  ib_srpt: Avoid that disabling a target triggers a race condition
  
  Avoid that disabling a target triggers a race condition with
  SRP relogin. At least in theory this race condition could result
  in a kernel crash.
........
  r5269 | bvassche | 2014-02-07 09:31:38 +0200 (Fri, 07 Feb 2014) | 9 lines
  
  scst_sysfs: Fix a build failure on kernels 2.6.2[678]
  
  The sysfs API is supported from kernel 2.6.26 on and uses the swap()
  macro while the swap() macro was introduced in kernel 2.6.29. Hence
  provide a definition of the swap() macro for kernels before 2.6.29.
  
  Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
  [bvanassche: Moved swap() definition a few lines down and added #ifndef/#endif]
........
  r5270 | bvassche | 2014-02-07 09:45:15 +0200 (Fri, 07 Feb 2014) | 2 lines
  
  regression tests: Run the 2.6.26..2.6.32 tests on the sysfs code instead of procfs
........
  r5271 | bvassche | 2014-02-07 10:11:28 +0200 (Fri, 07 Feb 2014) | 1 line
  
  nightly build: Update kernel versions
........
  r5272 | bvassche | 2014-02-07 14:43:25 +0200 (Fri, 07 Feb 2014) | 16 lines
  
  scst_user, rt: Wake command processing thread when needed
  
  In a fully-preemptible realtime kernel (CONFIG_PREEMPT_RT_FULL=y),
  SCSI commands from an initiator time out because the userland target
  application is never woken to process them.
  
  This is because in a fully-preemptible realtime kernel, soft-IRQ
  (tasklet) execution always occurs in a ksoftirqd thread and
  preempt_count is not manipulated on soft-IRQ processing entry/exit.
  This makes in_interrupt() useless for determining whether soft-IRQ
  processing is occurring; instead, in_serving_softirq() should be
  used for that purpose.
  
  Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
  [bvanassche: Elaborated source code comment]
........
  r5273 | bvassche | 2014-02-07 14:46:39 +0200 (Fri, 07 Feb 2014) | 9 lines
  
  scst_vdisk: Build fix for kernels 2.6.27..2.6.30
  
  add_to_page_cache_lru and __lock_page_killable are exported since
  kernel version 2.6.30. See also patch "Staging: pohmelfs: kconfig/makefile
  and vfs changes" (commit 18bc0bbd162e3eb3e7ea2953c315ad4113a57164;
  included in kernel v2.6.30). 
  
  Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
........
  r5274 | vlnb | 2014-02-08 03:04:27 +0200 (Sat, 08 Feb 2014) | 9 lines
  
  scst_user: Convert sgv_purge_interval to jiffies before use
  
  The sgv_purge_interval from userland is passed down without conversion to
  jiffies. Yet, if it is zero, the default value is (60 * HZ).
  Convert to jiffies before passing down.
  
  Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
........
  r5275 | vlnb | 2014-02-08 03:52:03 +0200 (Sat, 08 Feb 2014) | 19 lines
  
  Fix spurious BUG when parse_type != SCST_USER_PARSE_STANDARD
  
  Changeset 4224 introduced EXTRACHECKS for valid lba/data_len and state
  at the end of the parsing phase of command processing.
  However, the checks do not account for deferral of parsing to userland,
  as occurs when SCST_USER_PARSE_CALL or SCST_USER_PARSE_EXCEPTION are specified.
  In such cases the checks report errors on commands that userland has not yet
  had an opportunity to parse.
  
  NOTE: this includes a refactoring of the EXTRACHECKS to improve clarity.
        The rework is not exactly equivalent to the original code, but does
        conform to the comments describing the original code.
        Specifically, the original code would not trap an illegal command state
        unless there was also an illegal lba or data_len.
  
  Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
  with some improvements
........
  r5276 | bvassche | 2014-02-08 10:24:28 +0200 (Sat, 08 Feb 2014) | 1 line
  
  scst: Build fix for kernel versions before 2.6.37
........
  r5277 | bvassche | 2014-02-09 18:50:10 +0200 (Sun, 09 Feb 2014) | 1 line
  
  scst_debug.h: Avoid that the sBUG() and sBUG_ON() definitions confuse the smatch static code checker
........
  r5281 | vlnb | 2014-02-13 06:02:56 +0200 (Thu, 13 Feb 2014) | 8 lines
  
  iscsi-scst: fix offset calculation
  
  Fixed a subtle bug in iSCSI-SCST with incorrectly calculated offsets
  for non-page aligned transfers. Originally discovered, investigated and
  fix suggested by Кирилл Тюшев, then Shahar Salzman tested and proved it.
  See http://sourceforge.net/mailarchive/message.php?msg_id=31924078
........
  r5282 | vlnb | 2014-02-13 06:15:31 +0200 (Thu, 13 Feb 2014) | 3 lines
  
  Web update
........
  r5283 | bvassche | 2014-02-14 15:05:55 +0200 (Fri, 14 Feb 2014) | 7 lines
  
  Makefiles: remove redundant 'depmod' invocations
  
  Running 'make modules_install' already triggers invocation of depmod,
  hence leave it out from those Makefiles that use 'make modules_install'.
  
  Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
........
  r5284 | bvassche | 2014-02-14 15:48:54 +0200 (Fri, 14 Feb 2014) | 2 lines
  
  Makefiles: Convert from "install" to "make modules_install"
........
  r5285 | bvassche | 2014-02-14 16:46:11 +0200 (Fri, 14 Feb 2014) | 1 line
  
  mvsas_tgt/Makefile: Remove trailing whitespace
........
  r5286 | bvassche | 2014-02-14 17:52:10 +0200 (Fri, 14 Feb 2014) | 18 lines
  
  Makefiles: calculate KVER properly
      
  When deriving the kernel version (KVER) from KDIR, the file
  $(KDIR)/include/config/kernel.release should be preferred over
  'make kernelversion'.
  
  For example, the Ubuntu 3.2.0-23-generic kernel has a kernel.release
  file containing '3.2.0-23-generic', but 'make kernelversion' returns
  3.2.14. Since the modules are stored under /lib/modules/3.2.0-23-generic,
  the value in kernel.release is the correct one to use.
      
  Also:
  - Evaluate KVER only once
  - All depmod commands must include KVER
      
  Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
  [bvanassche: Split long lines / removed trailing whitespace]
........
  r5287 | bvassche | 2014-02-14 21:27:09 +0200 (Fri, 14 Feb 2014) | 1 line
  
  nightly build: Update kernel versions
........
  r5288 | bvassche | 2014-02-18 10:31:44 +0200 (Tue, 18 Feb 2014) | 22 lines
  
  scst, qla2x00t: Prevent inappropriate sleeping with a real-time kernel
  
  With a realtime kernel with full preemption (CONFIG_PREEMPT_RT_FULL),
  spinlocks can sleep, interrupt handlers run in thread context, and
  the standard local_irq functions manipulate preemptibility, not HW
  interruptibility. Under these conditions, most calls to local_irq
  functions should be replaced by no-ops. The CONFIG_PREEMPT_RT patch
  defines _nort versions of local_irq functions that compile away
  under CONFIG_PREEMPT_RT_FULL and compile to their "normal"
  equivalents otherwise.
  
  Define _nort equivalents to support compilation against both
  "normal" and RT-patched kernels, and use the _nort local_irq
  functons in cases where spinlocks are taken within a
  local_irq_save() or local_irq_disable() block.  Without these
  changes, runtime warnings about "sleeping function called from
  invalid context" occur.
  
  Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
  [bvanassche: Edited patch description and comment in scst_priv.h]
........
  r5289 | bvassche | 2014-02-18 10:40:36 +0200 (Tue, 18 Feb 2014) | 13 lines
  
  Makefiles: respect DESTDIR when specified
  
  Not all SCST components handle DESTDIR properly, or at all.
  
  In particular:
  * INSTALL_MOD_PATH should account for DESTDIR when 'make modules_install'
    is invoked, so the kernel make infrastructure deploys the modules
    and runs depmod against the proper directory tree.
  * depmods must include a '-b' option to reference the proper directory tree.
  * Drop special ISCSI_DESTDIR.
  
  Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
........
  r5290 | bvassche | 2014-02-18 10:41:30 +0200 (Tue, 18 Feb 2014) | 7 lines
  
  Makefiles: 'uninstall' target fixes
  
  Some components don't have 'uninstall' targets although the top-level
  Makefile references them. Some others don't remove the proper file.
  
  Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
........
  r5291 | vlnb | 2014-02-19 05:45:48 +0200 (Wed, 19 Feb 2014) | 8 lines
  
  Fix incorrect start and length calculation for issuing block discard requests
  
  Block layer always expects start and length in 512 byte blocks, so they
  should be corrected for non-512b SCST devices.
  
  Original patch from Ken Raeburn <raeburn@permabit.com>
........
  r5292 | vlnb | 2014-02-19 06:06:10 +0200 (Wed, 19 Feb 2014) | 3 lines
  
  Cleanups
........
  r5293 | vlnb | 2014-02-19 06:21:00 +0200 (Wed, 19 Feb 2014) | 12 lines
  
  scst_user: Complete "Preparing" / "finished" symmetry
  
  Add some TRACE statements so events sent to userland are bracketed by
  "Preparing" and "finished". This makes it a little easier to find the
  boundaries between the various stages of command processing in trace output.
  
  Note, this patch does not implement a 'finished' message for TM events;
  there is already a "TM reply" message that can serve that purpose.
  
  Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
........
  r5294 | bvassche | 2014-02-19 09:38:57 +0200 (Wed, 19 Feb 2014) | 1 line
  
  nightly build: Update kernel versions
........
  r5295 | bvassche | 2014-02-19 10:51:35 +0200 (Wed, 19 Feb 2014) | 1 line
  
  scripts/blockdev-perftest: Fix bashisms
........
  r5296 | vlnb | 2014-02-20 07:54:49 +0200 (Thu, 20 Feb 2014) | 3 lines
  
  put_page_callback patch for 3.13.3+ kernels
........
  r5300 | vlnb | 2014-02-21 04:08:05 +0200 (Fri, 21 Feb 2014) | 3 lines
  
  Docs update
........
  r5301 | bvassche | 2014-02-21 09:44:55 +0200 (Fri, 21 Feb 2014) | 1 line
  
  nightly build: Add support for the put_page_callback-3.13.3 patch
........
  r5302 | bvassche | 2014-02-21 09:48:21 +0200 (Fri, 21 Feb 2014) | 1 line
  
  nightly build: Update kernel versions
........
  r5303 | bvassche | 2014-02-21 12:02:11 +0200 (Fri, 21 Feb 2014) | 1 line
  
  nightly build: Update kernel versions
........
  r5304 | bvassche | 2014-02-21 12:09:45 +0200 (Fri, 21 Feb 2014) | 1 line
  
  nightly build: Update kernel versions
........
  r5305 | bvassche | 2014-02-24 08:56:05 +0200 (Mon, 24 Feb 2014) | 1 line
  
  nightly build: Update kernel versions
........
  r5306 | bvassche | 2014-02-24 08:56:44 +0200 (Mon, 24 Feb 2014) | 1 line
  
  Spelling fix: initator -> initiator
........
  r5307 | bvassche | 2014-02-24 09:30:50 +0200 (Mon, 24 Feb 2014) | 1 line
  
  make rpm: Do not remove rpmbuilddir
........
  r5308 | bvassche | 2014-02-24 09:39:45 +0200 (Mon, 24 Feb 2014) | 5 lines
  
  scst_local: Add newline to sysfs output
  
  Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
  [bvanassche: Reduced source code line length to 80 columns]
........
  r5309 | bvassche | 2014-02-25 12:55:36 +0200 (Tue, 25 Feb 2014) | 1 line
  
  put_page_callback-3.12.11.patch: Add
........
  r5310 | bvassche | 2014-02-25 12:57:27 +0200 (Tue, 25 Feb 2014) | 1 line
  
  put_page_callback-3.10.30.patch: Add
........
  r5311 | bvassche | 2014-02-25 12:58:08 +0200 (Tue, 25 Feb 2014) | 1 line
  
  nightly build: Add support for kernels >= 3.10.30 and >= 3.12.11
........
  r5312 | bvassche | 2014-02-25 12:59:54 +0200 (Tue, 25 Feb 2014) | 1 line
  
  nightly build: Update kernel versions
........
  r5315 | vlnb | 2014-02-26 04:32:39 +0200 (Wed, 26 Feb 2014) | 3 lines
  
  Make internal memory layout more cache friendly
........
  r5316 | vlnb | 2014-02-26 04:49:38 +0200 (Wed, 26 Feb 2014) | 5 lines
  
  scst_vdisk: Make vendor, product ID and related fields configurable via sysfs
  
  Signed-off-by: Bart Van Assche <bvanassche@acm.org>
........
  r5320 | bvassche | 2014-03-02 10:49:50 +0200 (Sun, 02 Mar 2014) | 1 line
  
  Documentation spelling fix: change INQUERY into INQUIRY
........


git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5321 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-03-03 08:18:19 +00:00
Yan Burman
f7e140ce26 isert: Add iser readme with troubleshooting advice
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5319 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-27 06:30:38 +00:00
Yan Burman
d054d4a77a isert: Fix case when iscsid is not able to handle login request on time or at all
In some cases, iscsi-scstd chooses to close the connection device and abort the connection.
This can cause invalid device state due to order of isert_conn_dev cleanup and disconnect handling.
Make sure we release isert_conn_dev only after we received disconnect event, or we passed the connection
to the kernel. This also fixes an issue if iscsi-scstd is run on very CPU intensive load and it does not receive
CPU time to serve the login requests. This may get to the extreme of initiator disconnecting before iscsi-scstd
had the chance to handle the login request.

Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5318 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-27 06:30:33 +00:00
Yan Burman
6637df7f0c isert: Rework disconnect handling
Instead of waiting for TIMEDWAIT event when disconnecting and blocking,
start the disconnect process when TIMEDWAIT event is received
and only perform the actual rdma_disconnect upon disconnect request.
Note that rdma_disconnect can not be called from atomic context, so need
to execute it from workqueue.

Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5317 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-27 06:30:26 +00:00
Yan Burman
8d6b96edbc iscsid: Make iser connection request print more verbose
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5314 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-25 13:51:34 +00:00
Yan Burman
3c5873c5e5 iscsid: Use {un,}cork_transmit instead of transmit() for clarity
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5313 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-25 13:51:27 +00:00
Yan Burman
be89fd5eff iscsid: Make sure we print error reason for all iser_accept() failures
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5299 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-20 07:20:37 +00:00
Yan Burman
934818459a isert: Add warning print when new connection handling fails
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5298 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-20 07:20:32 +00:00
Yan Burman
1a2b839ea6 isert: Print QP number when connection is established for debug
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5297 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-20 07:20:24 +00:00
Yan Burman
2b778b99ff isert: iscsi-scstd: Take into account con_blocking parameter when accepting iSER connection the same as in TCP code
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5280 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-11 08:55:54 +00:00
Yan Burman
3d3f5250ce iscsi-scstd: No need to cal set_non_blocking() twice on the same fd during accept.
set_non_blocking() is being called in alloc_and_init_conn(), so no need to call it again later

Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5279 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-11 08:55:49 +00:00
Yan Burman
d81f105ebb isert: iscsi-scstd: Make sure we do not leak any resources on failure during accept
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5278 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-11 08:55:42 +00:00
Yan Burman
9869d54f64 isert: Update TODO
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5263 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-04 11:46:52 +00:00
Yan Burman
ea47bb189c isert: Improve rdma_accept failure handling
If rdma_accept fails, use the cleanup mechanism we already have
for disconnect, instead of trying to reproduce the same cleanup.
From upper layer it really does not matter if rdma_accept failed
or we received disconnect immediately after rdma_accept succeeded.

Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5262 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-04 07:19:09 +00:00
Yan Burman
bde39e463e isert: Fix smatch issues
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5261 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-04 07:03:04 +00:00
Yan Burman
4375a5f59e isert: Update OFED compilation instructions for advanced users
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5259 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-02 14:58:39 +00:00
Yan Burman
1978c7a7ed isert: Do not call rdma_destroy_qp() when there is isert_conn_qp_destroy()
Signed-off-by: Yan Burman <yanb@mellanox.com>

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5258 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-02-02 14:58:34 +00:00
Bart Van Assche
cf03aae45e scst: Build fix for Debian GNU/Linux 6.0
Avoid that building the iscsi-scst target driver fails as follows:

iscsi-scst/kernel/isert-scst/iser_rdma.c: In function 'isert_portal_listen':
iscsi-scst/kernel/isert-scst/iser_rdma.c:1450: error: implicit declaration of function 'pr_warn'


git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5257 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-31 08:26:39 +00:00
Vladislav Bolkhovitin
91e6f7d26a iser: Make struct iscsit_transport a little bit more CPU cache friendly by combining fast path callbacks in a single cache line.
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5245 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-29 00:18:04 +00:00
Vladislav Bolkhovitin
f7915d582b Some more cleanups
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5244 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-29 00:07:14 +00:00
Vladislav Bolkhovitin
da19cd6ecc Small cleanups
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5243 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-28 22:07:45 +00:00
Vladislav Bolkhovitin
77fb4660a5 Initialized merge tracking via "svnmerge" with revisions "1-5241" from trunk
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5242 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-28 21:24:53 +00:00
Vladislav Bolkhovitin
9effb7ffc5 Copyrights updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5240 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-28 05:12:15 +00:00
Vladislav Bolkhovitin
42f648fcbc Web copyrights updated
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5239 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-28 04:56:36 +00:00
Vladislav Bolkhovitin
d567113d12 iSER target page added
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5238 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-28 04:52:39 +00:00
Vladislav Bolkhovitin
d3d69d4c89 [PATCH 9/9] scst: Add iSER module to RPM build
Signed-off-by: Yan Burman <yanb@mellanox.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5237 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-28 04:20:52 +00:00
Vladislav Bolkhovitin
623cbff5a3 [PATCH 8/9] scstadmin: Load isert-scst if iscsi is present
Signed-off-by: Yan Burman <yanb@mellanox.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5236 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-28 04:20:03 +00:00
Vladislav Bolkhovitin
c03bd27bca [PATCH 7/9] iscsid: Implement iser support
Add iser character device handling for accepting and handling connections
received through RDMA transport.
Add isert_listener device to the poll() loop and handle incoming
connection requests.

Differentiate between iser and non iser connections
Validate RDMAExtension field and reject it if found in iscsi login request.
Also, disable immediate data and first burst for iSER since it is not supported yet

Signed-off-by: Yan Burman <yanb@mellanox.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5235 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-28 04:19:27 +00:00
Vladislav Bolkhovitin
bded9b5943 [PATCH 6/9] iscsid: Refactor code for iser reuse
Refactor character device handling code as well as
connection allocation code in order to be able to reuse that in iser later on.

Signed-off-by: Yan Burman <yanb@mellanox.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5234 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-28 04:18:35 +00:00
Vladislav Bolkhovitin
39d0b2983a [PATCH 5/9] iscsid: Add start/stop transmit abstraction
In order to be able to abstract from socket and iser connection fd's
we need to have generic code that can handle both.

Signed-off-by: Yan Burman <yanb@mellanox.com>




git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5233 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-28 04:17:32 +00:00
Vladislav Bolkhovitin
5357b4c37d [PATCH 4/9] isert: Add initial isert code
Initial iSER code which also supports MLNX_OFED on RedHat and Ubuntu
as well as regular OFED

Signed-off-by: Yan Burman <yanb@mellanox.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5232 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-28 04:16:47 +00:00
Vladislav Bolkhovitin
de70fa73d9 [PATCH 3/9] iscsi: Export some functions needed by isert and refactor code for reuse
Refactor code to reuse iscsi command init in isert
Refactor conn allocation code to be able to reuse it in isert

Signed-off-by: Yan Burman <yanb@mellanox.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5231 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-28 04:15:16 +00:00
Vladislav Bolkhovitin
52e0426703 [PATCH 2/9] iscsi: Move TCP code over to transport API
Replace iscsi-tcp specific calls with transport API calls
in order to be able to override them with iser implementation specifics.
Make iscsi-tcp specific debug print into a general print
Refactor conn close code to work with isert

Only allocate RX data in NOP for iscsi-tcp
In case of iser, the data is already received

Signed-off-by: Yan Burman <yanb@mellanox.com>




git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5230 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-28 04:13:12 +00:00
Vladislav Bolkhovitin
e885ce50f3 [PATCH 1/9] iscsi: Add iSCSI transport API
Need to have transport abstraction in order to be able to add
different transport types. In particular TCP and RDMA

Signed-off-by: Yan Burman <yanb@mellanox.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5229 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-28 04:11:50 +00:00
Vladislav Bolkhovitin
a669ff2e1a Creating branch for staging iSER target
git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/iser@5228 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-28 04:03:28 +00:00
Vladislav Bolkhovitin
f635cfd011 vdisk_exec_format_unit(): Fix a sparse warning
Avoid that sparse reports the following warning:

warning: 'prot_usage' may be used uninitialized in this function

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5227 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-28 03:57:19 +00:00
Vladislav Bolkhovitin
fba7f097b7 In WT mode blockio flush is not needed, so skip this check
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5226 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-28 03:54:48 +00:00
Bart Van Assche
08623d3115 ib_srpt: Clarify a log message
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5225 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-27 19:01:24 +00:00
Bart Van Assche
fc0dc41452 nightly build: Update kernel versions
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5224 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-26 13:52:52 +00:00
Bart Van Assche
adb3c46798 fcst: Increase ft_scst_template.sg_tablesize
The libfc implementation can handle long SG lists, hence increase
ft_scst_template.sg_tablesize from 128 to 65535.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5223 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-24 10:32:43 +00:00
Vladislav Bolkhovitin
0611548744 Fix broken link from scst/README to XFS FAQ reported by Sebastian Herbszt <herbszt@gmx.de>
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5222 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-22 03:03:04 +00:00
Vladislav Bolkhovitin
85ea152e0c [PATCH] scst: Remove casts from INIT_DELAYED_WORK() statements
This is a source code cleanup patch that does not change any functionality.

Signed-off-by: Bart Van Assche <bvanassche@acm.org>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5221 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-22 02:57:49 +00:00
Bart Van Assche
2ee6484c6d scst: RHEL 5 build fix
Kernel versions before 2.6.26 do not have a definition for the
ACCESS_ONCE() macro, hence provide one.
    
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5220 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-21 14:35:22 +00:00
Bart Van Assche
72c1662421 __scst_check_deferred_commands_locked(): Add sparse locking annotation
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5219 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-21 12:03:23 +00:00
Bart Van Assche
d602302863 scst: Rework RESERVE / RELEASE handling
Reduce the number of reservation state variables from (one per
device + one per session) to one per device. Introduce helper
functions for manipulating the SPC-2 reservation state.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5218 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-21 08:09:01 +00:00
Bart Van Assche
e2fb6f4080 mpt: Use PDE_DATA if available
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5217 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-19 19:26:29 +00:00
Bart Van Assche
8db5286a87 mvsas_tgt: Fix various checkpatch complaints, mainly about whitespace usage
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5216 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-19 19:07:18 +00:00
Bart Van Assche
ed9ed528c8 mvsas_tgt: Fix sparse warnings
Also, remove unused variables, data structures and functions.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5215 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-19 18:47:02 +00:00
Bart Van Assche
ee1f37d2a5 mvsas_tgt: Port to kernel 3.12
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5214 d57e44dd-8a1f-0410-8b47-8ef2f437770f
2014-01-19 18:46:06 +00:00