<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/target, branch v3.8-rc3</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/target?h=v3.8-rc3</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/target?h=v3.8-rc3'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-12-15T22:25:10Z</updated>
<entry>
<title>Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending</title>
<updated>2012-12-15T22:25:10Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-12-15T22:25:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5bd665f28db2b04a8d6fe277342479906fc60b62'/>
<id>urn:sha1:5bd665f28db2b04a8d6fe277342479906fc60b62</id>
<content type='text'>
Pull target updates from Nicholas Bellinger:
 "It has been a very busy development cycle this time around in target
  land, with the highlights including:

   - Kill struct se_subsystem_dev, in favor of direct se_device usage
     (hch)
   - Simplify reservations code by combining SPC-3 + SCSI-2 support for
     virtual backends only (hch)
   - Simplify ALUA code for virtual only backends, and remove left over
     abstractions (hch)
   - Pass sense_reason_t as return value for I/O submission path (hch)
   - Refactor MODE_SENSE emulation to allow for easier addition of new
     mode pages.  (roland)
   - Add emulation of MODE_SELECT (roland)
   - Fix bug in handling of ExpStatSN wrap-around (steve)
   - Fix bug in TMR ABORT_TASK lookup in qla2xxx target (steve)
   - Add WRITE_SAME w/ UNMAP=0 support for IBLOCK backends (nab)
   - Convert ib_srpt to use modern target_submit_cmd caller + drop
     legacy ioctx-&gt;kref usage (nab)
   - Convert ib_srpt to use modern target_submit_tmr caller (nab)
   - Add link_magic for fabric allow_link destination target_items for
     symlinks within target_core_fabric_configfs.c code (nab)
   - Allocate pointers in instead of full structs for
     config_group-&gt;default_groups (sebastian)
   - Fix 32-bit highmem breakage for FILEIO (sebastian)

  All told, hch was able to shave off another ~1K LOC by killing the
  se_subsystem_dev abstraction, along with a number of PR + ALUA
  simplifications.  Also, a nice patch by Roland is the refactoring of
  MODE_SENSE handling, along with the addition of initial MODE_SELECT
  emulation support for virtual backends.

  Sebastian found a long-standing issue wrt to allocation of full
  config_group instead of pointers for config_group-&gt;default_group[]
  setup in a number of areas, which ends up saving memory with big
  configurations.  He also managed to fix another long-standing BUG wrt
  to broken 32-bit highmem support within the FILEIO backend driver.

  Thank you again to everyone who contributed this round!"

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (50 commits)
  target/iscsi_target: Add NodeACL tags for initiator group support
  target/tcm_fc: fix the lockdep warning due to inconsistent lock state
  sbp-target: fix error path in sbp_make_tpg()
  sbp-target: use simple assignment in tgt_agent_rw_agent_state()
  iscsi-target: use kstrdup() for iscsi_param
  target/file: merge fd_do_readv() and fd_do_writev()
  target/file: Fix 32-bit highmem breakage for SGL -&gt; iovec mapping
  target: Add link_magic for fabric allow_link destination target_items
  ib_srpt: Convert TMR path to target_submit_tmr
  ib_srpt: Convert I/O path to target_submit_cmd + drop legacy ioctx-&gt;kref
  target: Make spc_get_write_same_sectors return sector_t
  target/configfs: use kmalloc() instead of kzalloc() for default groups
  target/configfs: allocate only 6 slots for dev_cg-&gt;default_groups
  target/configfs: allocate pointers instead of full struct for default_groups
  target: update error handling for sbc_setup_write_same()
  iscsit: use GFP_ATOMIC under spin lock
  iscsi_target: Remove redundant null check before kfree
  target/iblock: Forward declare bio helpers
  target: Clean up flow in transport_check_aborted_status()
  target: Clean up logic in transport_put_cmd()
  ...
</content>
</entry>
<entry>
<title>target/iscsi_target: Add NodeACL tags for initiator group support</title>
<updated>2012-12-13T22:18:09Z</updated>
<author>
<name>Andy Grover</name>
<email>agrover@redhat.com</email>
</author>
<published>2012-12-12T00:30:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=79e62fc3827bd437c304c1810f36896fc1e717b1'/>
<id>urn:sha1:79e62fc3827bd437c304c1810f36896fc1e717b1</id>
<content type='text'>
Thanks for reviews, looking a lot better.

