<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/target/target_core_device.c, branch linux-4.0.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.0.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.0.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2015-04-02T04:42:51Z</updated>
<entry>
<title>target: Allow userspace to write 1 to attrib/emulate_fua_write</title>
<updated>2015-04-02T04:42:51Z</updated>
<author>
<name>Andy Grover</name>
</author>
<published>2015-03-31T22:04:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=86d65dc4fe74d5b3228fe13c5eff0b10ae6808eb'/>
<id>urn:sha1:86d65dc4fe74d5b3228fe13c5eff0b10ae6808eb</id>
<content type='text'>
Before 4.0, reading attrib/emulate_fua_write has returned 1. Saved
configs created on a pre-4.0 kernel will try to write that back when
restoring LIO configuration. This should succeed with no effect,
and issue a warning.

See https://bugzilla.redhat.com/show_bug.cgi?id=1206184

Reported-by: Yanko Kaneti &lt;yaneti@declera.com&gt;
Reported-by: Juan Quintela &lt;quintela@redhat.com&gt;
Signed-off-by: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: do not reject FUA CDBs when write cache is enabled but emulate_write_cache is 0</title>
<updated>2015-03-20T06:26:46Z</updated>
<author>
<name>Christophe Vu-Brugier</name>
</author>
<published>2015-03-19T13:30:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9bc6548f372d8c829235095d91de99d8df79db6e'/>
<id>urn:sha1:9bc6548f372d8c829235095d91de99d8df79db6e</id>
<content type='text'>
A check that rejects a CDB with FUA bit set if no write cache is
emulated was added by the following commit:

  fde9f50 target: Add sanity checks for DPO/FUA bit usage

The condition is as follows:

  if (!dev-&gt;dev_attrib.emulate_fua_write ||
      !dev-&gt;dev_attrib.emulate_write_cache)

However, this check is wrong if the backend device supports WCE but
"emulate_write_cache" is disabled.

This patch uses se_dev_check_wce() (previously named
spc_check_dev_wce) to invoke transport-&gt;get_write_cache() if the
device has a write cache or check the "emulate_write_cache" attribute
otherwise.

Reported-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Christophe Vu-Brugier &lt;cvubrugier@fastmail.fm&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Fix virtual LUN=0 target_configure_device failure OOPs</title>
<updated>2015-03-20T06:26:44Z</updated>
<author>
<name>Nicholas Bellinger</name>
</author>
<published>2015-03-05T03:28:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5f7da044f8bc1cfb21c962edf34bd5699a76e7ae'/>
<id>urn:sha1:5f7da044f8bc1cfb21c962edf34bd5699a76e7ae</id>
<content type='text'>
This patch fixes a NULL pointer dereference triggered by a late
target_configure_device() -&gt; alloc_workqueue() failure that results
in target_free_device() being called with DF_CONFIGURED already set,
which subsequently OOPses in destroy_workqueue() code.

Currently this only happens at modprobe target_core_mod time when
core_dev_setup_virtual_lun0() -&gt; target_configure_device() fails,
and the explicit target_free_device() gets called.

To address this bug originally introduced by commit 0fd97ccf45, go
ahead and move DF_CONFIGURED to end of target_configure_device()
code to handle this special failure case.

Reported-by: Claudio Fleiner &lt;cmf@daterainc.com&gt;
Cc: Claudio Fleiner &lt;cmf@daterainc.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: &lt;stable@vger.kernel.org&gt; # v3.7+
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Disallow changing of WRITE cache/FUA attrs after export</title>
<updated>2015-03-20T06:01:04Z</updated>
<author>
<name>Nicholas Bellinger</name>
</author>
<published>2015-02-23T06:17:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4b36b68ca8bab6edf7e99f859c42a91f3ad1846e'/>
<id>urn:sha1:4b36b68ca8bab6edf7e99f859c42a91f3ad1846e</id>
<content type='text'>
Now that incoming FUA=1 bit check is enforced for backends with FUA or
WCE disabled, go ahead and disallow the changing of related backend
attributes when active fabric exports exist.

This is required to avoid potential failures with existing initiator
LUN registrations that have been previously created with FUA=1.

Reported-by: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Doug Gilbert &lt;dgilbert@interlog.com&gt;
Cc: James Bottomley &lt;JBottomley@Parallels.com&gt;
Cc: Ronnie Sahlberg &lt;ronniesahlberg@gmail.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Drop left-over fabric_max_sectors attribute</title>
<updated>2015-01-09T23:22:05Z</updated>
<author>
<name>Nicholas Bellinger</name>
</author>
<published>2015-01-07T00:15:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7216dc077dfcd46e2e0143f57711c8dd2eb99e68'/>
<id>urn:sha1:7216dc077dfcd46e2e0143f57711c8dd2eb99e68</id>
<content type='text'>
Now that fabric_max_sectors is no longer used to enforce the maximum
I/O size, go ahead and drop it's left-over usage in target-core and
associated backend drivers.

Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Martin K. Petersen &lt;martin.petersen@oracle.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: Drop arbitrary maximum I/O size limit</title>
<updated>2015-01-09T23:21:40Z</updated>
<author>
<name>Nicholas Bellinger</name>
</author>
<published>2015-01-07T00:10:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=046ba64285a4389ae5e9a7dfa253c6bff3d7c341'/>
<id>urn:sha1:046ba64285a4389ae5e9a7dfa253c6bff3d7c341</id>
<content type='text'>
This patch drops the arbitrary maximum I/O size limit in sbc_parse_cdb(),
which currently for fabric_max_sectors is hardcoded to 8192 (4 MB for 512
byte sector devices), and for hw_max_sectors is a backend driver dependent
value.

