On FreeBSD 11.0-CURRENT #1 r268601: Mon Jul 14 08:59:23 CEST 2014 pho@x4.osted.lan:/usr/src/sys/i386/compile/PHO i386 Create a large number of small files on a mdconfig -a -t swap -s 3g -u $mdstart bsdlabel -w md${mdstart} auto newfs_msdos -F 32 -b 8192 /dev/md${mdstart}a and delete them. Details @ http://people.freebsd.org/~pho/stress/log/msdos5.txt
over to maintainers.
I suppose this problem (panic: Freeing unused sector) might be caused by the same reason described in bug 213507. I.e. in directories with the large amount of files (directories which occupy more than one cluster) garbage-like directory entries could appear. Attempt to interpret such dentries (which are basically random data) could lead to unexpected results. Could you please try to reproduce this on CURRENT after base r333693? To reproduce this problem myself I tried to create several hundreds of directories with 500 to 1000 small files in each and removing them all at once. I repeated this procedure multiple times but was not able to trigger this on r333698.
I repeated the test on r333704 and did not find any problems.
This problem was resolved with revision: 333693. https://svnweb.freebsd.org/changeset/base/333693