<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/target, branch v3.3</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/target?h=v3.3</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/target?h=v3.3'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-03-14T04:43:58Z</updated>
<entry>
<title>iscsi-target: Fix reservation conflict -EBUSY response handling bug</title>
<updated>2012-03-14T04:43:58Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2012-03-14T01:20:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=00fdc6bbef77844ce397a7de7acfaf25e8e2e4eb'/>
<id>urn:sha1:00fdc6bbef77844ce397a7de7acfaf25e8e2e4eb</id>
<content type='text'>
This patch addresses a iscsi-target specific bug related to reservation conflict
handling in iscsit_handle_scsi_cmd() that has been causing reservation conflicts
to complete and not fail as expected due to incorrect errno checking.  The problem
occured with the change to return -EBUSY from transport_generic_cmd_sequencer() -&gt;
transport_generic_allocate_tasks() failures, that broke iscsit_handle_scsi_cmd()
checking for -EINVAL in order to invoke a non GOOD status response.

This was manifesting itself as data corruption with legacy SPC-2 reservations,
but also effects iscsi-target LUNs with SPC-3 persistent reservations.

This bug was originally introduced in lio-core commit:

commit 03e98c9eb916f3f0868c1dc344dde2a60287ff72
Author: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Date:   Fri Nov 4 02:36:16 2011 -0700

    target: Address legacy PYX_TRANSPORT_* return code breakage

Reported-by: Martin Svec &lt;martin.svec@zoner.cz&gt;
Cc: Martin Svec &lt;martin.svec@zoner.cz&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Fix compatible reservation handling (CRH=1) with legacy RESERVE/RELEASE</title>
<updated>2012-03-14T04:43:43Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2012-03-14T04:29:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=087a03b3ea1c8d6e2d5743a8d1c6d571058caa04'/>
<id>urn:sha1:087a03b3ea1c8d6e2d5743a8d1c6d571058caa04</id>
<content type='text'>
This patch addresses a bug with target_check_scsi2_reservation_conflict()
return checking in target_scsi2_reservation_[reserve,release]() that was
preventing CRH=1 operation from silently succeeding in the two special
cases defined by SPC-3, and not failing with reservation conflict status
when dealing with legacy RESERVE/RELEASE + active SPC-3 PR logic.

Also explictly set cmd-&gt;scsi_status = SAM_STAT_RESERVATION_CONFLICT during
the early non reservation holder failure from pr_ops-&gt;t10_seq_non_holder()
check in transport_generic_cmd_sequencer() for fabrics that already expect
it to be set.

This bug was originally introduced in mainline commit:

commit eacac00ce5bfde8086cd0615fb53c986f7f970fe
Author: Christoph Hellwig &lt;hch@infradead.org&gt;
Date:   Thu Nov 3 17:50:40 2011 -0400

    target: split core_scsi2_emulate_crh

Reported-by: Martin Svec &lt;martin.svec@zoner.cz&gt;
Cc: Martin Svec &lt;martin.svec@zoner.cz&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Fix unsupported WRITE_SAME sense payload</title>
<updated>2012-02-07T06:48:58Z</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=67236c44741e250199ccd77f1115568e68cf8848'/>
<id>urn:sha1:67236c44741e250199ccd77f1115568e68cf8848</id>
<content type='text'>
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;
</content>
</entry>
<entry>
<title>iscsi: use IP_FREEBIND socket option</title>
<updated>2012-02-07T06:48:53Z</updated>
<author>
<name>Dax Kelson</name>
<email>dkelson@gurulabs.com</email>
</author>
<published>2012-02-04T06:40:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9f9ef6d3c08319defc29e4cf6ef2868d15ed0cc3'/>
<id>urn:sha1:9f9ef6d3c08319defc29e4cf6ef2868d15ed0cc3</id>
<content type='text'>
Use IP_FREEBIND socket option so that iscsi portal configuration with
explicit IP addresses can happen during boot, before network interfaces
have been assigned IPs.

This is especially important on systemd based Linux boxes where system
boot happens asynchronously and non-trivial configuration must be done
to get targetcli.service to start synchronously after the network is
configured.

Reference:
http://lists.fedoraproject.org/pipermail/devel/2011-October/158025.html

