<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/target/target_core_pr.c, branch v3.11</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>target: Make core_scsi3_update_and_write_aptpl return sense_reason_t</title>
<updated>2013-07-04T02:44:33+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2013-06-25T05:18:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=8a3918571a4eb3ae10ddd4aaec591b4af80d1172'/>
<id>8a3918571a4eb3ae10ddd4aaec591b4af80d1172</id>
<content type='text'>
Fix up sense_reason_t breakage in core_scsi3_update_and_write_aptpl()
from recent conversion to use local scope memory allocation.

Reported as sparse warnings: (new ones prefixed by &gt;&gt;) by Fengguang:

&gt;&gt; drivers/target/target_core_pr.c:2069:57: sparse: incorrect type in
&gt;&gt; return expression (different base types)
   drivers/target/target_core_pr.c:2069:57:    expected restricted sense_reason_t
   drivers/target/target_core_pr.c:2069:57:    got int
&gt;&gt; drivers/target/target_core_pr.c:2179:21: sparse: incorrect type in
&gt;&gt; assignment (different base types)
   drivers/target/target_core_pr.c:2179:21:    expected restricted sense_reason_t [assigned] [usertype] ret
   drivers/target/target_core_pr.c:2179:21:    got int
&gt;&gt; drivers/target/target_core_pr.c:2197:13: sparse: incorrect type in
&gt;&gt; assignment (different base types)
   drivers/target/target_core_pr.c:2197:13:    expected restricted sense_reason_t [assigned] [usertype] ret
   drivers/target/target_core_pr.c:2197:13:    got int
   drivers/target/target_core_pr.c:1245:28: sparse: context imbalance in '__core_scsi3_free_registration' - unexpected unlock

Reported-by: kbuild test robot &lt;fengguang.wu@intel.com&gt;
Cc: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix up sense_reason_t breakage in core_scsi3_update_and_write_aptpl()
from recent conversion to use local scope memory allocation.

Reported as sparse warnings: (new ones prefixed by &gt;&gt;) by Fengguang:

&gt;&gt; drivers/target/target_core_pr.c:2069:57: sparse: incorrect type in
&gt;&gt; return expression (different base types)
   drivers/target/target_core_pr.c:2069:57:    expected restricted sense_reason_t
   drivers/target/target_core_pr.c:2069:57:    got int
&gt;&gt; drivers/target/target_core_pr.c:2179:21: sparse: incorrect type in
&gt;&gt; assignment (different base types)
   drivers/target/target_core_pr.c:2179:21:    expected restricted sense_reason_t [assigned] [usertype] ret
   drivers/target/target_core_pr.c:2179:21:    got int
&gt;&gt; drivers/target/target_core_pr.c:2197:13: sparse: incorrect type in
&gt;&gt; assignment (different base types)
   drivers/target/target_core_pr.c:2197:13:    expected restricted sense_reason_t [assigned] [usertype] ret
   drivers/target/target_core_pr.c:2197:13:    got int
   drivers/target/target_core_pr.c:1245:28: sparse: context imbalance in '__core_scsi3_free_registration' - unexpected unlock

Reported-by: kbuild test robot &lt;fengguang.wu@intel.com&gt;
Cc: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target: Further refactoring of core_scsi3_emulate_pro_register()</title>
<updated>2013-06-14T07:05:48+00:00</updated>
<author>
<name>Andy Grover</name>
<email>agrover@redhat.com</email>
</author>
<published>2013-05-16T17:41:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=bc118fe4c4a8cfa453491ba77c0a146a6d0e73e0'/>
<id>bc118fe4c4a8cfa453491ba77c0a146a6d0e73e0</id>
<content type='text'>
Use bool params when appropriate.

Eliminate unneeded pr_reg_e and type variables.

Just one goto label, so rename to 'out' from 'out_put_pr_reg'.

Signed-off-by: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Use bool params when appropriate.

Eliminate unneeded pr_reg_e and type variables.

Just one goto label, so rename to 'out' from 'out_put_pr_reg'.

Signed-off-by: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target: Use if/else for sa_res_key conditional in emulate_pro_register()</title>
<updated>2013-06-14T07:05:43+00:00</updated>
<author>
<name>Andy Grover</name>
<email>agrover@redhat.com</email>
</author>
<published>2013-05-16T17:41:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=51d9c41d190b6645c69a279b0610aad8e4ed9d72'/>
<id>51d9c41d190b6645c69a279b0610aad8e4ed9d72</id>
<content type='text'>
Don't need goto, we can just do an if/else for sa_res_key behavior. Move
shorter case first. Slightly shorter b/c both cases can share a call to
update_and_write_aptpl() now.

Signed-off-by: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Don't need goto, we can just do an if/else for sa_res_key behavior. Move
shorter case first. Slightly shorter b/c both cases can share a call to
update_and_write_aptpl() now.

Signed-off-by: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target: Allocate aptpl_buf inside update_and_write_aptpl()</title>
<updated>2013-06-14T07:04:58+00:00</updated>
<author>
<name>Andy Grover</name>
<email>agrover@redhat.com</email>
</author>
<published>2013-05-16T17:41:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=459f213ba162bd13e113d6f92a8fa6c780fd67ed'/>
<id>459f213ba162bd13e113d6f92a8fa6c780fd67ed</id>
<content type='text'>
Instead of taking the buffer and length, update_and_write_aptpl() will
allocate the buffer as needed, and then free it. Instead, the function
takes an 'aptpl' boolean parameter.

