From owner-freebsd-current Tue Feb 3 16:43:43 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA07895 for current-outgoing; Tue, 3 Feb 1998 16:43:43 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from flamingo.McKusick.COM (root@flamingo.mckusick.com [205.217.47.105]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA07887 for ; Tue, 3 Feb 1998 16:43:39 -0800 (PST) (envelope-from mckusick@flamingo.McKusick.COM) Received: from flamingo.McKusick.COM (mckusick@localhost [127.0.0.1]) by flamingo.McKusick.COM (8.8.5/8.8.5) with ESMTP id QAA09193; Tue, 3 Feb 1998 16:44:05 -0800 (PST) Message-Id: <199802040044.QAA09193@flamingo.McKusick.COM> To: Julian Elischer Subject: Re: sb being written to r/o disks. cc: current@FreeBSD.ORG In-reply-to: Your message of "Tue, 03 Feb 1998 16:30:41 PST." <34D7B6B0.31DFF4F5@whistle.com> Date: Tue, 03 Feb 1998 16:44:05 -0800 From: Kirk McKusick Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG X-To-Unsubscribe: mail to majordomo@FreeBSD.org "unsubscribe current" Sender: julian@whistle.com Date: Tue, 03 Feb 1998 16:30:41 -0800 From: Julian Elischer Organization: Whistle Communications To: mckusick@mckusick.com, current@freebsd.org Subject: sb being written to r/o disks. hmmmm it's amazing what new debugging info brings to light! I noticed this with the mount from the soft-updates integration. notice the two extra fields in 'mount'. # mount /dev/wd0e on / (local, read-only, writes: sync 4 async 0) /dev/wd0h on /data (local, softdep, writes: sync 2 async 0) /dev/wd0g on /var (local, writes: sync 2 async 0) procfs on /proc (local, writes: sync 0 async 0) something is doing syncronous writes to a r/o FS.. who? that's easy.. # mount -u -ordonly / Breakpoint at _mount: pushl %ebp db> b bwrite db> c Breakpoint at _bwrite: pushl %ebp db> tr _bwrite(f245ccf4,0) at _bwrite _ffs_sbupdate(f045f200,1) at _ffs_sbupdate+0xb0 _ffs_mount(f045fc00,efbfd268,efbfd1cc,f3666eb8,f364e740) at _ffs_mount+0x1e5 _mount(f364e740,f3666f94,0,efbfd268,1201) at _mount+0x416 _syscall(27,27,1201,efbfd268,efbfd238) at _syscall+0x187 _Xsyscall() at _Xsyscall+0x35 --- syscall 0x15, eip = 0x6a95, esp = 0xefbfd188, ebp = 0xefbfd238 --- db> apparently _ffs_sbupdate() doesn't know to check if the fs is readonly.. julian If you are doing a downgrade from r/w to r/o then the update is correct. If it is r/o to r/o then it is definitely a bug. ~Kirk