Re: cvs commit: src/sys/ufs/ffs ffs_vfsops.c

From: Poul-Henning Kamp <phk_at_phk.freebsd.dk>
Date: Mon, 13 Dec 2004 14:06:26 +0100
In message <20041213113310.GB51149_at_ip.net.ua>, Ruslan Ermilov writes:

>Another issue:
>
>- boot without a diskette in the drive
>- insert a diskette #1 into the drive
>- newfs_msdos it
>- mount_msdosfs it
>- copy some files onto it
>- unmount it
>- insert another (possibly unformatted) diskette #2
>- mount_msdosfs it and find it somehow succeeds
>- list the contents of the diskette and find that it's identical
>  to the contents of diskette #1, including MD5 checksums of
>  all files
>
>This smells like a bufcache issue, but I may be wrong about it.

Sounds like the same thing.

Can you try this:

==== //depot/user/phk/phk_bufwork/sys/fs/msdosfs/msdosfs_vfsops.c#45 - /bang/p4/phk/phk_bufwork/sys/fs/msdosfs/msdosfs_vfsops.c ====
_at__at_ -719,6 +719,7 _at__at_
 error_exit:
        if (bp)
                brelse(bp);
+       vinvalbuf(devvp, V_SAVE, NOCRED, td, 0, 0);
        if (cp != NULL) {
                DROP_GIANT();
                g_topology_lock();

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk_at_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.
Received on Mon Dec 13 2004 - 13:06:28 UTC