<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/target, branch v3.14-rc4</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/target?h=v3.14-rc4</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/target?h=v3.14-rc4'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2014-02-12T23:14:45Z</updated>
<entry>
<title>Target/sbc: Fix protection copy routine</title>
<updated>2014-02-12T23:14:45Z</updated>
<author>
<name>Sagi Grimberg</name>
<email>sagig@mellanox.com</email>
</author>
<published>2014-02-12T09:40:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d6a65fdc8903e632aa7bf86ee0f61a73969371f6'/>
<id>urn:sha1:d6a65fdc8903e632aa7bf86ee0f61a73969371f6</id>
<content type='text'>
Need to take into account that protection sg_list
(copy-buffer) may consist of multiple entries.

Changes from v0:
- Changed commit description

Signed-off-by: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Simplify command completion by removing CMD_T_FAILED flag</title>
<updated>2014-02-12T23:14:30Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2014-02-03T22:08:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3dca1471993f9b89f3184468f8bbab2b1e024451'/>
<id>urn:sha1:3dca1471993f9b89f3184468f8bbab2b1e024451</id>
<content type='text'>
The CMD_T_FAILED flag is set used in one place to record the result of a
trivial test, and it is only tested once, few lines later.  We might as
well make the code simpler and easier to read by directly doing the test
of "success" where we want to use it.

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>iscsi-target: Fix SNACK Type 1 + BegRun=0 handling</title>
<updated>2014-02-12T23:11:17Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2014-02-03T20:55:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=752d86805b18e58c56c6f3c7004c2dffd4430c17'/>
<id>urn:sha1:752d86805b18e58c56c6f3c7004c2dffd4430c17</id>
<content type='text'>
This patch fixes Status SNACK handling of BegRun=0 to allow
for all unacknowledged respones to be resent, instead of
always assuming that BegRun would be an explicit value less
than the current ExpStatSN.

Reported-by: santosh kulkarni &lt;santosh.kulkarni@calsoftinc.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Fix missing length check in spc_emulate_evpd_83()</title>
<updated>2014-02-12T23:11:04Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2014-02-03T08:35:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6a16d7be932a9df1024836ccbb448de73afd3dd0'/>
<id>urn:sha1:6a16d7be932a9df1024836ccbb448de73afd3dd0</id>
<content type='text'>
Commit fbfe858fea2a ("target_core_spc: Include target device
descriptor in VPD page 83") added a new length variable, but (due to a
cut and paste mistake?) just checks scsi_name_len against 256 twice.
Fix this to check scsi_target_len for overflow too.

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 32-bit + CONFIG_LBDAF=n link error w/ sector_div</title>
<updated>2014-02-12T23:11:02Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2014-01-30T22:05:16Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=cdf55949c10aed90d081342264d99b2b0ed0bbf3'/>
<id>urn:sha1:cdf55949c10aed90d081342264d99b2b0ed0bbf3</id>
<content type='text'>
This patch changes core_alua_state_lba_dependent() to use do_div()
instead sector_div() to avoid the following link error on 32-bit
with CONFIG_LBDAF=n as reported by Jim:

buildlog-1391099072.txt-drivers/built-in.o: In function `target_alua_state_check':
buildlog-1391099072.txt-(.text+0x928d93): undefined reference to `__umoddi3'
buildlog-1391099072.txt:make: *** [vmlinux] Error 1 --
buildlog-1391101753.txt-  CC      init/version.o
buildlog-1391101753.txt-  LD      init/built-in.o
buildlog-1391101753.txt-drivers/built-in.o: In function `core_alua_state_lba_dependent':
buildlog-1391101753.txt-/home/jim/linux/drivers/target/target_core_alua.c:503: undefined reference to `__umoddi3'
buildlog-1391101753.txt:make: *** [vmlinux] Error 1

Reported-by: Jim Davis &lt;jim.epost@gmail.com&gt;
Cc: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Fix free-after-use regression in PR unregister</title>
<updated>2014-02-12T23:11:01Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2014-01-30T21:08:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fc09149df6e20cfbb0bb86f10899607c321a31eb'/>
<id>urn:sha1:fc09149df6e20cfbb0bb86f10899607c321a31eb</id>
<content type='text'>
This patch addresses a &gt;= v3.11 free-after-use regression
in core_scsi3_emulate_pro_register() that was introduced
in the following commit:

commit bc118fe4c4a8cfa453491ba77c0a146a6d0e73e0
Author: Andy Grover &lt;agrover@redhat.com&gt;
Date:   Thu May 16 10:41:04 2013 -0700

    target: Further refactoring of core_scsi3_emulate_pro_register()

To avoid the free-after-use, save an type value before hand, and
only call core_scsi3_put_pr_reg() with a valid *pr_reg.

