Subject: Re: accessing IDE hard drive via pcmcia card (redirected from netbsd-users)
To: Steven M. Bellovin <firstname.lastname@example.org>
From: Manuel Bouyer <email@example.com>
Date: 05/21/2004 22:36:54
On Fri, May 21, 2004 at 03:29:21PM -0400, Steven M. Bellovin wrote:
> In message <20040521192041.GA807@antioche.eu.org>, Manuel Bouyer writes:
> >On Sat, May 22, 2004 at 04:58:30AM +1000, Daniel Carosone wrote:
> >> [...]
> >> Another workaround, and interesting test, would be to turn off
> >> write-cache on the drive:
> >> dkctl wdX setcache r
> >> and then try the unmount. I'm hoping/assuming this would wait for the
> >> superblock write to complete. Could you try this? If it does, then
> >> building the moral equivalent of
> >> dkctl wdX synccache force
> >> into the close is the right way to fix this. It even seems to me like
> >> if we don't do this, there might be other similar lossage cases
> >> lurking than the pcmcia one you found.
> >There is already wd_flushcache() on last close in wd.c. This should be enouth.
> I assume that I still need to do the 'setcache r', correct?
Would be a good test. But this flush cache command should be enouth.
Maybe adding a printf here to make sure it's called on last close would
be usefull too.
Also please update to wd.c 1.276, I just added support for DIOCCACHESYNC.
Then you can try dkctl wdX synccache, and see if it complete without errors.
Manuel Bouyer <firstname.lastname@example.org>
NetBSD: 26 ans d'experience feront toujours la difference