From owner-freebsd-current Fri Feb 9 11:25:14 2001 Delivered-To: freebsd-current@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 02FB337B698; Fri, 9 Feb 2001 11:24:55 -0800 (PST) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id GAA01229; Sat, 10 Feb 2001 06:24:43 +1100 Date: Sat, 10 Feb 2001 06:24:20 +1100 (EST) From: Bruce Evans X-Sender: bde@besplex.bde.org To: non@ever.sanda.gr.jp Cc: current@FreeBSD.ORG, trevor@jpj.net, akiyama@FreeBSD.ORG Subject: Re: od driver for -CURRENT In-Reply-To: <20010209211616W.non@ever.sanda.gr.jp> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 9 Feb 2001 non@ever.sanda.gr.jp wrote: > From: "Kenneth D. Merry" > Subject: Re: od driver for -CURRENT > > > By the way, in Japanese users mailing list, some said that `da' does > > > not check whether a medium is writerable or not (write > > > protected). If you mount a write protected medium with -rw, it will > > > lead bad condition when you do umount. > > > > Hmm, can you demonstrate the problem? The write-protect check in the od > > driver is one of the things that the da driver doesn't have. I figured it > > wouldn't really be necessary, since any attempted writes would be returned > > with errors. > > The problem is you cannot unmount after -rw mount with a write-protected > medium. This is essentially the same bug that causes problems for writing to write protected media or unwriteable blocks using the block device. There are many open PRs about this bug. It used to cause panics, but now it just causes endless retries (except under RELENG_3 where it still causes panics). The fix is to not retry endlessly. The correct number of retries is not clear. RELENG_2 has the slightly wrong fix of not retrying at all (in the vfs layer). Not retrying is probably right for most errors on physical blocks, but for write protect errors you might want to physically change the write protection so retrying (not too often) for a minute or two might be best. Anyway, there needs to be a way to stop the retries. I first saw this problem for a floppy driver that I wrote in 1984. It retried endlessly. Users did not like this :-). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message