<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/block, branch v2.6.38</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.38</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.38'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2011-03-03T16:53:25Z</updated>
<entry>
<title>block: kill loop_mutex</title>
<updated>2011-03-03T16:53:25Z</updated>
<author>
<name>Petr Uzel</name>
<email>petr.uzel@suse.cz</email>
</author>
<published>2011-03-03T16:48:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fd51469fb68b987032e46297e0a4fe9020063c20'/>
<id>urn:sha1:fd51469fb68b987032e46297e0a4fe9020063c20</id>
<content type='text'>
Following steps lead to deadlock in kernel:

dd if=/dev/zero of=img bs=512 count=1000
losetup -f img
mkfs.ext2 /dev/loop0
mount -t ext2 -o loop /dev/loop0 mnt
umount mnt/

Stacktrace:
[&lt;c102ec04&gt;] irq_exit+0x36/0x59
[&lt;c101502c&gt;] smp_apic_timer_interrupt+0x6b/0x75
[&lt;c127f639&gt;] apic_timer_interrupt+0x31/0x38
[&lt;c101df88&gt;] mutex_spin_on_owner+0x54/0x5b
[&lt;fe2250e9&gt;] lo_release+0x12/0x67 [loop]
[&lt;c10c4eae&gt;] __blkdev_put+0x7c/0x10c
[&lt;c10a4da5&gt;] fput+0xd5/0x1aa
[&lt;fe2250cf&gt;] loop_clr_fd+0x1a9/0x1b1 [loop]
[&lt;fe225110&gt;] lo_release+0x39/0x67 [loop]
[&lt;c10c4eae&gt;] __blkdev_put+0x7c/0x10c
[&lt;c10a59d9&gt;] deactivate_locked_super+0x17/0x36
[&lt;c10b6f37&gt;] sys_umount+0x27e/0x2a5
[&lt;c10b6f69&gt;] sys_oldumount+0xb/0xe
[&lt;c1002897&gt;] sysenter_do_call+0x12/0x26
[&lt;ffffffff&gt;] 0xffffffff

Regression since 2a48fc0ab24241755dc9, which introduced the private
loop_mutex as part of the BKL removal process.

As per [1], the mutex can be safely removed.

[1] http://www.gossamer-threads.com/lists/linux/kernel/1341930

Addresses: https://bugzilla.novell.com/show_bug.cgi?id=669394
Addresses: https://bugzilla.kernel.org/show_bug.cgi?id=29172

Signed-off-by: Petr Uzel &lt;petr.uzel@suse.cz&gt;
Cc: stable@kernel.org
Reviewed-by: Nikanth Karthikesan &lt;knikanth@suse.de&gt;
Acked-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://neil.brown.name/md</title>
<updated>2011-02-25T19:13:26Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-02-25T19:13:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=638691a7a46a4ae9a7b56c603299e42d7f6e722e'/>
<id>urn:sha1:638691a7a46a4ae9a7b56c603299e42d7f6e722e</id>
<content type='text'>
* 'for-linus' of git://neil.brown.name/md:
  md: Fix - again - partition detection when array becomes active
  Fix over-zealous flush_disk when changing device size.
  md: avoid spinlock problem in blk_throtl_exit
  md: correctly handle probe of an 'mdp' device.
  md: don't set_capacity before array is active.
  md: Fix raid1-&gt;raid0 takeover
</content>
</entry>
<entry>
<title>Fix over-zealous flush_disk when changing device size.</title>
<updated>2011-02-24T06:25:47Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2011-02-24T06:25:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=93b270f76e7ef3b81001576860c2701931cdc78b'/>
<id>urn:sha1:93b270f76e7ef3b81001576860c2701931cdc78b</id>
<content type='text'>
There are two cases when we call flush_disk.
In one, the device has disappeared (check_disk_change) so any
data will hold becomes irrelevant.
In the oter, the device has changed size (check_disk_size_change)
so data we hold may be irrelevant.

In both cases it makes sense to discard any 'clean' buffers,
so they will be read back from the device if needed.

In the former case it makes sense to discard 'dirty' buffers
as there will never be anywhere safe to write the data.  In the
second case it *does*not* make sense to discard dirty buffers
as that will lead to file system corruption when you simply enlarge
the containing devices.

flush_disk calls __invalidate_devices.
__invalidate_device calls both invalidate_inodes and invalidate_bdev.

invalidate_inodes *does* discard I_DIRTY inodes and this does lead
to fs corruption.

invalidate_bev *does*not* discard dirty pages, but I don't really care
about that at present.

So this patch adds a flag to __invalidate_device (calling it
__invalidate_device2) to indicate whether dirty buffers should be
killed, and this is passed to invalidate_inodes which can choose to
skip dirty inodes.

flusk_disk then passes true from check_disk_change and false from
check_disk_size_change.

dm avoids tripping over this problem by calling i_size_write directly
rathher than using check_disk_size_change.

md does use check_disk_size_change and so is affected.

This regression was introduced by commit 608aeef17a which causes
check_disk_size_change to call flush_disk, so it is suitable for any
kernel since 2.6.27.

