<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/block, branch v2.6.27.57</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>block: check for proper length of iov entries in blk_rq_map_user_iov()</title>
<updated>2010-12-09T21:24:15+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>jaxboe@fusionio.com</email>
</author>
<published>2010-10-29T14:10:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=9a8fd43f43c06d372c6c3f3ae592683cc8603277'/>
<id>9a8fd43f43c06d372c6c3f3ae592683cc8603277</id>
<content type='text'>
commit 9284bcf4e335e5f18a8bc7b26461c33ab60d0689 upstream.

Ensure that we pass down properly validated iov segments before
calling into the mapping or copy functions.

Reported-by: Dan Rosenberg &lt;drosenberg@vsecurity.com&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 9284bcf4e335e5f18a8bc7b26461c33ab60d0689 upstream.

Ensure that we pass down properly validated iov segments before
calling into the mapping or copy functions.

Reported-by: Dan Rosenberg &lt;drosenberg@vsecurity.com&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>bsg: fix incorrect device_status value</title>
<updated>2010-10-29T04:04:16+00:00</updated>
<author>
<name>FUJITA Tomonori</name>
<email>fujita.tomonori@lab.ntt.co.jp</email>
</author>
<published>2010-09-16T15:46:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=41ace54c2c2f787f1c44f43403606cb60d63cb14'/>
<id>41ace54c2c2f787f1c44f43403606cb60d63cb14</id>
<content type='text'>
commit 478971600e47cb83ff2d3c63c5c24f2b04b0d6a1 upstream.

bsg incorrectly returns sg's masked_status value for device_status.

[jejb: fix up expression logic]
Reported-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Signed-off-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 478971600e47cb83ff2d3c63c5c24f2b04b0d6a1 upstream.

bsg incorrectly returns sg's masked_status value for device_status.

[jejb: fix up expression logic]
Reported-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Signed-off-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Make SCSI SG v4 driver enabled by default and remove EXPERIMENTAL dependency, since udev depends on BSG</title>
<updated>2009-08-16T21:26:33+00:00</updated>
<author>
<name>John Stoffel</name>
<email>john@stoffel.org</email>
</author>
<published>2009-08-04T20:10:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f74ad8bec9d9de38c622d3cbfea5edd371a632eb'/>
<id>f74ad8bec9d9de38c622d3cbfea5edd371a632eb</id>
<content type='text'>
commit 14d9fa352592582e457cf75022202766baac1348 upstream.

Make Block Layer SG support v4 the default, since recent udev versions
depend on this to access serial numbers and other low level info properly.

This should be backported to older kernels as well, since most distros have
enabled this for a long time.

Signed-off-by: John Stoffel &lt;john@stoffel.org&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 14d9fa352592582e457cf75022202766baac1348 upstream.

Make Block Layer SG support v4 the default, since recent udev versions
depend on this to access serial numbers and other low level info properly.

This should be backported to older kernels as well, since most distros have
enabled this for a long time.

Signed-off-by: John Stoffel &lt;john@stoffel.org&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Enforce a minimum SG_IO timeout</title>
<updated>2008-12-13T23:29:14+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2008-12-05T22:49:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5c7c64831c51516034a7099ba25718f7aaed19e4'/>
<id>5c7c64831c51516034a7099ba25718f7aaed19e4</id>
<content type='text'>
commit f2f1fa78a155524b849edf359e42a3001ea652c0 upstream.

There's no point in having too short SG_IO timeouts, since if the
command does end up timing out, we'll end up through the reset sequence
that is several seconds long in order to abort the command that timed
out.

As a result, shorter timeouts than a few seconds simply do not make
sense, as the recovery would be longer than the timeout itself.

Add a BLK_MIN_SG_TIMEOUT to match the existign BLK_DEFAULT_SG_TIMEOUT.

Suggested-by: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Acked-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
Cc: Jeff Garzik &lt;jeff@garzik.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit f2f1fa78a155524b849edf359e42a3001ea652c0 upstream.

There's no point in having too short SG_IO timeouts, since if the
command does end up timing out, we'll end up through the reset sequence
that is several seconds long in order to abort the command that timed
out.

As a result, shorter timeouts than a few seconds simply do not make
sense, as the recovery would be longer than the timeout itself.