This enables us to remove memory alloc/frees from struct
t10_pr_registration and other spots.

There is a slight loss of functionality because each callsite doesn't get
its own pr_debug any more, but this info can be cleaned via ftrace if
necessary and I think the shorter code is worth it.

Signed-off-by: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of taking the buffer and length, update_and_write_aptpl() will
allocate the buffer as needed, and then free it. Instead, the function
takes an 'aptpl' boolean parameter.

This enables us to remove memory alloc/frees from struct
t10_pr_registration and other spots.

There is a slight loss of functionality because each callsite doesn't get
its own pr_debug any more, but this info can be cleaned via ftrace if
necessary and I think the shorter code is worth it.

Signed-off-by: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target: Delete incorrect comment</title>
<updated>2013-06-14T07:04:54+00:00</updated>
<author>
<name>Andy Grover</name>
<email>agrover@redhat.com</email>
</author>
<published>2013-05-16T17:41:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=63e03349f5fb32e4e8494cb184c37d2db0bdd223'/>
<id>63e03349f5fb32e4e8494cb184c37d2db0bdd223</id>
<content type='text'>
aptpl_file_mutex seems to no longer exist.

Signed-off-by: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
aptpl_file_mutex seems to no longer exist.

Signed-off-by: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target: Remove unneeded param pr_aptpl_buf_len to write_aptpl_to_file()</title>
<updated>2013-06-14T07:04:50+00:00</updated>
<author>
<name>Andy Grover</name>
<email>agrover@redhat.com</email>
</author>
<published>2013-05-16T17:41:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4dee96fb366ec6b5b324c8d4fe9e04244cb32f5d'/>
<id>4dee96fb366ec6b5b324c8d4fe9e04244cb32f5d</id>
<content type='text'>
As mentioned in the comments in update_and_write_aptpl,
write_aptpl_to_file() calls strlen() on the buffer, and the length was
always being passed as zero.

Signed-off-by: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As mentioned in the comments in update_and_write_aptpl,
write_aptpl_to_file() calls strlen() on the buffer, and the length was
always being passed as zero.

Signed-off-by: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target: Remove t10_reservation.pr_aptpl_buf_len</title>
<updated>2013-06-14T07:04:46+00:00</updated>
<author>
<name>Andy Grover</name>
<email>agrover@redhat.com</email>
</author>
<published>2013-05-16T17:40:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4e529be27d0ec4b9c6e4fd1b2908fa21b28539b1'/>
<id>4e529be27d0ec4b9c6e4fd1b2908fa21b28539b1</id>
<content type='text'>
It's only ever set to PR_APTPL_BUF_LEN, so we don't need a variable.

Signed-off-by: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's only ever set to PR_APTPL_BUF_LEN, so we don't need a variable.

Signed-off-by: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target: Unify __core_scsi3_update_aptpl_buf and core_scsi3_update_aptpl_buf</title>
<updated>2013-06-14T07:04:43+00:00</updated>
<author>
<name>Andy Grover</name>
<email>agrover@redhat.com</email>
</author>
<published>2013-05-16T17:40:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=3c8a6228d078553e32bffc59ed180d01ab1d998a'/>
<id>3c8a6228d078553e32bffc59ed180d01ab1d998a</id>
<content type='text'>
The __ version is only ever called from the regular version, so just
inline it. It's not too much more complex to handle both spinlocks in the
same function.

Signed-off-by: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The __ version is only ever called from the regular version, so just
inline it. It's not too much more complex to handle both spinlocks in the
same function.

Signed-off-by: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target: Simplify metadata handling when clearing aptpl metadata</title>
<updated>2013-06-14T07:04:39+00:00</updated>
<author>
<name>Andy Grover</name>
<email>agrover@redhat.com</email>
</author>
<published>2013-05-16T17:40:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=0607decdca51ee33c2caae288a44a82455149b51'/>
<id>0607decdca51ee33c2caae288a44a82455149b51</id>
<content type='text'>
Simpler to just set buf in update_and_write_aptpl(), rather than passing
down to ____core_scsi3_update_aptpl_buf().

Signed-off-by: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Simpler to just set buf in update_and_write_aptpl(), rather than passing
down to ____core_scsi3_update_aptpl_buf().

Signed-off-by: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target: Fix two debugprints that appear to be wrong</title>
<updated>2013-06-14T07:04:35+00:00</updated>
<author>
<name>Andy Grover</name>
<email>agrover@redhat.com</email>
</author>
<published>2013-05-16T17:40:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=1f070cc2ac7783afd0174c29dc59d2b4fac72646'/>
<id>1f070cc2ac7783afd0174c29dc59d2b4fac72646</id>
<content type='text'>
They're in emulate_pro_register, so change UNREGISTER to REGISTER.

The first one seems wrong -- sa_res_key could be 0 there, but it's testing
spec_i_pt.

Remove unneeded parens  in 2nd conditional.

Signed-off-by: Andy Grover &lt;agrover@redhat.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
They're in emulate_pro_register, so change UNREGISTER to REGISTER.

The first one seems wrong -- sa_res_key could be 0 there, but it's testing
spec_i_pt.

Remove unneeded parens  in 2nd conditional.

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