From owner-freebsd-hackers Sat Oct 19 21:37:33 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F2CF137B404; Sat, 19 Oct 2002 21:37:31 -0700 (PDT) Received: from HAL9000.homeunix.com (12-232-220-15.client.attbi.com [12.232.220.15]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3664843E7B; Sat, 19 Oct 2002 21:37:31 -0700 (PDT) (envelope-from dschultz@uclink.Berkeley.EDU) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.6/8.12.5) with ESMTP id g9K4b7jf024112; Sat, 19 Oct 2002 21:37:07 -0700 (PDT) (envelope-from dschultz@uclink.Berkeley.EDU) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.6/8.12.5/Submit) id g9K4b6mA024111; Sat, 19 Oct 2002 21:37:07 -0700 (PDT) (envelope-from dschultz@uclink.Berkeley.EDU) Date: Sat, 19 Oct 2002 21:37:06 -0700 From: David Schultz To: Poul-Henning Kamp Cc: Maxim Sobolev , hackers@FreeBSD.ORG, dillon@FreeBSD.ORG Subject: Re: Patch to allow a driver to report unrecoverable write errors to the buf layer Message-ID: <20021020043706.GA23972@HAL9000.homeunix.com> Mail-Followup-To: Poul-Henning Kamp , Maxim Sobolev , hackers@FreeBSD.ORG, dillon@FreeBSD.ORG References: <3DB048B5.21097613@FreeBSD.org> <28472.1035014051@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <28472.1035014051@critter.freebsd.dk> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Thus spake Poul-Henning Kamp : > >I noticed that FreeBSD buf/bio subsystem has one very annoying problem > >- once the write request is ejected into it, and write operation > >failed, there seemingly no way valid to tell the layer to drop the > >buffer. Instead, it retries the attempt over and over again, until > >reboot, even though originator of request (usually vfs layer) was > >already notified about failure and propagated error condition to the > >underlying user-lever program. > > Yes, I noticed that appeared at some time. That misfeature should be > removed in toto. > > If a retry can solve the issue, it's the drivers responsibility to > retry as much as makes sense and then fail if it doesn't work. > > Neither the buf nor the bio layer should get involved in those > retries. Yeah, I mentioned this problem back in April when I wrote a (still uncommitted) one-line patch to fix an infinite loop in the msdosfs code involving write failures. It seems like you absolutely have to be able to propagate failures up to higher layers in order to solve the retry problem. Otherwise, transient errors (e.g. removing and then reinserting a floppy disk) would cause filesystem corruption because the vnode layer would be unaware that some buffers had been dropped. How hard would it be to fix this? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message