From owner-freebsd-bugs Tue May 1 23:40: 5 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 7F70B37B440 for ; Tue, 1 May 2001 23:40:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f426e2A83823; Tue, 1 May 2001 23:40:02 -0700 (PDT) (envelope-from gnats) Date: Tue, 1 May 2001 23:40:02 -0700 (PDT) Message-Id: <200105020640.f426e2A83823@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Dima Dorfman Subject: Re: kern/25992: System hangs when read-only floppy has been mounted Reply-To: Dima Dorfman Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org The following reply was made to PR kern/25992; it has been noted by GNATS. From: Dima Dorfman To: Szilveszter Adam , achilov@granch.ru, freebsd-gnats-submit@freebsd.org Cc: Subject: Re: kern/25992: System hangs when read-only floppy has been mounted Date: Tue, 01 May 2001 23:30:55 -0700 Szilveszter Adam writes: > On Mon, Apr 30, 2001 at 05:51:45PM +0700, Rashid N. Achilov wrote: > > On Sunday 29 April 2001 09:26, dd@FreeBSD.ORG wrote: > > > Are you mounting the floppy in read-only mode? I.e., are you doing > > > `mount -r /dev/fd0 /mnt`? If you're not specifying the ``-r'', then > > > I'm not surprised (I guess it should panic, not hang, though). If you > > > are using ``-r'', then I can't reproduce this; I have a couple of > > > computers with read-only floppies in them (for tripwire). > > > > Hang or panic - which difference? One result - reboot :-( The difference is that a panic is a whole lot easier to diagnose than a hang. > Just as an aside. This problem has been with us forever. I can appreciate I'm not sure which problem you're referring to. I just tried inserting a read-only floppy and mounting it read-write. I got a bunch of write failure errors when I tried to unmount it. No panic, no reboot. Lots of junk in the logs. Seems like correct behavior to me. I said panic above because I thought it'd be more logical behavior than a hang; spitting out write errors is even better. > that the real UNIX gurus do not hurry to fix this one since they always > know what to type and don't use floppies much anyway. (Neither do I.) But > this does not mean that in this situation we should panic (or hang for that > matter) Panics are for the situations where something is seriously wrong so > much so, that we decide to give up instead of marching on and possibly > producing non-sense results. But trying writing to a ro floppy should > simply fail. Why is there an assumption that a floopy is always writeable > unless indicated by -r otherwise? Would we try to write to (and Becuase it is mounted read-write. It's fair to assume that if you requested that a filesystem be mounted read-write, it can be written to. UFS (FFS?) will try to flush all buffers and update the superblock(s) or something like that (I probably got the details wrong) when you umount a filesystem mounted as read-write. As I said above, this causes lots of errors. On my computer (-current a few days old), it doesn't panic or hang. Dima Dorfman dima@unixfreak.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message