---- 8&lt; ----

Initiator access config could be easier. The way other storage vendors
have addressed this is to support initiator groups: the admin adds
initiator WWNs to the group, and then LUN permissions can be granted for
the entire group at once.

Instead of changing ktarget's configfs interface, this patch keeps
the configfs interface per-initiator-wwn and just adds a 'tag' field
for each. This should be enough for user tools like targetcli to group
initiator ACLs and sync their configurations.

acl_tag is not used internally, but needs to be kept in configfs so that
all user tools can avoid dependencies on each other.

Code tested to work, although userspace pieces still to be implemented.

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>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial</title>
<updated>2012-12-13T20:00:02Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-12-13T20:00:02Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a2013a13e68354e0c8f3696b69701803e13fb737'/>
<id>urn:sha1:a2013a13e68354e0c8f3696b69701803e13fb737</id>
<content type='text'>
Pull trivial branch from Jiri Kosina:
 "Usual stuff -- comment/printk typo fixes, documentation updates, dead
  code elimination."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
  HOWTO: fix double words typo
  x86 mtrr: fix comment typo in mtrr_bp_init
  propagate name change to comments in kernel source
  doc: Update the name of profiling based on sysfs
  treewide: Fix typos in various drivers
  treewide: Fix typos in various Kconfig
  wireless: mwifiex: Fix typo in wireless/mwifiex driver
  messages: i2o: Fix typo in messages/i2o
  scripts/kernel-doc: check that non-void fcts describe their return value
  Kernel-doc: Convention: Use a "Return" section to describe return values
  radeon: Fix typo and copy/paste error in comments
  doc: Remove unnecessary declarations from Documentation/accounting/getdelays.c
  various: Fix spelling of "asynchronous" in comments.
  Fix misspellings of "whether" in comments.
  eisa: Fix spelling of "asynchronous".
  various: Fix spelling of "registered" in comments.
  doc: fix quite a few typos within Documentation
  target: iscsi: fix comment typos in target/iscsi drivers
  treewide: fix typo of "suport" in various comments and Kconfig
  treewide: fix typo of "suppport" in various comments
  ...
</content>
</entry>
<entry>
<title>target/tcm_fc: fix the lockdep warning due to inconsistent lock state</title>
<updated>2012-12-13T05:18:01Z</updated>
<author>
<name>Yi Zou</name>
<email>yi.zou@intel.com</email>
</author>
<published>2012-12-11T01:04:00Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9f4ad44b264f8bb61ffdd607148215566568430d'/>
<id>urn:sha1:9f4ad44b264f8bb61ffdd607148215566568430d</id>
<content type='text'>
The lockdep warning below is in theory correct but it will be in really weird
rare situation that ends up that deadlock since the tcm fc session is hashed
based the rport id. Nonetheless, the complaining below is about rcu callback
that does the transport_deregister_session() is happening in softirq, where
transport_register_session() that happens earlier is not. This triggers the
lockdep warning below. So, just fix this to make lockdep happy by disabling
the soft irq before calling transport_register_session() in ft_prli.

BTW, this was found in FCoE VN2VN over two VMs, couple of create and destroy
would get this triggered.

v1: was enforcing register to be in softirq context which was not righ. See,
http://www.spinics.net/lists/target-devel/msg03614.html

v2: following comments from Roland&amp;Nick (thanks), it seems we don't have to
do transport_deregister_session() in rcu callback, so move it into ft_sess_free()
but still do kfree() of the corresponding ft_sess struct in rcu callback to
make sure the ft_sess is not freed till the rcu callback.