Add a BLK_MIN_SG_TIMEOUT to match the existign BLK_DEFAULT_SG_TIMEOUT.

Suggested-by: Alan Cox &lt;alan@lxorguk.ukuu.org.uk&gt;
Acked-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
Cc: Jeff Garzik &lt;jeff@garzik.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>block: fix nr_phys_segments miscalculation bug</title>
<updated>2008-11-20T22:54:47+00:00</updated>
<author>
<name>FUJITA Tomonori</name>
<email>fujita.tomonori@lab.ntt.co.jp</email>
</author>
<published>2008-11-12T06:03:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=b1bb48b574a9148eb8e8c2723f3444e04ca09437'/>
<id>b1bb48b574a9148eb8e8c2723f3444e04ca09437</id>
<content type='text'>
commit 8677142710516d986d932d6f1fba7be8382c1fec upstream
backported by Nikanth Karthikesan &lt;knikanth@suse.de&gt; to the 2.6.27.y tree.

block: fix nr_phys_segments miscalculation bug

This fixes the bug reported by Nikanth Karthikesan &lt;knikanth@suse.de&gt;:

http://lkml.org/lkml/2008/10/2/203

The root cause of the bug is that blk_phys_contig_segment
miscalculates q-&gt;max_segment_size.

blk_phys_contig_segment checks:

req-&gt;biotail-&gt;bi_size + next_req-&gt;bio-&gt;bi_size &gt; q-&gt;max_segment_size

But blk_recalc_rq_segments might expect that req-&gt;biotail and the
previous bio in the req are supposed be merged into one
segment. blk_recalc_rq_segments might also expect that next_req-&gt;bio
and the next bio in the next_req are supposed be merged into one
segment. In such case, we merge two requests that can't be merged
here. Later, blk_rq_map_sg gives more segments than it should.

We need to keep track of segment size in blk_recalc_rq_segments and
use it to see if two requests can be merged. This patch implements it
in the similar way that we used to do for hw merging (virtual
merging).

Signed-off-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
Cc: Nikanth Karthikesan &lt;knikanth@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 8677142710516d986d932d6f1fba7be8382c1fec upstream
backported by Nikanth Karthikesan &lt;knikanth@suse.de&gt; to the 2.6.27.y tree.

block: fix nr_phys_segments miscalculation bug

This fixes the bug reported by Nikanth Karthikesan &lt;knikanth@suse.de&gt;:

http://lkml.org/lkml/2008/10/2/203

The root cause of the bug is that blk_phys_contig_segment
miscalculates q-&gt;max_segment_size.

blk_phys_contig_segment checks:

req-&gt;biotail-&gt;bi_size + next_req-&gt;bio-&gt;bi_size &gt; q-&gt;max_segment_size

But blk_recalc_rq_segments might expect that req-&gt;biotail and the
previous bio in the req are supposed be merged into one
segment. blk_recalc_rq_segments might also expect that next_req-&gt;bio
and the next bio in the next_req are supposed be merged into one
segment. In such case, we merge two requests that can't be merged
here. Later, blk_rq_map_sg gives more segments than it should.

We need to keep track of segment size in blk_recalc_rq_segments and
use it to see if two requests can be merged. This patch implements it
in the similar way that we used to do for hw merging (virtual
merging).

Signed-off-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
Cc: Nikanth Karthikesan &lt;knikanth@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>block: disable sysfs parts of the disk command filter</title>
<updated>2008-09-11T12:20:23+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>jens.axboe@oracle.com</email>
</author>
<published>2008-09-11T12:20:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2dc75d3c3b49c64fd26b4832a7efb75546cb3fc5'/>
<id>2dc75d3c3b49c64fd26b4832a7efb75546cb3fc5</id>
<content type='text'>
We still have life time issues with the sysfs command filter kobject,
so disable it for 2.6.27 release. We can revisit this and make it work
properly for 2.6.28, for 2.6.27 release it's too risky.

Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We still have life time issues with the sysfs command filter kobject,
so disable it for 2.6.27 release. We can revisit this and make it work
properly for 2.6.28, for 2.6.27 release it's too risky.

Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>block: restore original behavior of /proc/partition when there's no partition</title>
<updated>2008-09-01T06:55:10+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2008-09-01T06:55:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ddef43a843f620c6742a06633739887a901ec06b'/>
<id>ddef43a843f620c6742a06633739887a901ec06b</id>
<content type='text'>
/proc/partitions didn't use to write out the header if there was no
partition.  However, recent commit 66c64afe changed the behavior.
This is nothing major but there's no reason to change user visible
behavior without a good rationale.  Restore the original behavior.

