kernel-ark/drivers/md
NeilBrown 271f5a9b8f Remove invalidate_partition call from do_md_stop.
When stopping an md array, or just switching to read-only, we
currently call invalidate_partition while holding the mddev lock.
The main reason for this is probably to ensure all dirty buffers
are flushed (invalidate_partition calls fsync_bdev).

However if any dirty buffers are found, it will almost certainly cause
a deadlock as starting writeout will require an update to the
superblock, and performing that updates requires taking the mddev
lock - which is already held.

This deadlock can be demonstrated by running "reboot -f -n" with
a root filesystem on md/raid, and some dirty buffers in memory.

All other calls to stop an array should already happen after a flush.
The normal sequence is to stop using the array (e.g. umount) which
will cause __blkdev_put to call sync_blockdev.  Then open the
array and issue the STOP_ARRAY ioctl while the buffers are all still
clean.

So this invalidate_partition is normally a no-op, except for one case
where it will cause a deadlock.

So remove it.

This patch possibly addresses the regression recored in
   http://bugzilla.kernel.org/show_bug.cgi?id=11460
and
   http://bugzilla.kernel.org/show_bug.cgi?id=11452

though it isn't yet clear how it ever worked.


Signed-off-by: NeilBrown <neilb@suse.de>
2008-09-01 12:32:52 +10:00
..
raid6test
.gitignore
bitmap.c md: the bitmap code needs to use blk_plug_device_unlocked() 2008-08-01 20:32:31 +02:00
dm-bio-list.h
dm-bio-record.h
dm-crypt.c dm crypt: add merge 2008-07-21 12:00:40 +01:00
dm-delay.c
dm-exception-store.c
dm-io.c
dm-ioctl.c
dm-kcopyd.c
dm-linear.c dm: linear add merge 2008-07-21 12:00:38 +01:00
dm-log.c dm log: make dm_dirty_log init and exit static 2008-07-21 12:00:27 +01:00
dm-mpath.c [SCSI] scsi_dh: attach to hardware handler from dm-mpath 2008-07-26 15:14:53 -04:00
dm-mpath.h
dm-path-selector.c
dm-path-selector.h
dm-raid1.c
dm-round-robin.c
dm-snap.c dm snapshot: use per device mempools 2008-07-21 12:00:35 +01:00
dm-snap.h dm snapshot: use per device mempools 2008-07-21 12:00:35 +01:00
dm-stripe.c
dm-table.c [PATCH] switch mtd and dm-table to lookup_bdev() 2008-08-01 11:25:31 -04:00
dm-target.c
dm-uevent.c
dm-uevent.h
dm-zero.c
dm.c dm: introduce merge_bvec_fn 2008-07-21 12:00:37 +01:00
dm.h dm log: make dm_dirty_log init and exit static 2008-07-21 12:00:27 +01:00
faulty.c md: Make mddev->array_size sector-based. 2008-07-21 17:05:22 +10:00
Kconfig [SCSI] scsi_dh: fix kconfig related build errors 2008-07-15 09:16:43 -05:00
linear.c Merge branch 'for-linus' of git://neil.brown.name/md 2008-07-21 10:29:12 -07:00
Makefile
md.c Remove invalidate_partition call from do_md_stop. 2008-09-01 12:32:52 +10:00
mktables.c
multipath.c md: Make mddev->array_size sector-based. 2008-07-21 17:05:22 +10:00
raid0.c Merge branch 'for-linus' of git://neil.brown.name/md 2008-07-21 10:29:12 -07:00
raid1.c md: Make mddev->array_size sector-based. 2008-07-21 17:05:22 +10:00
raid5.c Don't let a blocked_rdev interfere with read request in raid5/6 2008-08-05 15:56:32 +10:00
raid6.h
raid6algos.c
raid6altivec.uc
raid6int.uc
raid6mmx.c
raid6recov.c
raid6sse1.c
raid6sse2.c
raid6x86.h
raid10.c Allow raid10 resync to happening in larger chunks. 2008-08-05 15:56:32 +10:00
unroll.pl