...
[ 1328.370592] scsi2 : FCoE Driver
[ 1328.383429] fcoe: No FDMI support.
[ 1328.384509] host2: libfc: Link up on port (000000)
[ 1328.934229] host2: Assigned Port ID 00a292
[ 1357.232132] host2: rport 00a393: Remove port
[ 1357.232568] host2: rport 00a393: Port sending LOGO from Ready state
[ 1357.233692] host2: rport 00a393: Delete port
[ 1357.234472] host2: rport 00a393: work event 3
[ 1357.234969] host2: rport 00a393: callback ev 3
[ 1357.235979] host2: rport 00a393: Received a LOGO response closed
[ 1357.236706] host2: rport 00a393: work delete
[ 1357.237481]
[ 1357.237631] =================================
[ 1357.238064] [ INFO: inconsistent lock state ]
[ 1357.238450] 3.7.0-rc7-yikvm+ #3 Tainted: G           O
[ 1357.238450] ---------------------------------
[ 1357.238450] inconsistent {SOFTIRQ-ON-W} -&gt; {IN-SOFTIRQ-W} usage.
[ 1357.238450] ksoftirqd/0/3 [HC0[0]:SC1[1]:HE0:SE0] takes:
[ 1357.238450]  (&amp;(&amp;se_tpg-&gt;session_lock)-&gt;rlock){+.?...}, at: [&lt;ffffffffa01eacd4&gt;] transport_deregister_session+0x41/0x148 [target_core_mod]
[ 1357.238450] {SOFTIRQ-ON-W} state was registered at:
[ 1357.238450]   [&lt;ffffffff810834f5&gt;] mark_held_locks+0x6d/0x95
[ 1357.238450]   [&lt;ffffffff8108364a&gt;] trace_hardirqs_on_caller+0x12d/0x197
[ 1357.238450]   [&lt;ffffffff810836c1&gt;] trace_hardirqs_on+0xd/0xf
[ 1357.238450]   [&lt;ffffffff8149caba&gt;] _raw_spin_unlock_irq+0x2d/0x45
[ 1357.238450]   [&lt;ffffffffa01e8d10&gt;] __transport_register_session+0xb8/0x122 [target_core_mod]
[ 1357.238450]   [&lt;ffffffffa01e8dbe&gt;] transport_register_session+0x44/0x5a [target_core_mod]
[ 1357.238450]   [&lt;ffffffffa018e32c&gt;] ft_prli+0x1e3/0x275 [tcm_fc]
[ 1357.238450]   [&lt;ffffffffa0160e8d&gt;] fc_rport_recv_req+0x95e/0xdc5 [libfc]
[ 1357.238450]   [&lt;ffffffffa015be88&gt;] fc_lport_recv_els_req+0xc4/0xd5 [libfc]
[ 1357.238450]   [&lt;ffffffffa015c778&gt;] fc_lport_recv_req+0x12f/0x18f [libfc]
[ 1357.238450]   [&lt;ffffffffa015a6d7&gt;] fc_exch_recv+0x8ba/0x981 [libfc]
[ 1357.238450]   [&lt;ffffffffa0176d7a&gt;] fcoe_percpu_receive_thread+0x47a/0x4e2 [fcoe]
[ 1357.238450]   [&lt;ffffffff810549f1&gt;] kthread+0xb1/0xb9
[ 1357.238450]   [&lt;ffffffff814a40ec&gt;] ret_from_fork+0x7c/0xb0
[ 1357.238450] irq event stamp: 275411
[ 1357.238450] hardirqs last  enabled at (275410): [&lt;ffffffff810bb6a0&gt;] rcu_process_callbacks+0x229/0x42a
[ 1357.238450] hardirqs last disabled at (275411): [&lt;ffffffff8149c2f7&gt;] _raw_spin_lock_irqsave+0x22/0x8e
[ 1357.238450] softirqs last  enabled at (275394): [&lt;ffffffff8103d669&gt;] __do_softirq+0x246/0x26f
[ 1357.238450] softirqs last disabled at (275399): [&lt;ffffffff8103d6bb&gt;] run_ksoftirqd+0x29/0x62
[ 1357.238450]
[ 1357.238450] other info that might help us debug this:
[ 1357.238450]  Possible unsafe locking scenario:
[ 1357.238450]
[ 1357.238450]        CPU0
[ 1357.238450]        ----
[ 1357.238450]   lock(&amp;(&amp;se_tpg-&gt;session_lock)-&gt;rlock);
[ 1357.238450]   &lt;Interrupt&gt;
[ 1357.238450]     lock(&amp;(&amp;se_tpg-&gt;session_lock)-&gt;rlock);
[ 1357.238450]
[ 1357.238450]  *** DEADLOCK ***
[ 1357.238450]
[ 1357.238450] no locks held by ksoftirqd/0/3.
[ 1357.238450]
[ 1357.238450] stack backtrace:
[ 1357.238450] Pid: 3, comm: ksoftirqd/0 Tainted: G           O 3.7.0-rc7-yikvm+ #3
[ 1357.238450] Call Trace:
[ 1357.238450]  [&lt;ffffffff8149399a&gt;] print_usage_bug+0x1f5/0x206
[ 1357.238450]  [&lt;ffffffff8100da59&gt;] ? save_stack_trace+0x2c/0x49
[ 1357.238450]  [&lt;ffffffff81082aae&gt;] ? print_irq_inversion_bug.part.14+0x1ae/0x1ae
[ 1357.238450]  [&lt;ffffffff81083336&gt;] mark_lock+0x106/0x258
[ 1357.238450]  [&lt;ffffffff81084e34&gt;] __lock_acquire+0x2e7/0xe53
[ 1357.238450]  [&lt;ffffffff8102903d&gt;] ? pvclock_clocksource_read+0x48/0xb4
[ 1357.238450]  [&lt;ffffffff810ba6a3&gt;] ? rcu_process_gp_end+0xc0/0xc9
[ 1357.238450]  [&lt;ffffffffa01eacd4&gt;] ? transport_deregister_session+0x41/0x148 [target_core_mod]
[ 1357.238450]  [&lt;ffffffff81085ef1&gt;] lock_acquire+0x119/0x143
[ 1357.238450]  [&lt;ffffffffa01eacd4&gt;] ? transport_deregister_session+0x41/0x148 [target_core_mod]
[ 1357.238450]  [&lt;ffffffff8149c329&gt;] _raw_spin_lock_irqsave+0x54/0x8e
[ 1357.238450]  [&lt;ffffffffa01eacd4&gt;] ? transport_deregister_session+0x41/0x148 [target_core_mod]
[ 1357.238450]  [&lt;ffffffffa01eacd4&gt;] transport_deregister_session+0x41/0x148 [target_core_mod]
[ 1357.238450]  [&lt;ffffffff810bb6a0&gt;] ? rcu_process_callbacks+0x229/0x42a
[ 1357.238450]  [&lt;ffffffffa018ddc5&gt;] ft_sess_rcu_free+0x17/0x24 [tcm_fc]
[ 1357.238450]  [&lt;ffffffffa018ddae&gt;] ? ft_sess_free+0x1b/0x1b [tcm_fc]
[ 1357.238450]  [&lt;ffffffff810bb6d7&gt;] rcu_process_callbacks+0x260/0x42a
[ 1357.238450]  [&lt;ffffffff8103d55d&gt;] __do_softirq+0x13a/0x26f
[ 1357.238450]  [&lt;ffffffff8149b34e&gt;] ? __schedule+0x65f/0x68e
[ 1357.238450]  [&lt;ffffffff8103d6bb&gt;] run_ksoftirqd+0x29/0x62
[ 1357.238450]  [&lt;ffffffff8105c83c&gt;] smpboot_thread_fn+0x1a5/0x1aa
[ 1357.238450]  [&lt;ffffffff8105c697&gt;] ? smpboot_unregister_percpu_thread+0x47/0x47
[ 1357.238450]  [&lt;ffffffff810549f1&gt;] kthread+0xb1/0xb9
[ 1357.238450]  [&lt;ffffffff8149b49d&gt;] ? wait_for_common+0xbb/0x10a
[ 1357.238450]  [&lt;ffffffff81054940&gt;] ? __init_kthread_worker+0x59/0x59
[ 1357.238450]  [&lt;ffffffff814a40ec&gt;] ret_from_fork+0x7c/0xb0
[ 1357.238450]  [&lt;ffffffff81054940&gt;] ? __init_kthread_worker+0x59/0x59
[ 1417.440099]  rport-2:0-0: blocked FC remote port time out: removing rport

