MSDOS Filesystem question related to "read-only" files

Karl Denninger karl at denninger.net
Mon Nov 20 21:33:54 UTC 2017



On 11/20/2017 14:37, Bob Eager wrote:
> On Mon, 20 Nov 2017 14:22:15 -0600
> Karl Denninger <karl at denninger.net> wrote:
>
> > Oh, here's another interesting anomaly -- MSDOS filesystems return "0"
> > for the free file count!
>
> > (gdb) print fsbuf
> > $3 = {f_version = 537068824, f_type = 50, f_flags = 4096, f_bsize =
> > 4096, f_iosize = 4096, f_blocks = 1949442, f_bfree = 1949436,
> > f_bavail = 1949436,
> >   f_files = 0, f_ffree = 0, f_syncwrites = 3, f_asyncwrites = 5,
> >   f_syncreads = 1907, f_asyncreads = 0, f_spare = 0xbf3fd628,
> > f_namemax = 255,
> >   f_owner = 0, f_fsid = {val = 0xbf3fd680}, f_charspare = 0xbf3fd688
> > "", f_fstypename = 0xbf3fd6d8 "msdosfs",
> >   f_mntfromname = 0xbf3fd6e8 "/dev/da0s1", f_mntonname = 0xbf3fd740
> > "/mnt"}
>
> > Needless to say that can cause some interesting issues if you're
> > coding to avoid potential inode exhaustion and the target is a MSDOS
> > filesystem..... FAT filesystems DO have a maximum file count,
> > incidentally.
>
> But surely only in the root directory?

Uh, I pulled that on "." in the root directory (the mount point.)  Wrong
is wrong, 'yanno, although insanely large numbers of files on FAT
filesystems are bad news for performance reasons anyway.

-- 
Karl Denninger
karl at denninger.net <mailto:karl at denninger.net>
/The Market Ticker/
/[S/MIME encrypted email preferred]/


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4897 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20171120/945d5f1a/attachment.bin>


More information about the freebsd-fs mailing list