<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/block, branch v2.6.36-rc8</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>elevator: fix oops on early call to elevator_change()</title>
<updated>2010-10-07T07:35:16+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>jaxboe@fusionio.com</email>
</author>
<published>2010-10-07T07:35:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=430c62fb2948d964cf8dc7f3e2f69623c04ef62f'/>
<id>430c62fb2948d964cf8dc7f3e2f69623c04ef62f</id>
<content type='text'>
2.6.36 introduces an API for drivers to switch the IO scheduler
instead of manually calling the elevator exit and init functions.
This API was added since q-&gt;elevator must be cleared in between
those two calls. And since we already have this functionality
directly from use by the sysfs interface to switch schedulers
online, it was prudent to reuse it internally too.

But this API needs the queue to be in a fully initialized state
before it is called, or it will attempt to unregister elevator
kobjects before they have been added. This results in an oops
like this:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000051
IP: [&lt;ffffffff8116f15e&gt;] sysfs_create_dir+0x2e/0xc0
PGD 47ddfc067 PUD 47c6a1067 PMD 0
Oops: 0000 [#1] PREEMPT SMP
last sysfs file: /sys/devices/pci0000:00/0000:00:02.0/0000:04:00.1/irq
CPU 2
Modules linked in: t(+) loop hid_apple usbhid ahci ehci_hcd uhci_hcd libahci usbcore nls_base igb

Pid: 7319, comm: modprobe Not tainted 2.6.36-rc6+ #132 QSSC-S4R/QSSC-S4R
RIP: 0010:[&lt;ffffffff8116f15e&gt;]  [&lt;ffffffff8116f15e&gt;] sysfs_create_dir+0x2e/0xc0
RSP: 0018:ffff88027da25d08  EFLAGS: 00010246
RAX: ffff88047c68c528 RBX: 00000000fffffffe RCX: 0000000000000000
RDX: 000000000000002f RSI: 000000000000002f RDI: ffff88047e196c88
RBP: ffff88027da25d38 R08: 0000000000000000 R09: d84156c5635688c0
R10: d84156c5635688c0 R11: 0000000000000000 R12: ffff88047e196c88
R13: 0000000000000000 R14: 0000000000000000 R15: ffff88047c68c528
FS:  00007fcb0b26f6e0(0000) GS:ffff880287400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000051 CR3: 000000047e76e000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process modprobe (pid: 7319, threadinfo ffff88027da24000, task ffff88027d377090)
Stack:
 ffff88027da25d58 ffff88047c68c528 00000000fffffffe ffff88047e196c88
&lt;0&gt; ffff88047c68c528 ffff88047e05bd90 ffff88027da25d78 ffffffff8123fb77
&lt;0&gt; ffff88047e05bd90 0000000000000000 ffff88047e196c88 ffff88047c68c528
Call Trace:
 [&lt;ffffffff8123fb77&gt;] kobject_add_internal+0xe7/0x1f0
 [&lt;ffffffff8123fd98&gt;] kobject_add_varg+0x38/0x60
 [&lt;ffffffff8123feb9&gt;] kobject_add+0x69/0x90
 [&lt;ffffffff8116efe0&gt;] ? sysfs_remove_dir+0x20/0xa0
 [&lt;ffffffff8103d48d&gt;] ? sub_preempt_count+0x9d/0xe0
 [&lt;ffffffff8143de20&gt;] ? _raw_spin_unlock+0x30/0x50
 [&lt;ffffffff8116efe0&gt;] ? sysfs_remove_dir+0x20/0xa0
 [&lt;ffffffff8116eff4&gt;] ? sysfs_remove_dir+0x34/0xa0
 [&lt;ffffffff81224204&gt;] elv_register_queue+0x34/0xa0
 [&lt;ffffffff81224aad&gt;] elevator_change+0xfd/0x250
 [&lt;ffffffffa007e000&gt;] ? t_init+0x0/0x361 [t]
 [&lt;ffffffffa007e000&gt;] ? t_init+0x0/0x361 [t]
 [&lt;ffffffffa007e0a8&gt;] t_init+0xa8/0x361 [t]
 [&lt;ffffffff810001de&gt;] do_one_initcall+0x3e/0x170
 [&lt;ffffffff8108c3fd&gt;] sys_init_module+0xbd/0x220
 [&lt;ffffffff81002f2b&gt;] system_call_fastpath+0x16/0x1b
Code: e5 41 56 41 55 41 54 49 89 fc 53 48 83 ec 10 48 85 ff 74 52 48 8b 47 18 49 c7 c5 00 46 61 81 48 85 c0 74 04 4c 8b 68 30 45 31 f6 &lt;41&gt; 80 7d 51 00 74 0e 49 8b 44 24 28 4c 89 e7 ff 50 20 49 89 c6
RIP  [&lt;ffffffff8116f15e&gt;] sysfs_create_dir+0x2e/0xc0
 RSP &lt;ffff88027da25d08&gt;
CR2: 0000000000000051
---[ end trace a6541d3bf07945df ]---

Fix this by adding a registered bit to the elevator queue, which is
set when the sysfs kobjects have been registered.

Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
2.6.36 introduces an API for drivers to switch the IO scheduler
instead of manually calling the elevator exit and init functions.
This API was added since q-&gt;elevator must be cleared in between
those two calls. And since we already have this functionality
directly from use by the sysfs interface to switch schedulers
online, it was prudent to reuse it internally too.

But this API needs the queue to be in a fully initialized state
before it is called, or it will attempt to unregister elevator
kobjects before they have been added. This results in an oops
like this:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000051
IP: [&lt;ffffffff8116f15e&gt;] sysfs_create_dir+0x2e/0xc0
PGD 47ddfc067 PUD 47c6a1067 PMD 0
Oops: 0000 [#1] PREEMPT SMP
last sysfs file: /sys/devices/pci0000:00/0000:00:02.0/0000:04:00.1/irq
CPU 2
Modules linked in: t(+) loop hid_apple usbhid ahci ehci_hcd uhci_hcd libahci usbcore nls_base igb

Pid: 7319, comm: modprobe Not tainted 2.6.36-rc6+ #132 QSSC-S4R/QSSC-S4R
RIP: 0010:[&lt;ffffffff8116f15e&gt;]  [&lt;ffffffff8116f15e&gt;] sysfs_create_dir+0x2e/0xc0
RSP: 0018:ffff88027da25d08  EFLAGS: 00010246
RAX: ffff88047c68c528 RBX: 00000000fffffffe RCX: 0000000000000000
RDX: 000000000000002f RSI: 000000000000002f RDI: ffff88047e196c88
RBP: ffff88027da25d38 R08: 0000000000000000 R09: d84156c5635688c0
R10: d84156c5635688c0 R11: 0000000000000000 R12: ffff88047e196c88
R13: 0000000000000000 R14: 0000000000000000 R15: ffff88047c68c528
FS:  00007fcb0b26f6e0(0000) GS:ffff880287400000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000051 CR3: 000000047e76e000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process modprobe (pid: 7319, threadinfo ffff88027da24000, task ffff88027d377090)
Stack:
 ffff88027da25d58 ffff88047c68c528 00000000fffffffe ffff88047e196c88
&lt;0&gt; ffff88047c68c528 ffff88047e05bd90 ffff88027da25d78 ffffffff8123fb77
&lt;0&gt; ffff88047e05bd90 0000000000000000 ffff88047e196c88 ffff88047c68c528
Call Trace:
 [&lt;ffffffff8123fb77&gt;] kobject_add_internal+0xe7/0x1f0
 [&lt;ffffffff8123fd98&gt;] kobject_add_varg+0x38/0x60
 [&lt;ffffffff8123feb9&gt;] kobject_add+0x69/0x90
 [&lt;ffffffff8116efe0&gt;] ? sysfs_remove_dir+0x20/0xa0
 [&lt;ffffffff8103d48d&gt;] ? sub_preempt_count+0x9d/0xe0
 [&lt;ffffffff8143de20&gt;] ? _raw_spin_unlock+0x30/0x50
 [&lt;ffffffff8116efe0&gt;] ? sysfs_remove_dir+0x20/0xa0
 [&lt;ffffffff8116eff4&gt;] ? sysfs_remove_dir+0x34/0xa0
 [&lt;ffffffff81224204&gt;] elv_register_queue+0x34/0xa0
 [&lt;ffffffff81224aad&gt;] elevator_change+0xfd/0x250
 [&lt;ffffffffa007e000&gt;] ? t_init+0x0/0x361 [t]
 [&lt;ffffffffa007e000&gt;] ? t_init+0x0/0x361 [t]
 [&lt;ffffffffa007e0a8&gt;] t_init+0xa8/0x361 [t]
 [&lt;ffffffff810001de&gt;] do_one_initcall+0x3e/0x170
 [&lt;ffffffff8108c3fd&gt;] sys_init_module+0xbd/0x220
 [&lt;ffffffff81002f2b&gt;] system_call_fastpath+0x16/0x1b
Code: e5 41 56 41 55 41 54 49 89 fc 53 48 83 ec 10 48 85 ff 74 52 48 8b 47 18 49 c7 c5 00 46 61 81 48 85 c0 74 04 4c 8b 68 30 45 31 f6 &lt;41&gt; 80 7d 51 00 74 0e 49 8b 44 24 28 4c 89 e7 ff 50 20 49 89 c6
RIP  [&lt;ffffffff8116f15e&gt;] sysfs_create_dir+0x2e/0xc0
 RSP &lt;ffff88027da25d08&gt;
CR2: 0000000000000051
---[ end trace a6541d3bf07945df ]---

Fix this by adding a registered bit to the elevator queue, which is
set when the sysfs kobjects have been registered.

Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>block: prevent merges of discard and write requests</title>
<updated>2010-09-25T10:42:55+00:00</updated>
<author>
<name>Adrian Hunter</name>
<email>adrian.hunter@nokia.com</email>
</author>
<published>2010-09-25T10:42:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f281fb5fe54e15a7ab802945e42f8e24fceb56b2'/>
<id>f281fb5fe54e15a7ab802945e42f8e24fceb56b2</id>
<content type='text'>
Add logic to prevent two I/O requests being merged if
only one of them is a discard.  Ditto secure discard.

Without this fix, it is possible for write requests
to transform into discard requests.  For example:

  Submit bio 1 to discard 8 sectors from sector n
  Submit bio 2 to write 8 sectors from sector n + 16
  Submit bio 3 to write 8 sectors from sector n + 8

Bio 1 becomes request 1.  Bio 2 becomes request 2.
Bio 3 is merged with request 2, and then subsequently
request 2 is merged with request 1 resulting in just
one I/O request which discards all 24 sectors.

Signed-off-by: Adrian Hunter &lt;adrian.hunter@nokia.com&gt;

(Moved the checks above the position checks /Jens)

Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add logic to prevent two I/O requests being merged if
only one of them is a discard.  Ditto secure discard.

Without this fix, it is possible for write requests
to transform into discard requests.  For example:

  Submit bio 1 to discard 8 sectors from sector n
  Submit bio 2 to write 8 sectors from sector n + 16
  Submit bio 3 to write 8 sectors from sector n + 8

Bio 1 becomes request 1.  Bio 2 becomes request 2.
Bio 3 is merged with request 2, and then subsequently
request 2 is merged with request 1 resulting in just
one I/O request which discards all 24 sectors.

Signed-off-by: Adrian Hunter &lt;adrian.hunter@nokia.com&gt;

(Moved the checks above the position checks /Jens)

Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cfq-iosched: fix a kernel OOPs when usb key is inserted</title>
<updated>2010-09-21T09:49:17+00:00</updated>
<author>
<name>Vivek Goyal</name>
<email>vgoyal@redhat.com</email>
</author>
<published>2010-09-14T06:47:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=180be2a0420a0d680285e9352c0db85016b9ed2a'/>
<id>180be2a0420a0d680285e9352c0db85016b9ed2a</id>
<content type='text'>
Mike reported a kernel crash when a usb key hotplug is performed while all
kernel thrads are not in a root cgroup and are running in one of the child
cgroups of blkio controller.

	BUG: unable to handle kernel NULL pointer dereference at 0000002c
	IP: [&lt;c11c7b08&gt;] cfq_get_queue+0x232/0x412
	*pde = 00000000
	Oops: 0000 [#1] PREEMPT
	last sysfs file: /sys/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1:1.0/host3/scsi_host/host3/uevent

	[..]
	Pid: 30039, comm: scsi_scan_3 Not tainted 2.6.35.2-fg.roam #1 Volvi2                         /Aspire 4315
	EIP: 0060:[&lt;c11c7b08&gt;] EFLAGS: 00010086 CPU: 0
	EIP is at cfq_get_queue+0x232/0x412
	EAX: f705f9c0 EBX: e977abac ECX: 00000000 EDX: 00000000
	ESI: f00da400 EDI: f00da4ec EBP: e977a800 ESP: dff8fd00
	 DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068
	Process scsi_scan_3 (pid: 30039, ti=dff8e000 task=f6b6c9a0 task.ti=dff8e000)
	Stack:
	 00000000 00000000 00000001 01ff0000 f00da508 00000000 f00da524 f00da540
	&lt;0&gt; e7994940 dd631750 f705f9c0 e977a820 e977ac44 f00da4d0 00000001 f6b6c9a0
	&lt;0&gt; 00000010 00008010 0000000b 00000000 00000001 e977a800 dd76fac0 00000246
	Call Trace:
	 [&lt;c11c7f10&gt;] ? cfq_set_request+0x228/0x34c
	 [&lt;c11c7ce8&gt;] ? cfq_set_request+0x0/0x34c
	 [&lt;c11bb3b9&gt;] ? elv_set_request+0xf/0x1c
	 [&lt;c11bdd51&gt;] ? get_request+0x1ad/0x22f
	 [&lt;c11bddf2&gt;] ? get_request_wait+0x1f/0x11a
	 [&lt;c11d013b&gt;] ? kvasprintf+0x33/0x3b
	 [&lt;c127b537&gt;] ? scsi_execute+0x1d/0x103
	 [&lt;c127b675&gt;] ? scsi_execute_req+0x58/0x83
	 [&lt;c127c391&gt;] ? scsi_probe_and_add_lun+0x188/0x7c2
	 [&lt;c12718c6&gt;] ? attribute_container_add_device+0x15/0xfa
	 [&lt;c11c95d1&gt;] ? kobject_get+0xf/0x13
	 [&lt;c126d1db&gt;] ? get_device+0x10/0x14
	 [&lt;c127be93&gt;] ? scsi_alloc_target+0x217/0x24d
	 [&lt;c127cbd8&gt;] ? __scsi_scan_target+0x95/0x480
	 [&lt;c10204eb&gt;] ? dequeue_entity+0x14/0x1fe
	 [&lt;c1020491&gt;] ? update_curr+0x165/0x1ab
	 [&lt;c1020491&gt;] ? update_curr+0x165/0x1ab
	 [&lt;c127d00d&gt;] ? scsi_scan_channel+0x4a/0x76
	 [&lt;c127d0b0&gt;] ? scsi_scan_host_selected+0x77/0xad
	 [&lt;c127d13c&gt;] ? do_scan_async+0x0/0x11a
	 [&lt;c127d137&gt;] ? do_scsi_scan_host+0x51/0x56
	 [&lt;c127d13c&gt;] ? do_scan_async+0x0/0x11a
	 [&lt;c127d14a&gt;] ? do_scan_async+0xe/0x11a
	 [&lt;c127d13c&gt;] ? do_scan_async+0x0/0x11a
	 [&lt;c10354c5&gt;] ? kthread+0x5e/0x63
	 [&lt;c1035467&gt;] ? kthread+0x0/0x63
	 [&lt;c1002af6&gt;] ? kernel_thread_helper+0x6/0x10
	Code: 44 24 1c 54 83 44 24 18 54 83 fa 03 75 94 8b 06 c7 86 64 02 00 00 01 00 00 00 83 e0 03 09 f0 89 06 8b 44 24 28 8b 90 58 01 00 00 &lt;8b&gt; 42 2c 85 c0 75 03 8b 42 08 8d 54 24 48 52 8d 4c 24 50 51 68
	EIP: [&lt;c11c7b08&gt;] cfq_get_queue+0x232/0x412 SS:ESP 0068:dff8fd00
	CR2: 000000000000002c
	---[ end trace 9a88306573f69b12 ]---

The problem here is that we don't have bdi-&gt;dev information available when
thread does some IO.  Hence when dev_name() tries to access bdi-&gt;dev, it
crashes.

This problem does not happen if kernel threads are in root group as root
group is statically allocated at device initialization time and we don't
hit this piece of code.

Fix it by delaying the filling of major and minor number information of
device in blk_group.  Initially a blk_group is created with 0 as device
information and this information is filled later once some more IO comes
in from same group.

Reported-by: Mike Kazantsev &lt;mk.fraggod@gmail.com&gt;
Signed-off-by: Vivek Goyal &lt;vgoyal@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Mike reported a kernel crash when a usb key hotplug is performed while all
kernel thrads are not in a root cgroup and are running in one of the child
cgroups of blkio controller.

	BUG: unable to handle kernel NULL pointer dereference at 0000002c
	IP: [&lt;c11c7b08&gt;] cfq_get_queue+0x232/0x412
	*pde = 00000000
	Oops: 0000 [#1] PREEMPT
	last sysfs file: /sys/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1:1.0/host3/scsi_host/host3/uevent

	[..]
	Pid: 30039, comm: scsi_scan_3 Not tainted 2.6.35.2-fg.roam #1 Volvi2                         /Aspire 4315
	EIP: 0060:[&lt;c11c7b08&gt;] EFLAGS: 00010086 CPU: 0
	EIP is at cfq_get_queue+0x232/0x412
	EAX: f705f9c0 EBX: e977abac ECX: 00000000 EDX: 00000000
	ESI: f00da400 EDI: f00da4ec EBP: e977a800 ESP: dff8fd00
	 DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068
	Process scsi_scan_3 (pid: 30039, ti=dff8e000 task=f6b6c9a0 task.ti=dff8e000)
	Stack:
	 00000000 00000000 00000001 01ff0000 f00da508 00000000 f00da524 f00da540
	&lt;0&gt; e7994940 dd631750 f705f9c0 e977a820 e977ac44 f00da4d0 00000001 f6b6c9a0
	&lt;0&gt; 00000010 00008010 0000000b 00000000 00000001 e977a800 dd76fac0 00000246
	Call Trace:
	 [&lt;c11c7f10&gt;] ? cfq_set_request+0x228/0x34c
	 [&lt;c11c7ce8&gt;] ? cfq_set_request+0x0/0x34c
	 [&lt;c11bb3b9&gt;] ? elv_set_request+0xf/0x1c
	 [&lt;c11bdd51&gt;] ? get_request+0x1ad/0x22f
	 [&lt;c11bddf2&gt;] ? get_request_wait+0x1f/0x11a
	 [&lt;c11d013b&gt;] ? kvasprintf+0x33/0x3b
	 [&lt;c127b537&gt;] ? scsi_execute+0x1d/0x103
	 [&lt;c127b675&gt;] ? scsi_execute_req+0x58/0x83
	 [&lt;c127c391&gt;] ? scsi_probe_and_add_lun+0x188/0x7c2
	 [&lt;c12718c6&gt;] ? attribute_container_add_device+0x15/0xfa
	 [&lt;c11c95d1&gt;] ? kobject_get+0xf/0x13
	 [&lt;c126d1db&gt;] ? get_device+0x10/0x14
	 [&lt;c127be93&gt;] ? scsi_alloc_target+0x217/0x24d
	 [&lt;c127cbd8&gt;] ? __scsi_scan_target+0x95/0x480
	 [&lt;c10204eb&gt;] ? dequeue_entity+0x14/0x1fe
	 [&lt;c1020491&gt;] ? update_curr+0x165/0x1ab
	 [&lt;c1020491&gt;] ? update_curr+0x165/0x1ab
	 [&lt;c127d00d&gt;] ? scsi_scan_channel+0x4a/0x76
	 [&lt;c127d0b0&gt;] ? scsi_scan_host_selected+0x77/0xad
	 [&lt;c127d13c&gt;] ? do_scan_async+0x0/0x11a
	 [&lt;c127d137&gt;] ? do_scsi_scan_host+0x51/0x56
	 [&lt;c127d13c&gt;] ? do_scan_async+0x0/0x11a
	 [&lt;c127d14a&gt;] ? do_scan_async+0xe/0x11a
	 [&lt;c127d13c&gt;] ? do_scan_async+0x0/0x11a
	 [&lt;c10354c5&gt;] ? kthread+0x5e/0x63
	 [&lt;c1035467&gt;] ? kthread+0x0/0x63
	 [&lt;c1002af6&gt;] ? kernel_thread_helper+0x6/0x10
	Code: 44 24 1c 54 83 44 24 18 54 83 fa 03 75 94 8b 06 c7 86 64 02 00 00 01 00 00 00 83 e0 03 09 f0 89 06 8b 44 24 28 8b 90 58 01 00 00 &lt;8b&gt; 42 2c 85 c0 75 03 8b 42 08 8d 54 24 48 52 8d 4c 24 50 51 68
	EIP: [&lt;c11c7b08&gt;] cfq_get_queue+0x232/0x412 SS:ESP 0068:dff8fd00
	CR2: 000000000000002c
	---[ end trace 9a88306573f69b12 ]---

The problem here is that we don't have bdi-&gt;dev information available when
thread does some IO.  Hence when dev_name() tries to access bdi-&gt;dev, it
crashes.

This problem does not happen if kernel threads are in root group as root
group is statically allocated at device initialization time and we don't
hit this piece of code.

Fix it by delaying the filling of major and minor number information of
device in blk_group.  Initially a blk_group is created with 0 as device
information and this information is filled later once some more IO comes
in from same group.

Reported-by: Mike Kazantsev &lt;mk.fraggod@gmail.com&gt;
Signed-off-by: Vivek Goyal &lt;vgoyal@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>block: fix blk_rq_map_kern bio direction flag</title>
<updated>2010-09-21T09:49:17+00:00</updated>
<author>
<name>Benny Halevy</name>
<email>bhalevy@panasas.com</email>
</author>
<published>2010-09-13T19:32:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a45dc2d2b8d1afa57c91dcfac224e50ffcd3f805'/>
<id>a45dc2d2b8d1afa57c91dcfac224e50ffcd3f805</id>
<content type='text'>
This bug was introduced in 7b6d91daee5cac6402186ff224c3af39d79f4a0e
"block: unify flags for struct bio and struct request"

Cc: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
Signed-off-by: Benny Halevy &lt;bhalevy@panasas.com&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This bug was introduced in 7b6d91daee5cac6402186ff224c3af39d79f4a0e
"block: unify flags for struct bio and struct request"

Cc: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
Signed-off-by: Benny Halevy &lt;bhalevy@panasas.com&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>block: Range check cpu in blk_cpu_to_group</title>
<updated>2010-09-10T07:03:21+00:00</updated>
<author>
<name>Brian King</name>
<email>brking@linux.vnet.ibm.com</email>
</author>
<published>2010-09-10T07:03:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=be14eb619108fa8b7120eb2c42d66d5f623ae10e'/>
<id>be14eb619108fa8b7120eb2c42d66d5f623ae10e</id>
<content type='text'>
While testing CPU DLPAR, the following problem was discovered.
We were DLPAR removing the first CPU, which in this case was
logical CPUs 0-3. CPUs 0-2 were already marked offline and
we were in the process of offlining CPU 3. After marking
the CPU inactive and offline in cpu_disable, but before the
cpu was completely idle (cpu_die), we ended up in __make_request
on CPU 3. There we looked at the topology map to see which CPU
to complete the I/O on and found no CPUs in the cpu_sibling_map.
This resulted in the block layer setting the completion cpu
to be NR_CPUS, which then caused an oops when we tried to
complete the I/O.

Fix this by sanity checking the value we return from blk_cpu_to_group
to be a valid cpu value.

Signed-off-by: Brian King &lt;brking@linux.vnet.ibm.com&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While testing CPU DLPAR, the following problem was discovered.
We were DLPAR removing the first CPU, which in this case was
logical CPUs 0-3. CPUs 0-2 were already marked offline and
we were in the process of offlining CPU 3. After marking
the CPU inactive and offline in cpu_disable, but before the
cpu was completely idle (cpu_die), we ended up in __make_request
on CPU 3. There we looked at the topology map to see which CPU
to complete the I/O on and found no CPUs in the cpu_sibling_map.
This resulted in the block layer setting the completion cpu
to be NR_CPUS, which then caused an oops when we tried to
complete the I/O.

Fix this by sanity checking the value we return from blk_cpu_to_group
to be a valid cpu value.

Signed-off-by: Brian King &lt;brking@linux.vnet.ibm.com&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>block: add function call to switch the IO scheduler from a driver</title>
<updated>2010-08-23T11:52:19+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>jaxboe@fusionio.com</email>
</author>
<published>2010-08-23T11:52:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5dd531a03ad721b41911ddb32e6e0481404e7aaf'/>
<id>5dd531a03ad721b41911ddb32e6e0481404e7aaf</id>
<content type='text'>
Currently drivers must do an elevator_exit() + elevator_init()
to switch IO schedulers. There are a few problems with this:

- Since commit 1abec4fdbb142e3ccb6ce99832fae42129134a96,
  elevator_init() requires a zeroed out q-&gt;elevator
  pointer. The two existing in-kernel users don't do that.

- It will only work at initialization time, since using the
  above two-staged construct does not properly quisce the queue.

So add elevator_change() which takes care of this, and convert
the elv_iosched_store() sysfs interface to use this helper as well.

Reported-by: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;
Reported-by: Kevin Vigor &lt;kevin@vigor.nu&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently drivers must do an elevator_exit() + elevator_init()
to switch IO schedulers. There are a few problems with this:

- Since commit 1abec4fdbb142e3ccb6ce99832fae42129134a96,
  elevator_init() requires a zeroed out q-&gt;elevator
  pointer. The two existing in-kernel users don't do that.

- It will only work at initialization time, since using the
  above two-staged construct does not properly quisce the queue.

So add elevator_change() which takes care of this, and convert
the elv_iosched_store() sysfs interface to use this helper as well.

Reported-by: Peter Oberparleiter &lt;oberpar@linux.vnet.ibm.com&gt;
Reported-by: Kevin Vigor &lt;kevin@vigor.nu&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>BLOCK: fix bio.bi_rw handling</title>
<updated>2010-08-23T10:33:10+00:00</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2010-08-12T12:31:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5e00d1b5b4c10fb839afd5ce61db8e24339454b0'/>
<id>5e00d1b5b4c10fb839afd5ce61db8e24339454b0</id>
<content type='text'>
Return of the bi_rw tests is no longer bool after commit 74450be1. But
results of such tests are stored in bools. This doesn't fit in there
for some compilers (gcc 4.5 here), so either use !! magic to get real
bools or use ulong where the result is assigned somewhere.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Jeff Moyer &lt;jmoyer@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Return of the bi_rw tests is no longer bool after commit 74450be1. But
results of such tests are stored in bools. This doesn't fit in there
for some compilers (gcc 4.5 here), so either use !! magic to get real
bools or use ulong where the result is assigned somewhere.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Jeff Moyer &lt;jmoyer@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>block: put dev-&gt;kobj in blk_register_queue fail path</title>
<updated>2010-08-23T10:30:29+00:00</updated>
<author>
<name>Xiaotian Feng</name>
<email>dfeng@redhat.com</email>
</author>
<published>2010-08-23T10:30:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c87ffbb812cf6150097a5095b031f4013a8f78a5'/>
<id>c87ffbb812cf6150097a5095b031f4013a8f78a5</id>
<content type='text'>
kernel needs to kobject_put on dev-&gt;kobj if elv_register_queue fails.

Signed-off-by: Xiaotian Feng &lt;dfeng@redhat.com&gt;
Cc: "Martin K. Petersen" &lt;martin.petersen@oracle.com&gt;
Cc: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Cc: Nikanth Karthikesan &lt;knikanth@suse.de&gt;
Cc: David Teigland &lt;teigland@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
kernel needs to kobject_put on dev-&gt;kobj if elv_register_queue fails.

Signed-off-by: Xiaotian Feng &lt;dfeng@redhat.com&gt;
Cc: "Martin K. Petersen" &lt;martin.petersen@oracle.com&gt;
Cc: Stephen Hemminger &lt;shemminger@vyatta.com&gt;
Cc: Nikanth Karthikesan &lt;knikanth@suse.de&gt;
Cc: David Teigland &lt;teigland@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cfq-iosched: blktrace print per slice sector stats</title>
<updated>2010-08-23T10:25:03+00:00</updated>
<author>
<name>Vivek Goyal</name>
<email>vgoyal@redhat.com</email>
</author>
<published>2010-08-23T10:25:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c4e7893ebc3a5c507b53f59b9de448db20849944'/>
<id>c4e7893ebc3a5c507b53f59b9de448db20849944</id>
<content type='text'>
o Divyesh had gotten rid of this code in the past. I want to re-introduce it
  back as it helps me a lot during debugging.

Reviewed-by: Jeff Moyer &lt;jmoyer@redhat.com&gt;
Reviewed-by: Divyesh Shah &lt;dpshah@google.com&gt;
Signed-off-by: Vivek Goyal &lt;vgoyal@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
o Divyesh had gotten rid of this code in the past. I want to re-introduce it
  back as it helps me a lot during debugging.

Reviewed-by: Jeff Moyer &lt;jmoyer@redhat.com&gt;
Reviewed-by: Divyesh Shah &lt;dpshah@google.com&gt;
Signed-off-by: Vivek Goyal &lt;vgoyal@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>cfq-iosched: Implement tunable group_idle</title>
<updated>2010-08-23T10:24:26+00:00</updated>
<author>
<name>Vivek Goyal</name>
<email>vgoyal@redhat.com</email>
</author>
<published>2010-08-23T10:24:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=80bdf0c78fff075dfa21576273c8b0c7db22bdfe'/>
<id>80bdf0c78fff075dfa21576273c8b0c7db22bdfe</id>
<content type='text'>
o Implement a new tunable group_idle, which allows idling on the group
  instead of a cfq queue. Hence one can set slice_idle = 0 and not idle
  on the individual queues but idle on the group. This way on fast storage
  we can get fairness between groups at the same time overall throughput
  improves.

Signed-off-by: Vivek Goyal &lt;vgoyal@redhat.com&gt;
Acked-by: Jeff Moyer &lt;jmoyer@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
o Implement a new tunable group_idle, which allows idling on the group
  instead of a cfq queue. Hence one can set slice_idle = 0 and not idle
  on the individual queues but idle on the group. This way on fast storage
  we can get fairness between groups at the same time overall throughput
  improves.

Signed-off-by: Vivek Goyal &lt;vgoyal@redhat.com&gt;
Acked-by: Jeff Moyer &lt;jmoyer@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
