<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/scsi/sg.c, branch v3.6.1</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>[SCSI] sg: constify sg_proc_leaf_arr</title>
<updated>2012-05-17T09:08:57+00:00</updated>
<author>
<name>Jörn Engel</name>
<email>joern@logfs.org</email>
</author>
<published>2012-04-12T21:35:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=18b8ba6cfb49b201e37489ca9761730c22be80af'/>
<id>18b8ba6cfb49b201e37489ca9761730c22be80af</id>
<content type='text'>
Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Acked-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Acked-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] sg: remove sg_mutex</title>
<updated>2012-05-17T09:08:57+00:00</updated>
<author>
<name>Jörn Engel</name>
<email>joern@logfs.org</email>
</author>
<published>2012-04-12T21:35:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=37b9d1e0017b2d8384ad03d250b15fd3d69771d5'/>
<id>37b9d1e0017b2d8384ad03d250b15fd3d69771d5</id>
<content type='text'>
With the exception of the detached field, sg_mutex no longer adds any
locking.  detached handling has been broken before and is still broken
and this patch does not seem to make things worse than they were to
begin with.

However, I have observed cases of tasks being blocked for &gt;200s waiting
for sg_mutex.  So the removal clearly adds value for very little cost.

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Acked-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With the exception of the detached field, sg_mutex no longer adds any
locking.  detached handling has been broken before and is still broken
and this patch does not seem to make things worse than they were to
begin with.

However, I have observed cases of tasks being blocked for &gt;200s waiting
for sg_mutex.  So the removal clearly adds value for very little cost.

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Acked-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] sg: completely protect sfds</title>
<updated>2012-05-17T09:08:56+00:00</updated>
<author>
<name>Jörn Engel</name>
<email>joern@logfs.org</email>
</author>
<published>2012-04-25T15:17:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=035d12e658fba287a223361bc7dd442dd6737b68'/>
<id>035d12e658fba287a223361bc7dd442dd6737b68</id>
<content type='text'>
sfds is protected by sg_index_lock - except for sg_open(), where it
isn't.  Change that and add some documentation.

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Acked-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
sfds is protected by sg_index_lock - except for sg_open(), where it
isn't.  Change that and add some documentation.

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Acked-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] sg: protect sdp-&gt;exclude</title>
<updated>2012-05-17T09:08:55+00:00</updated>
<author>
<name>Jörn Engel</name>
<email>joern@logfs.org</email>
</author>
<published>2012-04-24T20:13:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b499e5249eb80e4a7e71cfd04c6f628abdb27498'/>
<id>b499e5249eb80e4a7e71cfd04c6f628abdb27498</id>
<content type='text'>
Changes since v1: set_exclude now returns the new value, which gets
rid of the comma expression and the operator precedence bug.  Thanks
to Douglas for spotting it.

sdp-&gt;exclude was previously protected by the BKL.  The sg_mutex, which
replaced the BKL, only semi-protected it, as it was missing from
sg_release() and sg_proc_seq_show_debug().  Take an explicit spinlock
for it.

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Acked-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Changes since v1: set_exclude now returns the new value, which gets
rid of the comma expression and the operator precedence bug.  Thanks
to Douglas for spotting it.

sdp-&gt;exclude was previously protected by the BKL.  The sg_mutex, which
replaced the BKL, only semi-protected it, as it was missing from
sg_release() and sg_proc_seq_show_debug().  Take an explicit spinlock
for it.

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Acked-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] sg: prevent unwoken sleep</title>
<updated>2012-05-17T09:08:54+00:00</updated>
<author>
<name>Jörn Engel</name>
<email>joern@logfs.org</email>
</author>
<published>2012-04-12T21:33:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6acddc5e911bb3a4a007448371ed7317c85669da'/>
<id>6acddc5e911bb3a4a007448371ed7317c85669da</id>
<content type='text'>
srp-&gt;done is protected by sfp-&gt;rq_list_lock everywhere, except for this
one case.  Result can be that the wake-up happens before the cacheline
with the changed srp-&gt;done has arrived, so the waiter can go back to
sleep and never be woken up again.

