From owner-freebsd-stable Tue Mar 13 2: 7:16 2001 Delivered-To: freebsd-stable@freebsd.org Received: from peter3.wemm.org (c1315225-a.plstn1.sfba.home.com [65.0.135.147]) by hub.freebsd.org (Postfix) with ESMTP id 3FED537B718; Tue, 13 Mar 2001 02:07:10 -0800 (PST) (envelope-from peter@netplex.com.au) Received: from mobile.wemm.org (mobile.wemm.org [10.0.0.5]) by peter3.wemm.org (8.11.0/8.11.0) with ESMTP id f2DA79p39547; Tue, 13 Mar 2001 02:07:09 -0800 (PST) (envelope-from peter@netplex.com.au) Received: from netplex.com.au (localhost [127.0.0.1]) by mobile.wemm.org (8.11.1/8.11.1) with ESMTP id f2DA73h54023; Tue, 13 Mar 2001 02:07:07 -0800 (PST) (envelope-from peter@netplex.com.au) Message-Id: <200103131007.f2DA73h54023@mobile.wemm.org> X-Mailer: exmh version 2.2 06/23/2000 with nmh-1.0.4 To: Soren Schmidt 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 In-Reply-To: <200103130938.KAA95619@freebsd.dk> Content-Transfer-Encoding: 8bit Date: Tue, 13 Mar 2001 02:07:03 -0800 From: Peter Wemm Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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-stable" in the body of the message