<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/target, branch v3.2.22</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/target?h=v3.2.22</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/target?h=v3.2.22'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-06-19T22:18:24Z</updated>
<entry>
<title>target: Return error to initiator if SET TARGET PORT GROUPS emulation fails</title>
<updated>2012-06-19T22:18:24Z</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.amat.us/linux/commit/?id=1686a65dce9c39014e28dc77a9ac9abd1efba48c'/>
<id>urn:sha1:1686a65dce9c39014e28dc77a9ac9abd1efba48c</id>
<content type='text'>
commit 59e4f541baf728dbb426949bfa9f6862387ffd0e upstream.

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;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
[bwh: Backported to 3.2: we have transport_complete_task()
 and not target_complete_cmd()]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>target/file: Use O_DSYNC by default for FILEIO backends</title>
<updated>2012-06-10T13:42:08Z</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.amat.us/linux/commit/?id=2492cd118dc5221953054e58f3fd81927b8beda9'/>
<id>urn:sha1:2492cd118dc5221953054e58f3fd81927b8beda9</id>
<content type='text'>
commit a4dff3043c231d57f982af635c9d2192ee40e5ae upstream.

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;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
[bwh: Backported to 3.2:
 - We have fd_do_task() and not fd_execute_cmd()
 - Various fields are in struct se_task rather than struct se_cmd
 - fd_create_virtdevice() flags initialisation hasn't been cleaned up]
</content>
</entry>
<entry>
<title>target: Fix bug in handling of FILEIO + block_device resize ops</title>
<updated>2012-05-20T21:56:51Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2012-05-16T23:05:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=dc73d6c2c18e06f2b89401a12ad0a8976462901a'/>
<id>urn:sha1:dc73d6c2c18e06f2b89401a12ad0a8976462901a</id>
<content type='text'>
commit cd9323fd68aee3c1c6b5b21e5746c9d1b586fb58 upstream.

This patch fixes a bug in the handling of FILEIO w/ underlying block_device
resize operations where the original fd_dev-&gt;fd_dev_size was incorrectly being
used in fd_get_blocks() for READ_CAPACITY response payloads.

This patch avoids using fd_dev-&gt;fd_dev_size for FILEIO devices with
an underlying block_device, and instead changes fd_get_blocks() to
get the sector count directly from i_size_read() as recommended by hch.

Reported-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>target: Fix SPC-2 RELEASE bug for multi-session iSCSI client setups</title>
<updated>2012-05-20T21:56:47Z</updated>
<author>
<name>Bernhard Kohl</name>
<email>Riedel-und-Kohl@t-online.de</email>
</author>
<published>2012-05-13T21:39:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1601be1f76779ab23b7d04f86a231ede6bd90edc'/>
<id>urn:sha1:1601be1f76779ab23b7d04f86a231ede6bd90edc</id>
<content type='text'>
commit edc318d9fea6854df752ec8c645b960b0d5a1d23 upstream.

This patch addresses a bug in a special case for target core SPC-2 RELEASE
logic where the same physical client (eg: iSCSI InitiatorName) with
differing iSCSI session identifiers (ISID) is allowed to incorrectly release
the same client's SPC-2 reservation from the non reservation holding path.

Note this bug is specific to iscsi-target w/ SPC-2 reservations, and
with the default enforce_pr_isids=1 device attr setting in target-core
controls if a InitiatorName + different ISID reservations are handled
the same as a single iSCSI client entity.

Signed-off-by: Bernhard Kohl &lt;bernhard.kohl@gmx.net&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>target: Drop incorrect se_lun_acl release for dynamic -&gt; explict ACL conversion</title>
<updated>2012-05-20T21:56:39Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2012-05-11T05:05:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0e62760a18f44b03e081d260501640ae08474973'/>
<id>urn:sha1:0e62760a18f44b03e081d260501640ae08474973</id>
<content type='text'>
commit cfebf8f42f47327fa54cf05c19b98f4bd5236a26 upstream.

This patch removes some potentially problematic legacy code within
core_clear_initiator_node_from_tpg() that was originally intended to
release left over se_lun_acl setup during dynamic NodeACL+MappedLUN
generate when running with TPG demo-mode operation.

Since we now only ever expect to allocate and release se_lun_acl from
within target_core_fabric_configfs.c:target_fabric_make_mappedlun() and
target_fabric_drop_mappedlun() context respectively, this code for
demo-mode release is incorrect and needs to be removed.

Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
</content>
</entry>
<entry>
<title>tcm_fc: Do not free tpg structure during wq allocation failure</title>
<updated>2012-04-13T15:33:49Z</updated>
<author>
<name>Mark Rustad</name>
<email>mark.d.rustad@intel.com</email>
</author>
<published>2012-04-03T17:24:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=aba6427f057d78fc9a5051d1b57f5c4798811b7c'/>
<id>urn:sha1:aba6427f057d78fc9a5051d1b57f5c4798811b7c</id>
<content type='text'>
commit 06383f10c49f507220594a455c6491ca6f8c94ab upstream.

Avoid freeing a registered tpg structure if an alloc_workqueue call
fails.  This fixes a bug where the failure was leaking memory associated
with se_portal_group setup during the original core_tpg_register() call.

Signed-off-by: Mark Rustad &lt;mark.d.rustad@intel.com&gt;
Acked-by: Kiran Patil &lt;Kiran.patil@intel.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>tcm_fc: Add abort flag for gracefully handling exchange timeout</title>
<updated>2012-04-13T15:33:49Z</updated>
<author>
<name>Mark Rustad</name>
<email>mark.d.rustad@intel.com</email>
</author>
<published>2012-04-03T17:24:41Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3e9e7cc0e5cf8d8234bce7b85692f2c6082e1e85'/>
<id>urn:sha1:3e9e7cc0e5cf8d8234bce7b85692f2c6082e1e85</id>
<content type='text'>
commit e1c4038282c7586c3544542b37872c434669d3ac upstream.

Add abort flag and use it to terminate processing when an exchange
is timed out or is reset. The abort flag is used in place of the
transport_generic_free_cmd function call in the reset and timeout
cases, because calling that function in that context would free
memory that was in use. The aborted flag allows the lifetime to
be managed in a more normal way, while truncating the processing.

This change eliminates a source of memory corruption which
manifested in a variety of ugly ways.

(nab: Drop unused struct fc_exch *ep in ft_recv_seq)

Signed-off-by: Mark Rustad &lt;mark.d.rustad@intel.com&gt;
Acked-by: Kiran Patil &lt;Kiran.patil@intel.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>target: Fix unsupported WRITE_SAME sense payload</title>
<updated>2012-04-13T15:33:48Z</updated>
<author>
<name>Martin Svec</name>
<email>martin.svec@zoner.cz</email>
</author>
<published>2012-02-07T06:13:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3c47f1832ad77075020307589e291faa7dcd7551'/>
<id>urn:sha1:3c47f1832ad77075020307589e291faa7dcd7551</id>
<content type='text'>
commit 67236c44741e250199ccd77f1115568e68cf8848 upstream.

This patch fixes a bug in target-core where unsupported WRITE_SAME ops
from a target_check_write_same_discard() failure was incorrectly
returning CHECK_CONDITION w/ TCM_INVALID_CDB_FIELD sense data.
This was causing some clients to not properly fall back, so go ahead
and use the correct TCM_UNSUPPORTED_SCSI_OPCODE sense for this case.

Reported-by: Martin Svec &lt;martin.svec@zoner.cz&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>target: Fix 16-bit target ports for SET TARGET PORT GROUPS emulation</title>
<updated>2012-04-02T16:52:48Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2012-02-24T01:22:12Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fbd49ca445e92374ddb1d43ab43d527c489905a1'/>
<id>urn:sha1:fbd49ca445e92374ddb1d43ab43d527c489905a1</id>
<content type='text'>
commit 33395fb8a13731c7ef7b175dbf5a4d8a6738fe6c upstream.

The old code did (MSB &lt;&lt; 8) &amp; 0xff, which always evaluates to 0.  Just use
get_unaligned_be16() so we don't have to worry about whether our open-coded
version is correct or not.

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>target: prevent NULL pointer dereference in target_report_luns</title>
<updated>2012-04-02T16:52:48Z</updated>
<author>
<name>Jörn Engel</name>
<email>joern@logfs.org</email>
</author>
<published>2012-02-15T21:52:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b794073eb1f5574b35c5de89ce81f108742a9879'/>
<id>urn:sha1:b794073eb1f5574b35c5de89ce81f108742a9879</id>
<content type='text'>
commit 47f1b8803e1e358ebbf4f82bfdb98971c912a2c3 upstream.

transport_kmap_data_sg can return NULL.  I never saw this trigger, but
returning -ENOMEM seems better than a crash.  Also removes a pointless
case while at it.

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