This limit is problematic because Linux initiators have only recently
started to honor block limits MAXIMUM TRANSFER LENGTH, and other non-Linux
based initiators (eg: MSFT Fibre Channel) can also generate I/Os larger
than 4 MB in size.

Currently when this happens, the following message will appear on the
target resulting in I/Os being returned with non recoverable status:

  SCSI OP 28h with too big sectors 16384 exceeds fabric_max_sectors: 8192

Instead, drop both [fabric,hw]_max_sector checks in sbc_parse_cdb(),
and convert the existing hw_max_sectors into a purely informational
attribute used to represent the granuality that backend driver and/or
subsystem code is splitting I/Os upon.

Also, update FILEIO with an explicit FD_MAX_BYTES check in fd_execute_rw()
to deal with the one special iovec limitiation case.

v2 changes:
  - Drop hw_max_sectors check in sbc_parse_cdb()

Reported-by: Lance Gropper &lt;lance.gropper@qosserver.com&gt;
Reported-by: Stefan Priebe &lt;s.priebe@profihost.ag&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Cc: Roland Dreier &lt;roland@purestorage.com&gt;
Cc: stable@vger.kernel.org # 3.4
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Drop left-over PHBA_PDEV set attr checks</title>
<updated>2014-12-02T05:36:21Z</updated>
<author>
<name>Nicholas Bellinger</name>
</author>
<published>2014-11-28T05:39:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4b2f57e5ced40e91cbf8886d7dc40a9474d2f5c0'/>
<id>urn:sha1:4b2f57e5ced40e91cbf8886d7dc40a9474d2f5c0</id>
<content type='text'>
Now that PSCSI is only exposing four hw_* read-only device attributes,
go ahead and drop the left-over -&gt; legacy PHBA_PDEV checks in various
se_dev_set_* code, since it's now only used by virtual devices.

Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Add EXPORT_SYMBOL for existing se_dev_set_*</title>
<updated>2014-12-02T05:36:02Z</updated>
<author>
<name>Nicholas Bellinger</name>
</author>
<published>2014-11-28T03:15:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d30cd1238c2f89662c82d5d2c4686971a6dc3693'/>
<id>urn:sha1:d30cd1238c2f89662c82d5d2c4686971a6dc3693</id>
<content type='text'>
Now that target_core_backend_configfs.h macros will be using these
se_dev_set attribute functions externally to allow backend drivers
to populate different attributes, go ahead and add EXPORT_SYMBOL()
for the existing default set of 30 device attributes.

Also update target_core_backend.h with proper function prototypes.

Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Add force_pr_aptpl device attribute</title>
<updated>2014-10-04T05:41:20Z</updated>
<author>
<name>Nicholas Bellinger</name>
</author>
<published>2014-10-04T01:06:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=92404e609a2dffc55a9a22540ed48b6f0edc9c59'/>
<id>urn:sha1:92404e609a2dffc55a9a22540ed48b6f0edc9c59</id>
<content type='text'>
This patch adds a force_pr_aptpl device attribute used to force SPC-3 PR
Activate Persistence across Target Power Loss (APTPL) operation.  This
makes PR metadata write-out occur during state change regardless if new
PERSISTENT_RESERVE_OUT CDBs have their APTPL feature bit set.

This is useful during H/A failover in active/passive setups where all PR
state is being re-created on a different node, driven by configfs backend
device + export layout and pre-loaded $DEV/pr/res_aptpl_metadata.

Cc: Mike Christie &lt;michaelc@cs.wisc.edu&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Fix APTPL metadata handling for dynamic MappedLUNs</title>
<updated>2014-10-04T05:40:19Z</updated>
<author>
<name>Nicholas Bellinger</name>
</author>
<published>2014-10-04T04:23:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e24805637d2d270d7975502e9024d473de86afdb'/>
<id>urn:sha1:e24805637d2d270d7975502e9024d473de86afdb</id>
<content type='text'>
This patch fixes a bug in handling of SPC-3 PR Activate Persistence
across Target Power Loss (APTPL) logic where re-creation of state for
MappedLUNs from dynamically generated NodeACLs did not occur during
I_T Nexus establishment.

It adds the missing core_scsi3_check_aptpl_registration() call during
core_tpg_check_initiator_node_acl() -&gt; core_tpg_add_node_to_devs() in
order to replay any pre-loaded APTPL metadata state associated with
the newly connected SCSI Initiator Port.

Cc: Mike Christie &lt;michaelc@cs.wisc.edu&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
</feed>