Signed-off-by: Yi Zou &lt;yi.zou@intel.com&gt;
Cc: Open-FCoE &lt;devel@open-fcoe.org&gt;
Cc: Nicholas A. Bellinger &lt;nab@risingtidesystems.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>sbp-target: fix error path in sbp_make_tpg()</title>
<updated>2012-12-13T05:17:25Z</updated>
<author>
<name>Chris Boot</name>
<email>bootc@bootc.net</email>
</author>
<published>2012-12-11T21:58:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e1fe2060d7e8f58a69374135e32e90f0bb79a7fd'/>
<id>urn:sha1:e1fe2060d7e8f58a69374135e32e90f0bb79a7fd</id>
<content type='text'>
If the TPG memory is allocated successfully, but we fail further along
in the function, a dangling pointer to freed memory is left in the TPort
structure. This is mostly harmless, but does prevent re-trying the
operation without first removing the TPort altogether.

Reported-by: Chen Gang &lt;gang.chen@asianux.com&gt;
Signed-off-by: Chris Boot &lt;bootc@bootc.net&gt;
Cc: Andy Grover &lt;agrover@redhat.com&gt;
Cc: Nicholas A. Bellinger &lt;nab@linux-iscsi.org&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>sbp-target: use simple assignment in tgt_agent_rw_agent_state()</title>
<updated>2012-12-13T05:16:47Z</updated>
<author>
<name>Chris Boot</name>
<email>bootc@bootc.net</email>
</author>
<published>2012-12-11T21:58:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=37419d674ca99739dbee5ada28b50aacc29c94e1'/>
<id>urn:sha1:37419d674ca99739dbee5ada28b50aacc29c94e1</id>
<content type='text'>
There is no need to memcpy() a 32-bit integer. The data pointer is
guaranteed to be quadlet aligned by the FireWire stack so we can replace
the memcpy() with an assignment.

