diff options
author | tjr <tjr@FreeBSD.org> | 2004-07-03 13:22:38 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2004-07-03 13:22:38 +0000 |
commit | ab16560f3305829961b71dbe71233abcd50f0aba (patch) | |
tree | 651a802dbc4eb055206f7c5ccba7348f998b53bd /sys/conf | |
parent | 158b00dfc0a2916d3a3e23aa2bd11bd84d6c0841 (diff) | |
download | FreeBSD-src-ab16560f3305829961b71dbe71233abcd50f0aba.zip FreeBSD-src-ab16560f3305829961b71dbe71233abcd50f0aba.tar.gz |
By popular request, add a workaround that allows large (>128GB or so)
FAT32 filesystems to be mounted, subject to some fairly serious limitations.
This works by extending the internal pseudo-inode-numbers generated from
the file's starting cluster number to 64-bits, then creating a table
mapping these into arbitrary 32-bit inode numbers, which can fit in
struct dirent's d_fileno and struct vattr's va_fileid fields. The mappings
do not persist across unmounts or reboots, so it's not possible to export
these filesystems through NFS. The mapping table may grow to be rather
large, and may grow large enough to exhaust kernel memory on filesystems
with millions of files.
Don't enable this option unless you understand the consequences.
Diffstat (limited to 'sys/conf')
-rw-r--r-- | sys/conf/NOTES | 12 | ||||
-rw-r--r-- | sys/conf/files | 1 | ||||
-rw-r--r-- | sys/conf/options | 3 |
3 files changed, 16 insertions, 0 deletions
diff --git a/sys/conf/NOTES b/sys/conf/NOTES index f944152..fd1b42a 100644 --- a/sys/conf/NOTES +++ b/sys/conf/NOTES @@ -843,6 +843,18 @@ options MSDOSFS_ICONV options NTFS_ICONV options UDF_ICONV +# Experimental support for large MS-DOS filesystems. +# +# WARNING: This uses at least 32 bytes of kernel memory (which is not +# reclaimed until the FS is unmounted) for each file on disk to map +# between the 32-bit inode numbers used by VFS and the 64-bit pseudo-inode +# numbers used internally by msdosfs. This is only safe to use in certain +# controlled situations (e.g. read-only FS with less than 1 million files). +# Since the mappings do not persist across unmounts (or reboots), these +# filesystems are not suitable for exporting through NFS, or any other +# application that requires fixed inode numbers. +options MSDOSFS_LARGE + ##################################################################### # POSIX P1003.1B diff --git a/sys/conf/files b/sys/conf/files index a25b963..7237d64 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -880,6 +880,7 @@ fs/msdosfs/msdosfs_fat.c optional msdosfs fs/msdosfs/msdosfs_lookup.c optional msdosfs fs/msdosfs/msdosfs_vfsops.c optional msdosfs fs/msdosfs/msdosfs_vnops.c optional msdosfs +fs/msdosfs/msdosfs_fileno.c optional msdosfs_large fs/msdosfs/msdosfs_iconv.c optional msdosfs_iconv fs/ntfs/ntfs_compr.c optional ntfs fs/ntfs/ntfs_ihash.c optional ntfs diff --git a/sys/conf/options b/sys/conf/options index 2fb6582..b593318 100644 --- a/sys/conf/options +++ b/sys/conf/options @@ -219,6 +219,9 @@ NFS_ROOT opt_nfsroot.h NETSMB opt_netsmb.h NETSMBCRYPTO opt_netsmb.h +# Experimental support for large MS-DOS filesystems; SEE WARNING IN "NOTES"! +MSDOSFS_LARGE opt_msdosfs.h + # Options used only in subr_param.c. HZ opt_param.h MAXFILES opt_param.h |