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

Ruslan Ermilov ru at FreeBSD.org
Mon Dec 13 03:33:12 PST 2004


On Sun, Dec 12, 2004 at 02:19:11PM +0000, Poul-Henning Kamp wrote:
> phk         2004-12-12 14:19:11 UTC
> 
>   FreeBSD src repository
> 
>   Modified files:
>     sys/ufs/ffs          ffs_vfsops.c 
>   Log:
>   With the introduction of UFS2 we started looking for superblocks in
>   four different locations on a prospective filesystem.
>   
>   If we found none, we forgot to invalidate the four buffers, thus the
>   following sequence would fails:
>   
>           (md0 = blank disk)
>           mount /dev/md0 /mnt
>           (fails, no superblocks)
>           newfs /dev/md0
>           (writes using physio which does not go through buffercache).
>           mount /dev/md0 /mnt
>           (still fails, the four cached buffers still contain no superblocks)
>   
>   Found by:       ru
>   
>   Revision  Changes    Path
>   1.263     +1 -0      src/sys/ufs/ffs/ffs_vfsops.c
> 
For some reason, this is only a problem on 6.0-CURRENT.  RELENG_5,
for example, doesn't exhibit this particular problem.

But originally, I had my issue with floppies, attempting to write
a newer BIOS on my amd64 box, I needed to create and fill an MS-DOS
formatted diskette.  Everything was done on i386.  First issue:

- boot with a blank (unformatted) diskette present in the drive
  (for testing purposes, "blank" == all zeroes)
- newfs_msdos it -- succeeds
- mount_msdosfs it -- fails

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.


Cheers,
-- 
Ruslan Ermilov
ru at FreeBSD.org
FreeBSD committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-all/attachments/20041213/8f2b5455/attachment.bin


More information about the cvs-all mailing list