Bug 11460

Summary: 2.6.27-rc3 to -rc4 regression: init 0 hangs in halt
Product: IO/Storage Reporter: David Greaves (david)
Component: MDAssignee: drivers_other
Status: CLOSED CODE_FIX    
Severity: normal CC: neilb
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.27-rc5 Subsystem:
Regression: Yes Bisected commit-id:
Bug Depends on:    
Bug Blocks: 11167    

Description David Greaves 2008-08-30 04:07:55 UTC
Latest working kernel version:
2.6.27-rc3
Earliest failing kernel version:
2.6.27-rc4

Distribution:
Debian based

Hardware Environment:
Desktop machine root fs on /dev/md0

Software Environment:
boot to kdm splash. No login

Problem Description:
Hangs in halt.
netconsole stops after nfsd shutdown.
I've taken some photos and will upload/link later.

Steps to reproduce:
init 0 from multiuser (single user is OK)
Comment 1 Rafael J. Wysocki 2008-08-31 04:37:37 UTC
On Sunday, 31 of August 2008, David Greaves wrote:
> Rafael J. Wysocki wrote:
> > This message has been generated automatically as a part of a report
> > of recent regressions.
> > 
> > The following bug entry is on the current list of known regressions
> > from 2.6.26.  Please verify if it still should be listed and let me know
> > (either way).
> > 
> > 
> > Bug-Entry   : http://bugzilla.kernel.org/show_bug.cgi?id=11460
> > Subject             : 2.6.27-rc3 to -rc4 regression: init 0 hangs in halt
> > Submitter   : David Greaves <david@dgreaves.com>
> > Date                : 2008-08-30 04:07 (1 days old)
> 
> Yes.
> 
> I'm trying to bisect it but came across a bug/problem in git doing bisects.
> (see message subject "setlocalversion wasn't producing git labels for
> bisect")
Comment 2 David Greaves 2008-08-31 10:13:11 UTC
bisected to
 [2b25000bf5157c28d8591f03f0575248a8cbd900]
Restore force switch of md array to readonly at reboot time.
Comment 3 David Greaves 2008-09-01 02:25:52 UTC
Neil's patch fixes it for me when applied to 2.6.27-rc5

diff --git a/drivers/md/md.c b/drivers/md/md.c
index 8cfadc5..4790c83 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -3841,8 +3841,6 @@ static int do_md_stop(mddev_t * mddev, int mode, int is_open)
 
 		del_timer_sync(&mddev->safemode_timer);
 
-		invalidate_partition(disk, 0);
-
 		switch(mode) {
 		case 1: /* readonly */
 			err  = -ENXIO;