From owner-freebsd-current@FreeBSD.ORG Sat Dec 11 23:03:05 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9D46516A4CE; Sat, 11 Dec 2004 23:03:05 +0000 (GMT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0021B43D5D; Sat, 11 Dec 2004 23:03:04 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.1/8.13.1) with ESMTP id iBBN316t000214; Sun, 12 Dec 2004 00:03:01 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Ruslan Ermilov From: "Poul-Henning Kamp" In-Reply-To: Your message of "Wed, 08 Dec 2004 22:05:53 +0200." <20041208200553.GB1340@ip.net.ua> Date: Sun, 12 Dec 2004 00:03:01 +0100 Message-ID: <213.1102806181@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: current@FreeBSD.org Subject: Re: mount oddities X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Dec 2004 23:03:05 -0000 That's actually interesting... This patch fixes it. For all I can see, the responsibility for purging the buffer cache rests with the filesystem implementation, and therefore I would expect the problem to have existed ever since UFS2 was introduced. Anyone with a 5.3 box who can check if this is also a problem there ? Poul-Henning Index: ufs/ffs/ffs_vfsops.c =================================================================== RCS file: /home/ncvs/src/sys/ufs/ffs/ffs_vfsops.c,v retrieving revision 1.262 diff -u -r1.262 ffs_vfsops.c --- ufs/ffs/ffs_vfsops.c 7 Dec 2004 15:09:30 -0000 1.262 +++ ufs/ffs/ffs_vfsops.c 11 Dec 2004 22:56:42 -0000 @@ -778,6 +778,7 @@ out: if (bp) brelse(bp); + vinvalbuf(devvp, V_SAVE, NOCRED, td, 0, 0); if (cp != NULL) { DROP_GIANT(); g_topology_lock(); In message <20041208200553.GB1340@ip.net.ua>, Ruslan Ermilov writes: > >--ftEhullJWpWg/VHq >Content-Type: text/plain; charset=us-ascii >Content-Disposition: inline >Content-Transfer-Encoding: quoted-printable > >Hi Poul-Henning, > >I first noticed this oddity with MS-DOS formatted floppies, >when no matter what floppy I insert into the drive later, >it's still treated as MS-DOS. > >I believe the testcase below is related to the problem I'm >seeing. > >dd if=3D/dev/zero of=3Dimage bs=3D1k count=3D1440 >mdconfig -a -t vnode -f image -u 0 >mount /dev/md0 /mnt >newfs /dev/md0 >mount /dev/md0 /mnt && umount /mnt >mdconfig -du0 >mdconfig -a -t vnode -f image -u 0 >mount /dev/md0 /mnt >umount /mnt >mdconfig -du0 > >The second "mount" command should succeed but it doesn't. >Note that if you remove the first "mount" command, the >second one succeeds. > > >Cheers, >--=20 >Ruslan Ermilov >ru@FreeBSD.org >FreeBSD committer > >--ftEhullJWpWg/VHq >Content-Type: application/pgp-signature >Content-Disposition: inline > >-----BEGIN PGP SIGNATURE----- >Version: GnuPG v1.2.6 (FreeBSD) > >iD8DBQFBt16gqRfpzJluFF4RAh8bAJ0cSjubWcK9lTAkCo03ZG4s/4LJ6gCgmXwA >aagYDX4qi4RAGiI2i21YCAQ= >=MzUk >-----END PGP SIGNATURE----- > >--ftEhullJWpWg/VHq-- > -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.