Note that 2.6.28 has clean up changes scheduled which will replace
this rather hacky implementation.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Greg KH &lt;greg@kroah.com&gt;
Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
/proc/partitions didn't use to write out the header if there was no
partition.  However, recent commit 66c64afe changed the behavior.
This is nothing major but there's no reason to change user visible
behavior without a good rationale.  Restore the original behavior.

Note that 2.6.28 has clean up changes scheduled which will replace
this rather hacky implementation.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Greg KH &lt;greg@kroah.com&gt;
Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>remove blk_register_filter and blk_unregister_filter in gendisk</title>
<updated>2008-08-29T09:47:07+00:00</updated>
<author>
<name>FUJITA Tomonori</name>
<email>fujita.tomonori@lab.ntt.co.jp</email>
</author>
<published>2008-08-29T09:47:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=bb23b431db7405f6d79f989ad0236bf6428ba1cb'/>
<id>bb23b431db7405f6d79f989ad0236bf6428ba1cb</id>
<content type='text'>
This patch remove blk_register_filter and blk_unregister_filter in
gendisk, and adds them to sd.c, sr.c. and ide-cd.c

The commit abf5439370491dd6fbb4fe1a7939680d2a9bc9d4 moved cmdfilter
from gendisk to request_queue. It turned out that in some subsystems
multiple gendisks share a single request_queue. So we get:

Using physmap partition information
Creating 3 MTD partitions on "physmap-flash":
0x00000000-0x01c00000 : "User FS"
0x01c00000-0x01c40000 : "booter"
kobject (8511c410): tried to init an initialized object, something is seriously wrong.
Call Trace:
[&lt;8036644c&gt;] dump_stack+0x8/0x34
[&lt;8021f050&gt;] kobject_init+0x50/0xcc
[&lt;8021fa18&gt;] kobject_init_and_add+0x24/0x58
[&lt;8021d20c&gt;] blk_register_filter+0x4c/0x64
[&lt;8021c194&gt;] add_disk+0x78/0xe0
[&lt;8027d14c&gt;] add_mtd_blktrans_dev+0x254/0x278
[&lt;8027c8f0&gt;] blktrans_notify_add+0x40/0x78
[&lt;80279c00&gt;] add_mtd_device+0xd0/0x150
[&lt;8027b090&gt;] add_mtd_partitions+0x568/0x5d8
[&lt;80285458&gt;] physmap_flash_probe+0x2ac/0x334
[&lt;802644f8&gt;] driver_probe_device+0x12c/0x244
[&lt;8026465c&gt;] __driver_attach+0x4c/0x84
[&lt;80263c64&gt;] bus_for_each_dev+0x58/0xac
[&lt;802633ec&gt;] bus_add_driver+0xc4/0x24c
[&lt;802648e0&gt;] driver_register+0xcc/0x184
[&lt;80100460&gt;] _stext+0x60/0x1bc

In the long term, we need to fix such subsystems but we need a quick
fix now. This patch add the command filter support to only sd and sr
though it might be useful for other SG_IO users (such as cciss).

Signed-off-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Reported-by: Manuel Lauss &lt;mano@roarinelk.homelinux.net&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch remove blk_register_filter and blk_unregister_filter in
gendisk, and adds them to sd.c, sr.c. and ide-cd.c

The commit abf5439370491dd6fbb4fe1a7939680d2a9bc9d4 moved cmdfilter
from gendisk to request_queue. It turned out that in some subsystems
multiple gendisks share a single request_queue. So we get:

