Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Feb 2001 06:24:20 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        non@ever.sanda.gr.jp
Cc:        current@FreeBSD.ORG, trevor@jpj.net, akiyama@FreeBSD.ORG
Subject:   Re: od driver for -CURRENT
Message-ID:  <Pine.BSF.4.21.0102100603570.17078-100000@besplex.bde.org>
In-Reply-To: <20010209211616W.non@ever.sanda.gr.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 9 Feb 2001 non@ever.sanda.gr.jp wrote:

> From: "Kenneth D. Merry" <ken@kdm.org>
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0102100603570.17078-100000>