Cc: stable@kernel.org
Acked-by: Jeff Moyer &lt;jmoyer@redhat.com&gt;
Cc: Andrew Patterson &lt;andrew.patterson@hp.com&gt;
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>nbd: remove module-level ioctl mutex</title>
<updated>2011-02-12T00:12:20Z</updated>
<author>
<name>Soren Hansen</name>
<email>soren@linux2go.dk</email>
</author>
<published>2011-02-10T23:01:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=de1f016f882e52facc3c8609599f827bcdd14af9'/>
<id>urn:sha1:de1f016f882e52facc3c8609599f827bcdd14af9</id>
<content type='text'>
Commit 2a48fc0ab242417 ("block: autoconvert trivial BKL users to private
mutex") replaced uses of the BKL in the nbd driver with mutex
operations.  Since then, I've been been seeing these lock ups:

 INFO: task qemu-nbd:16115 blocked for more than 120 seconds.
 "echo 0 &gt; /proc/sys/kernel/hung_task_timeout_secs" disables this message.
 qemu-nbd      D 0000000000000001     0 16115  16114 0x00000004
  ffff88007d775d98 0000000000000082 ffff88007d775fd8 ffff88007d774000
  0000000000013a80 ffff8800020347e0 ffff88007d775fd8 0000000000013a80
  ffff880133730000 ffff880002034440 ffffea0004333db8 ffffffffa071c020
 Call Trace:
  [&lt;ffffffff815b9997&gt;] __mutex_lock_slowpath+0xf7/0x180
  [&lt;ffffffff815b93eb&gt;] mutex_lock+0x2b/0x50
  [&lt;ffffffffa071a21c&gt;] nbd_ioctl+0x6c/0x1c0 [nbd]
  [&lt;ffffffff812cb970&gt;] blkdev_ioctl+0x230/0x730
  [&lt;ffffffff811967a1&gt;] block_ioctl+0x41/0x50
  [&lt;ffffffff81175c03&gt;] do_vfs_ioctl+0x93/0x370
  [&lt;ffffffff81175f61&gt;] sys_ioctl+0x81/0xa0
  [&lt;ffffffff8100c0c2&gt;] system_call_fastpath+0x16/0x1b

Instrumenting the nbd module's ioctl handler with some extra logging
clearly shows the NBD_DO_IT ioctl being invoked which is a long-lived
ioctl in the sense that it doesn't return until another ioctl asks the
driver to disconnect.  However, that other ioctl blocks, waiting for the
module-level mutex that replaced the BKL, and then we're stuck.

This patch removes the module-level mutex altogether.  It's clearly
wrong, and as far as I can see, it's entirely unnecessary, since the nbd
driver maintains per-device mutexes, and I don't see anything that would
require a module-level (or kernel-level, for that matter) mutex.

Signed-off-by: Soren Hansen &lt;soren@linux2go.dk&gt;
Acked-by: Serge Hallyn &lt;serge.hallyn@canonical.com&gt;
Acked-by: Paul Clements &lt;paul.clements@steeleye.com&gt;
Cc: Arnd Bergmann &lt;arnd@arndb.de&gt;
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Cc: &lt;stable@kernel.org&gt;		[2.6.37.x]
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>cciss: make cciss_revalidate not loop through CISS_MAX_LUNS volumes unnecessarily.</title>
<updated>2011-01-19T15:25:02Z</updated>
<author>
<name>Stephen M. Cameron</name>
<email>StephenM.Cameron</email>
</author>
<published>2011-01-19T15:25:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=68264e9d6781f7163e92c517769bb470fa43f6cd'/>
<id>urn:sha1:68264e9d6781f7163e92c517769bb470fa43f6cd</id>
<content type='text'>
Signed-off-by: Stephen M. Cameron &lt;scameron@beardog.cce.hp.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
<entry>
<title>drivers/block/aoe/Makefile: replace the use of &lt;module&gt;-objs with &lt;module&gt;-y</title>
<updated>2011-01-19T15:25:02Z</updated>
<author>
<name>Tracey Dent</name>
<email>tdent48227@gmail.com</email>
</author>
<published>2011-01-19T15:25:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a0700bdd0b0150ea445159b1dee587f1507c272f'/>
<id>urn:sha1:a0700bdd0b0150ea445159b1dee587f1507c272f</id>
<content type='text'>
Change Makefile to use &lt;modules&gt;-y instead of &lt;modules&gt;-objs because -objs
is deprecated and should now be switched.  According to
(documentation/kbuild/makefiles.txt).

Signed-off-by: Tracey Dent &lt;tdent48227@gmail.com&gt;
Cc: "Ed L. Cashin" &lt;ecashin@coraid.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
<entry>
<title>loop: queue_lock NULL pointer derefence in blk_throtl_exit</title>
<updated>2011-01-19T15:25:02Z</updated>
<author>
<name>Sergey Senozhatsky</name>
<email>sergey.senozhatsky@gmail.com</email>
</author>
<published>2011-01-19T15:25:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ee71a968672a9951aee6014c55511007596425bc'/>
<id>urn:sha1:ee71a968672a9951aee6014c55511007596425bc</id>
<content type='text'>
Performing
$ sudo mount -o loop -o umask=0 /dev/sdb1 /mnt/
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

$ sudo modprobe -r loop

results in oops:

 BUG: unable to handle kernel NULL pointer dereference at 0000000000000004
 IP: [&lt;ffffffff812479d4&gt;] do_raw_spin_lock+0x14/0x122
 Process modprobe (pid: 6189, threadinfo ffff88009a898000, task ffff880154a88000)
 Call Trace:
  [&lt;ffffffff81486788&gt;] _raw_spin_lock_irq+0x4a/0x51
  [&lt;ffffffff8123404b&gt;] ? blk_throtl_exit+0x3b/0xa0
  [&lt;ffffffff8105b120&gt;] ? cancel_delayed_work_sync+0xd/0xf
  [&lt;ffffffff8123404b&gt;] blk_throtl_exit+0x3b/0xa0
  [&lt;ffffffff81229bc8&gt;] blk_release_queue+0x21/0x65
  [&lt;ffffffff8123bb06&gt;] kobject_release+0x51/0x66
  [&lt;ffffffff8123bab5&gt;] ? kobject_release+0x0/0x66
  [&lt;ffffffff8123ce1e&gt;] kref_put+0x43/0x4d
  [&lt;ffffffff8123ba27&gt;] kobject_put+0x47/0x4b
  [&lt;ffffffff8122717c&gt;] blk_cleanup_queue+0x56/0x5b
  [&lt;ffffffffa01c3824&gt;] loop_exit+0x68/0x844 [loop]
  [&lt;ffffffff8107cccc&gt;] sys_delete_module+0x1e8/0x25b
  [&lt;ffffffff814864c9&gt;] ? trace_hardirqs_on_thunk+0x3a/0x3f
  [&lt;ffffffff81002112&gt;] system_call_fastpath+0x16/0x1b

because of an attempt to acquire NULL queue_lock.
I added the same lines as in blk_queue_make_request -
index 44e18c0..49e6a54 100644`fall back to embedded per-queue lock'.

Signed-off-by: Sergey Senozhatsky &lt;sergey.senozhatsky@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
<entry>
<title>drivers/block/Makefile: replace the use of &lt;module&gt;-objs with &lt;module&gt;-y</title>
<updated>2011-01-19T15:25:02Z</updated>
<author>
<name>Tracey Dent</name>
<email>tdent48227@gmail.com</email>
</author>
<published>2011-01-19T15:25:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=04de96c9c6981c5957aa5db39bbdc4d958d07efa'/>
<id>urn:sha1:04de96c9c6981c5957aa5db39bbdc4d958d07efa</id>
<content type='text'>
Change Makefile to use &lt;modules&gt;-y instead of &lt;modules&gt;-objs because -objs
is deprecated and should now be switched.  According to
(documentation/kbuild/makefiles.txt).

Signed-off-by: Tracey Dent &lt;tdent48227@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Jens Axboe &lt;jaxboe@fusionio.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-2.6.38/drivers' of git://git.kernel.dk/linux-2.6-block</title>
<updated>2011-01-13T18:50:24Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-01-13T18:50:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7b0cb1bdac9e941141e3790785955ed933d476f3'/>
<id>urn:sha1:7b0cb1bdac9e941141e3790785955ed933d476f3</id>
<content type='text'>
* 'for-2.6.38/drivers' of git://git.kernel.dk/linux-2.6-block:
  cciss: reinstate proper FIFO order of command queue list
  floppy: replace NO_GEOM macro with a function
</content>
</entry>
<entry>
<title>Merge branch 'for-2.6.38/core' of git://git.kernel.dk/linux-2.6-block</title>
<updated>2011-01-13T18:45:01Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-01-13T18:45:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=275220f0fcff1adf28a717076e00f575edf05fda'/>
<id>urn:sha1:275220f0fcff1adf28a717076e00f575edf05fda</id>
<content type='text'>
* 'for-2.6.38/core' of git://git.kernel.dk/linux-2.6-block: (43 commits)
  block: ensure that completion error gets properly traced
  blktrace: add missing probe argument to block_bio_complete
  block cfq: don't use atomic_t for cfq_group
  block cfq: don't use atomic_t for cfq_queue
  block: trace event block fix unassigned field
  block: add internal hd part table references
  block: fix accounting bug on cross partition merges
  kref: add kref_test_and_get
  bio-integrity: mark kintegrityd_wq highpri and CPU intensive
  block: make kblockd_workqueue smarter
  Revert "sd: implement sd_check_events()"
  block: Clean up exit_io_context() source code.
  Fix compile warnings due to missing removal of a 'ret' variable
  fs/block: type signature of major_to_index(int) to major_to_index(unsigned)
  block: convert !IS_ERR(p) &amp;&amp; p to !IS_ERR_NOR_NULL(p)
  cfq-iosched: don't check cfqg in choose_service_tree()
  fs/splice: Pull buf-&gt;ops-&gt;confirm() from splice_from_pipe actors
  cdrom: export cdrom_check_events()
  sd: implement sd_check_events()
  sr: implement sr_check_events()
  ...
</content>
</entry>
</feed>
