<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/target/target_core_configfs.c, branch linux-3.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2012-11-17T21:15:55Z</updated>
<entry>
<title>target: Don't return success from module_init() if setup fails</title>
<updated>2012-11-17T21:15:55Z</updated>
<author>
<name>Roland Dreier</name>
</author>
<published>2012-10-31T16:16:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=506485a3c6d926cc01e6d05088eac94adf1d6ae5'/>
<id>urn:sha1:506485a3c6d926cc01e6d05088eac94adf1d6ae5</id>
<content type='text'>
commit 0d0f9dfb31e0a6c92063e235417b42df185b3275 upstream.

If the call to core_dev_release_virtual_lun0() fails, then nothing
sets ret to anything other than 0, so even though everything is
torn down and freed, target_core_init_configfs() will seem to succeed
and the module will be loaded.  Fix this by passing the return value
on up the chain.

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: fix return code in target_core_init_configfs error path</title>
<updated>2012-10-21T16:27:58Z</updated>
<author>
<name>Peter Senna Tschudin</name>
</author>
<published>2012-09-17T18:05:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e1621ec4754097582c73c0ed8c394dcc50b1e0fd'/>
<id>urn:sha1:e1621ec4754097582c73c0ed8c394dcc50b1e0fd</id>
<content type='text'>
commit 37bb7899ca366dc212b71b150e78566d04808cc0 upstream.

This patch fixes error cases within target_core_init_configfs() to
properly set ret = -ENOMEM before jumping to the out_global exception
path.

This was originally discovered with the following Coccinelle semantic
match information:

Convert a nonnegative error return code to a negative one, as returned
elsewhere in the function.  A simplified version of the semantic match
that finds this problem is as follows: (http://coccinelle.lip6.fr/)

// &lt;smpl&gt;
(
if@p1 (\(ret &lt; 0\|ret != 0\))
 { ... return ret; }
|
ret@p1 = 0
)
... when != ret = e1
    when != &amp;ret
*if(...)
{
  ... when != ret = e2
      when forall
 return ret;
}
// &lt;/smpl&gt;

Signed-off-by: Peter Senna Tschudin &lt;peter.senna@gmail.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: remove obvious warnings</title>
<updated>2012-03-16T02:16:09Z</updated>
<author>
<name>Jörn Engel</name>
</author>
<published>2012-03-15T19:06:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=281689051a628e5341ce1efcfafde9d60f2f6fbb'/>
<id>urn:sha1:281689051a628e5341ce1efcfafde9d60f2f6fbb</id>
<content type='text'>
Get rid of a bunch of write-only variables.  In a number of cases I
suspect actual bugs to be present, so I left all of those for a second
look.

(nab: fix lio-core patch fuzz)

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Drop unused legacy target_core_fabric_ops API callers</title>
<updated>2012-03-10T22:42:55Z</updated>
<author>
<name>Nicholas Bellinger</name>
</author>
<published>2012-02-28T08:22:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c7ec05c82bfd6acf1fd800d628591500805f3179'/>
<id>urn:sha1:c7ec05c82bfd6acf1fd800d628591500805f3179</id>
<content type='text'>
This patch drops the following unused legacy API callers from target_core_fabric.h:

*) TFO-&gt;fall_back_to_erl0()
*) TFO-&gt;stop_session()
*) TFO-&gt;sess_logged_in()
*) TFO-&gt;is_state_remove()

This patch also removes the stub usage in loopback, tcm_fc, iscsi_target,
and ib_srpt fabric modules.

Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Fix typo in drivers/target</title>
<updated>2012-03-10T21:55:05Z</updated>
<author>
<name>Masanari Iida</name>
</author>
<published>2012-02-27T14:18:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5e58b0299794fc4acf6e19995a2159e0535a008c'/>
<id>urn:sha1:5e58b0299794fc4acf6e19995a2159e0535a008c</id>
<content type='text'>
Correct spelling "exeeds" to "exceeds" in iscsi/iscsi_target_nego.c
Correct spelling "diabled" to "disabled" in target_core_configfs.c

Signed-off-by: Masanari Iida &lt;standby24x7@gmail.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Untangle front-end and back-end meanings of max_sectors attribute</title>
<updated>2012-02-25T22:37:49Z</updated>
<author>
<name>Roland Dreier</name>
</author>
<published>2012-02-14T00:18:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=015487b89f27d91d95a056cdc3c85e6c729bff12'/>
<id>urn:sha1:015487b89f27d91d95a056cdc3c85e6c729bff12</id>
<content type='text'>
se_dev_attrib.max_sectors currently has two independent meanings:

 - It is reported in the block limits VPD page as the maximum transfer
   length, ie the largest IO that the front-end (fabric) can handle.
   Also the target core doesn't enforce this maximum transfer length.

 - It is used to hold the size of the largest IO that the back-end can
   handle, so we know when to split SCSI commands into multiple tasks.

Fix this by adding a new se_dev_attrib.fabric_max_sectors to hold the
maximum transfer length, and checking incoming IOs against that limit.

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: Use LIST_HEAD()/DEFINE_MUTEX() for static objects</title>
<updated>2012-02-25T22:37:46Z</updated>
<author>
<name>Roland Dreier</name>
</author>
<published>2012-01-12T18:41:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d0f474e501929acdbd116cca39ef083012f70f25'/>
<id>urn:sha1:d0f474e501929acdbd116cca39ef083012f70f25</id>
<content type='text'>
Instead of

   static struct list_head foo;
   static struct mutex bar;

   ...

   INIT_LIST_HEAD(&amp;foo);
   mutex_init(&amp;bar);

just do

   static LIST_HEAD(foo);
   static DEFINE_MUTEX(bar);

Also remove some superfluous struct list_head and spinlock_t
initialization calls where the variables are already defined using
macros that initialize them.

This saves a decent amount of compiled code too:

    add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-178 (-178)
    function                                     old     new   delta
    target_core_init_configfs                    898     850     -48
    core_scsi3_emulate_pro_preempt              1742    1683     -59
    iscsi_thread_set_init                        159      88     -71

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: handle empty string writes in sysfs</title>
<updated>2012-02-07T06:48:40Z</updated>
<author>
<name>Dan Carpenter</name>
</author>
<published>2012-01-27T12:50:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/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>target/configs: remove trailing newline from udev_path and alias</title>
<updated>2011-12-14T11:28:10Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
</author>
<published>2011-11-28T12:57:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0877eafd1618ef683e2ff2273acdeca5f1b077b9'/>
<id>urn:sha1:0877eafd1618ef683e2ff2273acdeca5f1b077b9</id>
<content type='text'>
This patch strips the trailing newline from backend device udev_path and
alias attributes.

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: remove useless casts</title>
<updated>2011-12-14T11:28:07Z</updated>
<author>
<name>Jörn Engel</name>
</author>
<published>2011-11-24T01:05:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8359cf43b9dccddeebb0d247146719a14ce6371a'/>
<id>urn:sha1:8359cf43b9dccddeebb0d247146719a14ce6371a</id>
<content type='text'>
A reader should spend an extra moment whenever noticing a cast,
because either something special is going on that deserves extra
attention or, as is all too often the case, the code is wrong.

These casts, afaics, have all been useless.  They cast a foo* to a
foo*, cast a void* to the assigned type, cast a foo* to void*, before
assigning it to a void* variable, etc.

In a few cases I also removed an additional &amp;...[0], which is equally
useless.

Lastly I added three FIXMEs where, to the best of my judgement, the
code appears to have a bug.  It would be good if someone could check
these.

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
</feed>