Signed-off-by: Dax Kelson &lt;dkelson@gurulabs.com&gt;
Cc: "Nicholas A. Bellinger" &lt;nab@linux-iscsi.org&gt;
Cc: "Andy Grover" &lt;agrover@redhat.com&gt;
Cc: "Lennart Poettering" &lt;lennart@poettering.net&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>iblock: fix handling of large requests</title>
<updated>2012-02-07T06:48:46Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@infradead.org</email>
</author>
<published>2012-02-02T21:51:24Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5c55125f4794f4e77574fc09839cb47b0eb45b06'/>
<id>urn:sha1:5c55125f4794f4e77574fc09839cb47b0eb45b06</id>
<content type='text'>
Requesting to many bvecs upsets bio_alloc_bioset, so limit the number we ask
for to the amount it can handle.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: handle empty string writes in sysfs</title>
<updated>2012-02-07T06:48:40Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2012-01-27T12:50:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3011684c0b0b77b0f88113ef1c15b18befc6734a'/>
<id>urn:sha1:3011684c0b0b77b0f88113ef1c15b18befc6734a</id>
<content type='text'>
These are root only and we're not likely to hit the problem in practise,
but it makes the static checkers happy.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>iscsi_target: in_aton needs linux/inet.h</title>
<updated>2012-02-07T06:48:30Z</updated>
<author>
<name>Stephen Rothwell</name>
<email>sfr@canb.auug.org.au</email>
</author>
<published>2012-01-23T00:39:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c3bc93da24c8f315d9ece741f6e6414a38879ec6'/>
<id>urn:sha1:c3bc93da24c8f315d9ece741f6e6414a38879ec6</id>
<content type='text'>
Fixes this error after a recent nfs cleanup:

drivers/target/iscsi/iscsi_target_configfs.c: In function 'lio_target_call_addnptotpg':
drivers/target/iscsi/iscsi_target_configfs.c:214:3: error: implicit declaration of function 'in6_pton' [-Werror=implicit-function-declaration]
drivers/target/iscsi/iscsi_target_configfs.c:239:3: error: implicit declaration of function 'in_aton' [-Werror=implicit-function-declaration]

Signed-off-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Fix iblock se_dev_attrib.unmap_granularity</title>
<updated>2012-02-07T06:48:20Z</updated>
<author>
<name>Marco Sanvido</name>
<email>marco@purestorage.com</email>
</author>
<published>2012-01-20T23:49:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7347b5ff7090b2b399b7921a266255cd55bbd78f'/>
<id>urn:sha1:7347b5ff7090b2b399b7921a266255cd55bbd78f</id>
<content type='text'>
The block layer keeps q-&gt;limits.discard_granularity in bytes, but iblock
(and the SCSI Block Limits VPD page) keep unmap_granularity in blocks.
Report the correct value when exporting block devices by dividing to
convert bytes to blocks.

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Fix target_submit_cmd() exception handling</title>
<updated>2012-02-07T06:47:11Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2012-01-21T03:02:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=735703cac08f34a197e1c6331ca9adc8a52d6046'/>
<id>urn:sha1:735703cac08f34a197e1c6331ca9adc8a52d6046</id>
<content type='text'>
This patch fixes a bug in target_submit_cmd() where the failure path
for transport_generic_allocate_tasks() made a direct call to
transport_send_check_condition_and_sense() and not calling the
final target_put_sess_cmd() release callback.

For transport_generic_allocate_tasks() failures, use the proper call to
transport_generic_request_failure() to handle kref_put() along
with potential internal queue full response processing.

It also makes transport_lookup_cmd_lun() failures in
target_submit_cmd() use transport_send_check_condition_and_sense() and
target_put_sess_cmd() directly to avoid se_cmd-&gt;se_dev reference in
transport_generic_request_failure() handling.

Finally it drops the out_check_cond: label and use direct reference for
allocate task failures, and per-se_device queue_full handling is
currently not supported for transport_lookup_cmd_lun() failure
descriptors due to se_device dependency.

Reported-by: Roland Dreier &lt;roland@purestorage.com&gt;
Cc: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Change target_submit_cmd() to return void</title>
<updated>2012-02-07T06:41:04Z</updated>
<author>
<name>Andy Grover</name>
<email>agrover@redhat.com</email>
</author>
<published>2012-01-19T21:39:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1edcdb497ef418122cd4f98e157660cf594b345a'/>
<id>urn:sha1:1edcdb497ef418122cd4f98e157660cf594b345a</id>
<content type='text'>
Retval not very useful, and may even be harmful. Once submitted, fabrics
should expect a sense error if anything goes wrong. All fabrics checking
of this retval are useless or broken:

fc checks it just to emit more debug output.
ib_srpt trickles retval up, then it is ignored.
qla2xxx trickles it up, which then causes a bug because the abort goto
in qla_target.c thinks cmd hasn't been sent to target.

Just returning nothing is best.

Signed-off-by: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
</feed>