Reported-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Cc: Andy Grover &lt;agrover@redhat.com&gt;
Cc: &lt;stable@vger.kernel.org&gt; #3.11+
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending</title>
<updated>2014-01-31T23:31:23Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2014-01-31T23:31:23Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=4e13c5d0212f25d69a97606b9d5a85edb52a7737'/>
<id>urn:sha1:4e13c5d0212f25d69a97606b9d5a85edb52a7737</id>
<content type='text'>
Pull SCSI target updates from Nicholas Bellinger:
 "The highlights this round include:

  - add support for SCSI Referrals (Hannes)
  - add support for T10 DIF into target core (nab + mkp)
  - add support for T10 DIF emulation in FILEIO + RAMDISK backends (Sagi + nab)
  - add support for T10 DIF -&gt; bio_integrity passthrough in IBLOCK backend (nab)
  - prep changes to iser-target for &gt;= v3.15 T10 DIF support (Sagi)
  - add support for qla2xxx N_Port ID Virtualization - NPIV (Saurav + Quinn)
  - allow percpu_ida_alloc() to receive task state bitmask (Kent)
  - fix &gt;= v3.12 iscsi-target session reset hung task regression (nab)
  - fix &gt;= v3.13 percpu_ref se_lun-&gt;lun_ref_active race (nab)
  - fix a long-standing network portal creation race (Andy)"

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (51 commits)
  target: Fix percpu_ref_put race in transport_lun_remove_cmd
  target/iscsi: Fix network portal creation race
  target: Report bad sector in sense data for DIF errors
  iscsi-target: Convert gfp_t parameter to task state bitmask
  iscsi-target: Fix connection reset hang with percpu_ida_alloc
  percpu_ida: Make percpu_ida_alloc + callers accept task state bitmask
  iscsi-target: Pre-allocate more tags to avoid ack starvation
  qla2xxx: Configure NPIV fc_vport via tcm_qla2xxx_npiv_make_lport
  qla2xxx: Enhancements to enable NPIV support for QLOGIC ISPs with TCM/LIO.
  qla2xxx: Fix scsi_host leak on qlt_lport_register callback failure
  IB/isert: pass scatterlist instead of cmd to fast_reg_mr routine
  IB/isert: Move fastreg descriptor creation to a function
  IB/isert: Avoid frwr notation, user fastreg
  IB/isert: seperate connection protection domains and dma MRs
  tcm_loop: Enable DIF/DIX modes in SCSI host LLD
  target/rd: Add DIF protection into rd_execute_rw
  target/rd: Add support for protection SGL setup + release
  target/rd: Refactor rd_build_device_space + rd_release_device_space
  target/file: Add DIF protection support to fd_execute_rw
  target/file: Add DIF protection init/format support
  ...
</content>
</entry>
<entry>
<title>target: Fix percpu_ref_put race in transport_lun_remove_cmd</title>
<updated>2014-01-30T11:58:34Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2014-01-29T01:56:30Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5259a06ef97068b710f45d092a587e8d740f750f'/>
<id>urn:sha1:5259a06ef97068b710f45d092a587e8d740f750f</id>
<content type='text'>
This patch fixes a percpu_ref_put race for se_lun-&gt;lun_ref in
transport_lun_remove_cmd() where -&gt;lun_ref could end up being
put more than once per command via different target completion
and fabric release contexts.

It adds a cmpxchg() for se_cmd-&gt;lun_ref_active to ensure that
percpu_ref_put() is only ever called once per se_cmd.

This bug was manifesting itself as a LUN shutdown regression
bug in &gt;= v3.13 code, where percpu_ref_kill() would end up
hanging indefinately due to the incorrect percpu_ref count.

(Change se_cmd-&gt;lun_ref_active from bool -&gt; int to force at
 least a 4-byte cmpxchg with MIPS ll/sc ins. - Fengguang)

Reported-by: Tommy Apel &lt;tommyapeldk@gmail.com&gt;
Cc: Tommy Apel &lt;tommyapeldk@gmail.com&gt;
Cc: &lt;stable@vger.kernel.org&gt; #3.13+
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target/iscsi: Fix network portal creation race</title>
<updated>2014-01-30T11:57:59Z</updated>
<author>
<name>Andy Grover</name>
<email>agrover@redhat.com</email>
</author>
<published>2014-01-25T00:18:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ee291e63293146db64668e8d65eb35c97e8324f4'/>
<id>urn:sha1:ee291e63293146db64668e8d65eb35c97e8324f4</id>
<content type='text'>
When creating network portals rapidly, such as when restoring a
configuration, LIO's code to reuse existing portals can return a false
negative if the thread hasn't run yet and set np_thread_state to
ISCSI_NP_THREAD_ACTIVE. This causes an error in the network stack
when attempting to bind to the same address/port.

This patch sets NP_THREAD_ACTIVE before the np is placed on g_np_list,
so even if the thread hasn't run yet, iscsit_get_np will return the
existing np.

Also, convert np_lock -&gt; np_mutex + hold across adding new net portal
to g_np_list to prevent a race where two threads may attempt to create
the same network portal, resulting in one of them failing.

(nab: Add missing mutex_unlocks in iscsit_add_np failure paths)
(DanC: Fix incorrect spin_unlock -&gt; spin_unlock_bh)

Signed-off-by: Andy Grover &lt;agrover@redhat.com&gt;
Cc: &lt;stable@vger.kernel.org&gt; #3.1+
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Report bad sector in sense data for DIF errors</title>
<updated>2014-01-25T06:58:53Z</updated>
<author>
<name>Sagi Grimberg</name>
<email>sagig@mellanox.com</email>
</author>
<published>2014-01-23T17:29:38Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=76736db3e291246fbce9db856706af3454b0b078'/>
<id>urn:sha1:76736db3e291246fbce9db856706af3454b0b078</id>
<content type='text'>
SPC-4 states that data-integrity errors shall also report
the failed sector in CHECK_CONDITION response sense data
information field.

Signed-off-by: Sagi Grimberg &lt;sagig@mellanox.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
</feed>
