5 * MS-DOS file system in-core superblock data
8 struct fat_mount_options
{
11 unsigned short fs_fmask
;
12 unsigned short fs_dmask
;
13 unsigned short codepage
; /* Codepage for shortname conversions */
14 char *iocharset
; /* Charset used for filename input/display */
15 unsigned short shortname
; /* flags for shortname display/create rule */
16 unsigned char name_check
; /* r = relaxed, n = normal, s = strict */
17 unsigned quiet
:1, /* set = fake successful chmods and chowns */
18 showexec
:1, /* set = only set x bit for com/exe/bat */
19 sys_immutable
:1, /* set = system files are immutable */
20 dotsOK
:1, /* set = hidden and system files are named '.filename' */
21 isvfat
:1, /* 0=no vfat long filename support, 1=vfat support */
22 utf8
:1, /* Use of UTF8 character set (Default) */
23 unicode_xlate
:1, /* create escape sequences for unhandled Unicode */
24 numtail
:1, /* Does first alias have a numeric '~1' type tail? */
25 atari
:1, /* Use Atari GEMDOS variation of MS-DOS fs */
26 nocase
:1; /* Does this need case conversion? 0=need case conversion*/
29 #define FAT_CACHE_NR 8 /* number of FAT cache */
32 int start_cluster
; /* first cluster of the chain. */
33 int file_cluster
; /* cluster number in the file. */
34 int disk_cluster
; /* cluster number on disk. */
35 struct fat_cache
*next
; /* next cache entry */
38 struct msdos_sb_info
{
39 unsigned short cluster_size
; /* sectors/cluster */
40 unsigned short cluster_bits
; /* sectors/cluster */
41 unsigned char fats
,fat_bits
; /* number of FATs, FAT bits (12 or 16) */
42 unsigned short fat_start
;
43 unsigned long fat_length
; /* FAT start & length (sec.) */
44 unsigned long dir_start
;
45 unsigned short dir_entries
; /* root dir start & entries */
46 unsigned long data_start
; /* first data sector */
47 unsigned long clusters
; /* number of clusters */
48 unsigned long root_cluster
; /* first cluster of the root directory */
49 unsigned long fsinfo_sector
; /* FAT32 fsinfo offset from start of disk */
50 struct semaphore fat_lock
;
51 int prev_free
; /* previously returned free cluster number */
52 int free_clusters
; /* -1 if undefined */
53 struct fat_mount_options options
;
54 struct nls_table
*nls_disk
; /* Codepage used on disk */
55 struct nls_table
*nls_io
; /* Charset used for input and display */
56 void *dir_ops
; /* Opaque; default directory operations */
57 int dir_per_block
; /* dir entries per block */
58 int dir_per_block_bits
; /* log2(dir_per_block) */
60 spinlock_t cache_lock
;
61 struct fat_cache cache_array
[FAT_CACHE_NR
], *cache
;