Thanks to Stefan Richter.

Signed-off-by: Chris Boot &lt;bootc@bootc.net&gt;
Cc: Stefan Richter &lt;stefanr@s5r6.in-berlin.de&gt;
Cc: Andy Grover &lt;agrover@redhat.com&gt;
Cc: Clemens Ladisch &lt;clemens@ladisch.de&gt;
Cc: Nicholas A. Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>iscsi-target: use kstrdup() for iscsi_param</title>
<updated>2012-12-08T01:55:44Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2012-11-29T19:29:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ed72a4d52add345595f09b360d6ac5f20428d361'/>
<id>urn:sha1:ed72a4d52add345595f09b360d6ac5f20428d361</id>
<content type='text'>
The kmalloc() + strlen() + memcpy() block is what kstrdup() does as
well.  While here I also removed the "to NULL assignment" of pointers
which are fed to kfree or thrown away anyway.

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target/file: merge fd_do_readv() and fd_do_writev()</title>
<updated>2012-12-05T21:09:45Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2012-12-05T21:09:45Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=778229af95977a4aca8656143d457401c2bb8f96'/>
<id>urn:sha1:778229af95977a4aca8656143d457401c2bb8f96</id>
<content type='text'>
Those two functions are almost identical so merge them. Noticed this
while fixing the highmem in both cases.

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target/file: Fix 32-bit highmem breakage for SGL -&gt; iovec mapping</title>
<updated>2012-12-05T21:01:44Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2012-12-05T11:08:29Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=40ff2c3b3da35dd3a00ac6722056a59b4b3f2caf'/>
<id>urn:sha1:40ff2c3b3da35dd3a00ac6722056a59b4b3f2caf</id>
<content type='text'>
This patch changes vectored file I/O to use kmap + kunmap when mapping
incoming SGL memory -&gt; struct iovec in order to properly support 32-bit
highmem configurations.  This is because an extra bounce buffer may be
required when processing scatterlist pages allocated with GFP_KERNEL.

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Add link_magic for fabric allow_link destination target_items</title>
<updated>2012-12-05T08:11:36Z</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2012-12-05T07:43:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0ff8754981261a80f4b77db2536dfea92c2d4539'/>
<id>urn:sha1:0ff8754981261a80f4b77db2536dfea92c2d4539</id>
<content type='text'>
This patch adds [dev,lun]_link_magic value assignment + checks within generic
target_fabric_port_link() and target_fabric_mappedlun_link() code to ensure
destination config_item *target_item sent from configfs_symlink() -&gt;
config_item_operations-&gt;allow_link() is the underlying se_device-&gt;dev_group
and se_lun-&gt;lun_group that we expect to symlink.

Reported-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Cc: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
</feed>
