kern/85503: [panic] wrong dirclust using msdosfs in RELENG_6

Dmitry Pryanishnikov dmitry at atlantis.dp.ua
Tue Oct 4 12:03:45 PDT 2005


Hello!

On Wed, 7 Sep 2005, Tom Rhodes wrote:
> Responsible-Changed-By: trhodes
> Responsible-Changed-When: Wed Sep 7 14:34:30 GMT 2005
> Responsible-Changed-Why:
> Take and spearhead movement along branches.
>

  Maybe, it time to propagate this fix to RELENG_6? BTW, I've written
small regression test for this problem. It's available at

 	ftp://external.atlantis.dp.ua/FreeBSD/PR/85503/regression/

Script a.sh constructs FS image from 2 compressed parts: part1.bin.bz2
(FAT + root dir + 1st test directory) and part2.bin.bz2 (2nd test directory).
Just run this script, then mount_msdosfs resulting /dev/mdx device (R/O
access is sufficient), and do 'ls -R' against the mountpoint - RELENG_6
system will currently crash at this point.

P.S. It's difficult to generate this FS "on the fly". In order to do it
I made the following: created HDD slice with size of 4100 Mb, zeroed it,
made FAT32 FS with large (64k) cluster and single FAT copy to reduce
an amount of auxiliary data:

 	newfs_msdos -n 1 -c 128 /dev/adxsy

then created file 1.bin of size (4G-64k):

 	truncate -s 4294901760 1.bin

on another large FAT32 slice, then loaded Windows-98 and made from the command 
line (X: - destination drive, Y: - drive with the large file 1.bin):

 	MKDIR X:\1
 	COPY Y:1.BIN X:\1
 	MKDIR X:\2
 	COPY CON X:\2\2.BIN
 	^Z

I've used another OS since FreeBSD's msdosfs selects initial cluster randomly,
and mtools port is very buggy: I've 'mcopy''ed 3 * 1Gb files to fresh FS and
got totally broken FS as a result.

Sincerely, Dmitry
-- 
Atlantis ISP, System Administrator
e-mail:  dmitry at atlantis.dp.ua
nic-hdl: LYNX-RIPE


More information about the freebsd-bugs mailing list