Date: Sun, 12 Dec 2004 00:03:01 +0100 From: "Poul-Henning Kamp" <phk@phk.freebsd.dk> To: Ruslan Ermilov <ru@FreeBSD.org> Cc: current@FreeBSD.org Subject: Re: mount oddities Message-ID: <213.1102806181@critter.freebsd.dk> In-Reply-To: Your message of "Wed, 08 Dec 2004 22:05:53 %2B0200." <20041208200553.GB1340@ip.net.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?213.1102806181>