Date: Tue, 13 Mar 2001 02:07:03 -0800 From: Peter Wemm <peter@netplex.com.au> To: Soren Schmidt <sos@freebsd.dk> Cc: bright@wintelcom.net (Alfred Perlstein), mwm@mired.org (Mike Meyer), Helge.Oldach@de.origin-it.com (Helge Oldach), oberman@es.net, mobile@FreeBSD.ORG, stable@FreeBSD.ORG Subject: Re: Disk I/O problem in 4.3-BETA Message-ID: <200103131007.f2DA73h54023@mobile.wemm.org> In-Reply-To: <200103130938.KAA95619@freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
Soren Schmidt wrote: > It seems Alfred Perlstein wrote: > > > > Having write caching on is like having the disk ignore _any_ > > filesystem's attempt to do softupdates/logging/delayed-order-writes > > because the disk _lies_ to the OS about when a write is safely on > > the disk. > > Hmm, I think the problem here is that the OS doesn't tell the > drivers WHEN it expects to have data written to disk, I can't > see why it should not be possible to have even softupdates > say "now before I write this I expect everything so far to > be on disk". Exactly. softupdates depends on the "block done, is on disk now!" notification in order to queue up the next set of dependencies. There is no B_ORDERED or anything. It just snoops the iodone calls. The disk driver has no way of knowing if the fs has something waiting on that given block or not. The alternative is to put B_ORDERED on *every* write from ffs/softdep, which would mean a cache flush after every operation on the ata driver. We cant even look to see if there are dependencies or not on a given block when it is initiated.. because while it is being sent to the drive, another operation can appear that depends on it. It was too late to set the ORDERED bit, so it may not get written to actual disk, and the disk will *LIE* about the completion of the write, and softupdates will queue up the next dependenent transfter, which might make it to disk before the first one that the drive *LIED* about. If your power goes out or the drive gets a hard reset in that window... boom! corrupt fs! hello backups! Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200103131007.f2DA73h54023>