Using physmap partition information
Creating 3 MTD partitions on "physmap-flash":
0x00000000-0x01c00000 : "User FS"
0x01c00000-0x01c40000 : "booter"
kobject (8511c410): tried to init an initialized object, something is seriously wrong.
Call Trace:
[&lt;8036644c&gt;] dump_stack+0x8/0x34
[&lt;8021f050&gt;] kobject_init+0x50/0xcc
[&lt;8021fa18&gt;] kobject_init_and_add+0x24/0x58
[&lt;8021d20c&gt;] blk_register_filter+0x4c/0x64
[&lt;8021c194&gt;] add_disk+0x78/0xe0
[&lt;8027d14c&gt;] add_mtd_blktrans_dev+0x254/0x278
[&lt;8027c8f0&gt;] blktrans_notify_add+0x40/0x78
[&lt;80279c00&gt;] add_mtd_device+0xd0/0x150
[&lt;8027b090&gt;] add_mtd_partitions+0x568/0x5d8
[&lt;80285458&gt;] physmap_flash_probe+0x2ac/0x334
[&lt;802644f8&gt;] driver_probe_device+0x12c/0x244
[&lt;8026465c&gt;] __driver_attach+0x4c/0x84
[&lt;80263c64&gt;] bus_for_each_dev+0x58/0xac
[&lt;802633ec&gt;] bus_add_driver+0xc4/0x24c
[&lt;802648e0&gt;] driver_register+0xcc/0x184
[&lt;80100460&gt;] _stext+0x60/0x1bc

In the long term, we need to fix such subsystems but we need a quick
fix now. This patch add the command filter support to only sd and sr
though it might be useful for other SG_IO users (such as cciss).

Signed-off-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Reported-by: Manuel Lauss &lt;mano@roarinelk.homelinux.net&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>block: remove unused -&gt;busy part of the block queue tag map</title>
<updated>2008-08-27T07:50:19+00:00</updated>
<author>
<name>Matthew Wilcox</name>
<email>matthew@wil.cx</email>
</author>
<published>2008-08-26T07:02:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0e3eb45e4fe901d92bf9eae103155a57517af32e'/>
<id>0e3eb45e4fe901d92bf9eae103155a57517af32e</id>
<content type='text'>
It's not used for anything. On top of that, it's racy and can thus
trigger a faulty BUG_ON() in __blk_free_tags() on queue exit.

Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's not used for anything. On top of that, it's racy and can thus
trigger a faulty BUG_ON() in __blk_free_tags() on queue exit.

Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>block: clean up cmdfilter sysfs interface</title>
<updated>2008-08-27T07:50:19+00:00</updated>
<author>
<name>Adel Gadllah</name>
<email>adel.gadllah@gmail.com</email>
</author>
<published>2008-08-16T05:21:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a4a778971b9cfcbedb8648ba502d801f7db04c47'/>
<id>a4a778971b9cfcbedb8648ba502d801f7db04c47</id>
<content type='text'>
This patch changes the interface of the cmd filter to use a +/-
notation like:

echo -- +0x02 +0x03 -0x08

If neither + or - is given it defaults to + (allow command).

Note: The interface was added in 2.6.17-rc1 and is unused and
undocumented so far so it's safe to change it.

Reviewed-by: Matthew Wilcox &lt;willy@linux.intel.com&gt;
Reviewed-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Cc: jens.axboe@oracle.com
Cc: James.Bottomley@hansenpartnership.com
Cc: dan.j.williams@intel.com
Cc: pjones@redhat.com
Cc: viro@zeniv.linux.org.uk
Cc: dougg@torque.net
Signed-off-by: Adel Gadllah &lt;adel.gadllah@gmail.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch changes the interface of the cmd filter to use a +/-
notation like:

echo -- +0x02 +0x03 -0x08

If neither + or - is given it defaults to + (allow command).

Note: The interface was added in 2.6.17-rc1 and is unused and
undocumented so far so it's safe to change it.

Reviewed-by: Matthew Wilcox &lt;willy@linux.intel.com&gt;
Reviewed-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Cc: jens.axboe@oracle.com
Cc: James.Bottomley@hansenpartnership.com
Cc: dan.j.williams@intel.com
Cc: pjones@redhat.com
Cc: viro@zeniv.linux.org.uk
Cc: dougg@torque.net
Signed-off-by: Adel Gadllah &lt;adel.gadllah@gmail.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
