NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/50601: sparc64 with root-on-raid0 does not reboot

The following reply was made to PR kern/50601; it has been noted by GNATS.

From: Martin Husemann <>
Subject: Re: kern/50601: sparc64 with root-on-raid0 does not reboot
Date: Wed, 30 Dec 2015 21:15:33 +0100

 The patch below fixes the issue for me. The first call to raid_detach
 fails with EBUSY, but does not unlock the raidset. The next call never
 is able to aquire the lock.
 With this change it reboots just fine, but interestingly I get a duplicate
 detach message from raid0:
 Done running shutdown hooks.
 Desyncing disks... done
 cd0: detached
 pcmcia1: detached
 audio0: detached
 raid0: Waiting for parity re-write to exit...
 raid0: Error re-writing parity (1)!
 raid0: detached
 raid0: detached
 sd2: detached
 sd1: detached
 scsibus0: detached
 cpu1: shutting down
 cpu0: rebooting
 Patch just as a proof of concept - we should probably deal with the
 unlocking in the relevant error paths in raid_detach_unlocked().
 Does anyone see what causes the duplicate detach messages?
 Index: rf_netbsdkintf.c
 RCS file: /cvsroot/src/sys/dev/raidframe/rf_netbsdkintf.c,v
 retrieving revision 1.330
 diff -u -r1.330 rf_netbsdkintf.c
 --- rf_netbsdkintf.c	26 Dec 2015 21:50:43 -0000	1.330
 +++ rf_netbsdkintf.c	30 Dec 2015 20:00:55 -0000
 @@ -3938,6 +3938,8 @@
  		return (error);
  	error = raid_detach_unlocked(rs);
 +	if (error)
 +		raidunlock(rs);
  	return error;

Home | Main Index | Thread Index | Old Index