<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/target, branch v3.5</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v3.5</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2012-07-17T00:10:17Z</updated>
<entry>
<title>target: Fix range calculation in WRITE SAME emulation when num blocks == 0</title>
<updated>2012-07-17T00:10:17Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2012-07-17T00:10:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1765fe5edcb83f53fc67edeb559fcf4bc82c6460'/>
<id>urn:sha1:1765fe5edcb83f53fc67edeb559fcf4bc82c6460</id>
<content type='text'>
When NUMBER OF LOGICAL BLOCKS is 0, WRITE SAME is supposed to write
all the blocks from the specified LBA through the end of the device.
However, dev-&gt;transport-&gt;get_blocks(dev) (perhaps confusingly) returns
the last valid LBA rather than the number of blocks, so the correct
number of blocks to write starting with lba is

dev-&gt;transport-&gt;get_blocks(dev) - lba + 1

(nab: Backport roland's for-3.6 patch to for-3.5)

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Cc: Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Clean up returning errors in PR handling code</title>
<updated>2012-07-16T23:42:40Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2012-07-16T22:17:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d35212f3ca3bf4fb49d15e37f530c9931e2d2183'/>
<id>urn:sha1:d35212f3ca3bf4fb49d15e37f530c9931e2d2183</id>
<content type='text'>
 - instead of (PTR_ERR(file) &lt; 0) just use IS_ERR(file)
 - return -EINVAL instead of EINVAL
 - all other error returns in target_scsi3_emulate_pr_out() use
   "goto out" -- get rid of the one remaining straight "return."

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>tcm_fc: Fix crash seen with aborts and large reads</title>
<updated>2012-07-14T22:17:29Z</updated>
<author>
<name>Mark Rustad</name>
<email>mark.d.rustad@intel.com</email>
</author>
<published>2012-07-14T01:18:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3cc5d2a6b9a2fd1bf024aa5e52dd22961eecaf13'/>
<id>urn:sha1:3cc5d2a6b9a2fd1bf024aa5e52dd22961eecaf13</id>
<content type='text'>
This patch fixes a crash seen when large reads have their exchange
aborted by either timing out or being reset. Because the exchange
abort results in the seq pointer being set to NULL, because the
sequence is no longer valid, it must not be dereferenced. This
patch changes the function ft_get_task_tag to return ~0 if it is
unable to get the tag for this reason. Because the get_task_tag
interface provides no means of returning an error, this seems
like the best way to fix this issue at the moment.

Signed-off-by: Mark Rustad &lt;mark.d.rustad@intel.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>tcm_fc: Resolve suspicious RCU usage warnings</title>
<updated>2012-07-06T19:52:09Z</updated>
<author>
<name>Mark Rustad</name>
<email>mark.d.rustad@intel.com</email>
</author>
<published>2012-06-26T22:57:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=863555be0c81558b1af277addcf68acb8f778860'/>
<id>urn:sha1:863555be0c81558b1af277addcf68acb8f778860</id>
<content type='text'>
Use rcu_dereference_protected to tell rcu that the ft_lport_lock
is held during ft_lport_create. This resolved "suspicious RCU usage"
warnings when debugging options are turned on.

Signed-off-by: Mark Rustad &lt;mark.d.rustad@intel.com&gt;
Tested-by: Ross Brattain &lt;ross.b.brattain@intel.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Return error to initiator if SET TARGET PORT GROUPS emulation fails</title>
<updated>2012-06-13T03:12:25Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2012-06-05T06:24:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=59e4f541baf728dbb426949bfa9f6862387ffd0e'/>
<id>urn:sha1:59e4f541baf728dbb426949bfa9f6862387ffd0e</id>
<content type='text'>
The error paths in target_emulate_set_target_port_groups() are all
essentially "rc = -EINVAL; goto out;" but the code at "out:" ignores
rc and always returns success.  This means that even if eg explicit
ALUA is turned off, the initiator will always see a good SCSI status
for SET TARGET PORT GROUPS.

Fix this by returning rc as is intended.  It appears this bug was
added by the following patch:

commit 05d1c7c0d0db4cc25548d9aadebb416888a82327
Author: Andy Grover &lt;agrover@redhat.com&gt;
Date:   Wed Jul 20 19:13:28 2011 +0000

    target: Make all control CDBs scatter-gather

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Cc: Andy Grover &lt;agrover@redhat.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Add TFO-&gt;put_session() caller for HW fabric session shutdown</title>
<updated>2012-06-13T02:33:05Z</updated>
<author>
<name>Joern Engel</name>
<email>joern@logfs.org</email>
</author>
<published>2012-05-18T20:57:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4149268e7816d719b0fde8e89aaa6db8c168fc43'/>
<id>urn:sha1:4149268e7816d719b0fde8e89aaa6db8c168fc43</id>
<content type='text'>
This patch adds an optional target_core_fabric_ops-&gt;put_session() caller
within the existing target_put_session() code path.

This is required by tcm_qla2xxx code in order to invoke it's own fabric
specific session shutdown handler using se_session-&gt;sess_kref.

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Cc: Roland Dreier &lt;roland@purestorage.com&gt;
Cc: Arun Easi &lt;arun.easi@qlogic.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target/file: Use O_DSYNC by default for FILEIO backends</title>
<updated>2012-06-03T06:47:20Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2012-05-30T23:25:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a4dff3043c231d57f982af635c9d2192ee40e5ae'/>
<id>urn:sha1:a4dff3043c231d57f982af635c9d2192ee40e5ae</id>
<content type='text'>
Convert to use O_DSYNC for all cases at FILEIO backend creation time to
avoid the extra syncing of pure timestamp updates with legacy O_SYNC during
default operation as recommended by hch.  Continue to do this independently of
Write Cache Enable (WCE) bit, as WCE=0 is currently the default for all backend
devices and enabled by user on per device basis via attrib/emulate_write_cache.

This patch drops the now unnecessary fd_buffered_io= token usage that was
originally signalling when to explictly disable O_SYNC at backend creation
time for buffered I/O operation.  This can end up being dangerous for a number
of reasons during physical node failure, so go ahead and drop this option
for now when O_DSYNC is used as the default.

Also allow explict FUA WRITEs -&gt; vfs_fsync_range() call to function in
fd_execute_cmd() independently of WCE bit setting.

Reported-by: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>sbp-target: rename a variable to avoid name clash</title>
<updated>2012-05-30T23:15:33Z</updated>
<author>
<name>Stefan Richter</name>
<email>stefanr@s5r6.in-berlin.de</email>
</author>
<published>2012-05-24T20:07:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5f2a3d6191e49df5d56332d3b65d6636c355f635'/>
<id>urn:sha1:5f2a3d6191e49df5d56332d3b65d6636c355f635</id>
<content type='text'>
'int login_id' shadows 'static atomic_t login_id'.
Seen as compilation warning on x86-32.

Signed-off-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
Acked-by: Chris Boot &lt;bootc@bootc.net&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'sbp-target-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending</title>
<updated>2012-05-23T23:52:27Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-05-23T23:52:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2c13bc0f8f0d3e13b42be70bf74fec8e56b58324'/>
<id>urn:sha1:2c13bc0f8f0d3e13b42be70bf74fec8e56b58324</id>
<content type='text'>
Pull sbp-2 (firewire) target mode support from Nicholas Bellinger:
 "The FireWire SBP-2 Target is a driver for using an IEEE-1394
  connection as a SCSI transport.  This module uses the SCSI Target
  framework to expose LUNs to other machines attached to a FireWire bus,
  in effect acting as a FireWire hard disk similar to FireWire Target
  Disk mode on many Apple computers.

  Also included are the two drivers/firewire/ patches required by
  sbp-target to access fw_request fabric speed needed for mgt_agent
  TCODE_WRITE_BLOCK_REQUEST ops, and exporting fw_card kref logic used
  when creating/destroying active session references to individual
  endpoints.

  A credit goes to Chris in being able to get this code up and running
  so quickly w/o any target core changes, and special thanks goes out to
  Stefan Richter + Clemens Ladisch + Andy Grover for their help in
  getting this driver ready for mainline.  Also, one of Chris's goals
  was to be able to connect sbp-target to a PowerPC based MacOS-X based
  client, that he accomplished along the way in this obligatory
  screenshot:

    http://linux-iscsi.org/wiki/File:Linux-fireware-target-bootc-macosx.png

  Great work Chris + linux-1394 team !!"

Acked-by: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;

* 'sbp-target-merge' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  sbp-target: Initial merge of firewire/ieee-1394 target mode support
  firewire: Move fw_card kref functions into linux/firewire.h
  firewire: Add function to get speed from opaque struct fw_request
</content>
</entry>
<entry>
<title>Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending</title>
<updated>2012-05-22T00:37:09Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-05-22T00:37:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c9bfa7d75ba7269c97595f03c3152372e8b37823'/>
<id>urn:sha1:c9bfa7d75ba7269c97595f03c3152372e8b37823</id>
<content type='text'>
Pull scsi-target changes from Nicholas Bellinger:
 "There has been lots of work in existing code in a number of areas this
  past cycle.  The major highlights have been:

   * Removal of transport_do_task_sg_chain() from core + fabrics
     (Roland)
   * target-core: Removal of se_task abstraction from target-core and
     enforce hw_max_sectors for pSCSI backends (hch)
   * Re-factoring of iscsi-target tx immediate/response queues (agrover)
   * Conversion of iscsi-target back to using target core memory
     allocation logic (agrover)

  We've had one last minute iscsi-target patch go into for-next to
  address a nasty regression bug related to the target core allocation
  logic conversion from agrover that is not included in friday's
  linux-next build, but has been included in this series.

  On the new fabric module code front for-3.5, here is a brief status
  update for the three currently in flight this round:

   * usb-gadget target driver:

  Sebastian Siewior's driver for supporting usb-gadget target mode
  operation.  This will be going out as a separate PULL request from
  target-pending/usb-target-merge with subsystem maintainer ACKs.  There
  is one minor target-core patch in this series required to function.

   * sbp ieee-1394/firewire target driver:

  Chris Boot's driver for supportting the Serial Block Protocol (SBP)
  across IEEE-1394 Firewire hardware.  This will be going out as a
  separate PULL request from target-pending/sbp-target-merge with two
  additional drivers/firewire/ patches w/ subsystem maintainer ACKs.

   * qla2xxx LLD target mode infrastructure changes + tcm_qla2xxx:

  The Qlogic &gt;= 24xx series HW target mode LLD infrastructure patch-set
  and tcm_qla2xxx fabric driver.  Support for FC target mode using
  qla2xxx LLD code has been officially submitted by Qlogic to James
  below, and is currently outstanding but not yet merged into
  scsi.git/for-next..

    [PATCH 00/22] qla2xxx: Updates for scsi "misc" branch
    http://www.spinics.net/lists/linux-scsi/msg59350.html

  Note there are *zero* direct dependencies upon this for-next series
  for the qla2xxx LLD target + tcm_qla2xxx patches submitted above, and
  over the last days the target mode team has been tracking down an
  tcm_qla2xxx specific active I/O shutdown bug that appears to now be
  almost squashed for 3.5-rc-fixes."

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (47 commits)
  iscsi-target: Fix iov_count calculation bug in iscsit_allocate_iovecs
  iscsi-target: remove dead code in iscsi_check_valuelist_for_support
  target: Handle ATA_16 passthrough for pSCSI backend devices
  target: Add MI_REPORT_TARGET_PGS ext. header + implict_trans_secs attribute
  target: Fix MAINTENANCE_IN service action CDB checks to use lower 5 bits
  target: add support for the WRITE_VERIFY command
  target: make target_put_session void
  target: cleanup transport_execute_tasks()
  target: Remove max_sectors device attribute for modern se_task less code
  target: lock =&gt; unlock typo in transport_lun_wait_for_tasks
  target: Enforce hw_max_sectors for SCF_SCSI_DATA_SG_IO_CDB
  target: remove the t_se_count field in struct se_cmd
  target: remove the t_task_cdbs_ex_left field in struct se_cmd
  target: remove the t_task_cdbs_left field in struct se_cmd
  target: remove struct se_task
  target: move the state and execute lists to the command
  target: simplify command to task linkage
  target: always allocate a single task
  target: replace -&gt;execute_task with -&gt;execute_cmd
  target: remove the task_sectors field in struct se_task
  ...
</content>
</entry>
</feed>