The wait_event_interruptible() means that anyone trying to debug this
unlikely race will likely notice everything working fine again, as the
next signal will unwedge things.  Evil.

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Acked-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
srp-&gt;done is protected by sfp-&gt;rq_list_lock everywhere, except for this
one case.  Result can be that the wake-up happens before the cacheline
with the changed srp-&gt;done has arrived, so the waiter can go back to
sleep and never be woken up again.

The wait_event_interruptible() means that anyone trying to debug this
unlikely race will likely notice everything working fine again, as the
next signal will unwedge things.  Evil.

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Acked-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] sg: remove closed flag</title>
<updated>2012-05-17T09:08:53+00:00</updated>
<author>
<name>Jörn Engel</name>
<email>joern@logfs.org</email>
</author>
<published>2012-04-12T21:33:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ebaf466be5afa6c6dca29005374de4534e0e6b33'/>
<id>ebaf466be5afa6c6dca29005374de4534e0e6b33</id>
<content type='text'>
After sg_release() has been called, noone should be able to actually use
that filedescriptor anymore.  So if closed ever made a difference in the
past five years or so, it would have meant a bug.  Remove it.

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Acked-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
[jejb: fix up checkpatch warnings]
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After sg_release() has been called, noone should be able to actually use
that filedescriptor anymore.  So if closed ever made a difference in the
past five years or so, it would have meant a bug.  Remove it.

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Acked-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
[jejb: fix up checkpatch warnings]
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] sg: use wait_event_interruptible()</title>
<updated>2012-05-17T09:08:53+00:00</updated>
<author>
<name>Jörn Engel</name>
<email>joern@logfs.org</email>
</author>
<published>2012-04-12T21:33:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3f0c6aba0b65a68013c1e0db1b015f02e6ec24be'/>
<id>3f0c6aba0b65a68013c1e0db1b015f02e6ec24be</id>
<content type='text'>
Afaics the use of __wait_event_interruptible() as opposed to
wait_event_interruptible() is purely historic.  So let's follow the rest
of the kernel and check the condition before prepare_to_wait() - and
also make the code a bit nicer.

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Acked-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Afaics the use of __wait_event_interruptible() as opposed to
wait_event_interruptible() is purely historic.  So let's follow the rest
of the kernel and check the condition before prepare_to_wait() - and
also make the code a bit nicer.

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Acked-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] sg: remove while (1) non-loop</title>
<updated>2012-05-17T09:08:52+00:00</updated>
<author>
<name>Jörn Engel</name>
<email>joern@logfs.org</email>
</author>
<published>2012-04-12T21:32:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=794c10fa0fa4d1781c5651c31e3d4d0b71629128'/>
<id>794c10fa0fa4d1781c5651c31e3d4d0b71629128</id>
<content type='text'>
The while (1) construct isn't actually a loop at all.  So let's not
pretent and obfuscate the code.

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Acked-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The while (1) construct isn't actually a loop at all.  So let's not
pretent and obfuscate the code.

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Acked-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] sg: remove unnecessary indentation</title>
<updated>2012-05-17T08:45:29+00:00</updated>
<author>
<name>Jörn Engel</name>
<email>joern@logfs.org</email>
</author>
<published>2012-04-12T21:32:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=dddbf8d908e89afb14a49502f568d2a2b814436d'/>
<id>dddbf8d908e89afb14a49502f568d2a2b814436d</id>
<content type='text'>
blocking is de-facto a constant and the now-removed comment wasn't all
that useful either.  Without them and the resulting indentation the code
is a bit nicer to read.

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Acked-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
blocking is de-facto a constant and the now-removed comment wasn't all
that useful either.  Without them and the resulting indentation the code
is a bit nicer to read.

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Acked-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[SCSI] sg: convert to kstrtoul_from_user()</title>
<updated>2012-01-16T08:17:29+00:00</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@codeaurora.org</email>
</author>
<published>2012-01-10T23:42:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=7e95fffe080d4dbe826dfe864eb084916cdc6468'/>
<id>7e95fffe080d4dbe826dfe864eb084916cdc6468</id>
<content type='text'>
Instead of open coding this function use kstrtoul_from_user() directly.

Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Acked-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of open coding this function use kstrtoul_from_user() directly.

Signed-off-by: Stephen Boyd &lt;sboyd@codeaurora.org&gt;
Acked-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: James Bottomley &lt;JBottomley@Parallels.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
