Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
422 | giacomo | 1 | #ifndef _MSDOS_FS_SB |
2 | #define _MSDOS_FS_SB |
||
3 | |||
4 | /* |
||
5 | * MS-DOS file system in-core superblock data |
||
6 | */ |
||
7 | |||
8 | struct fat_mount_options { |
||
9 | uid_t fs_uid; |
||
10 | gid_t fs_gid; |
||
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*/ |
||
27 | }; |
||
28 | |||
29 | #define FAT_CACHE_NR 8 /* number of FAT cache */ |
||
30 | |||
31 | struct 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 */ |
||
36 | }; |
||
37 | |||
38 | struct msdos_sb_info { |
||
39 | unsigned short sec_per_clus; /* sectors/cluster */ |
||
40 | unsigned short cluster_bits; /* log2(cluster_size) */ |
||
41 | unsigned int cluster_size; /* cluster size */ |
||
42 | unsigned char fats,fat_bits; /* number of FATs, FAT bits (12 or 16) */ |
||
43 | unsigned short fat_start; |
||
44 | unsigned long fat_length; /* FAT start & length (sec.) */ |
||
45 | unsigned long dir_start; |
||
46 | unsigned short dir_entries; /* root dir start & entries */ |
||
47 | unsigned long data_start; /* first data sector */ |
||
48 | unsigned long clusters; /* number of clusters */ |
||
49 | unsigned long root_cluster; /* first cluster of the root directory */ |
||
50 | unsigned long fsinfo_sector; /* FAT32 fsinfo offset from start of disk */ |
||
51 | struct semaphore fat_lock; |
||
52 | int prev_free; /* previously returned free cluster number */ |
||
53 | int free_clusters; /* -1 if undefined */ |
||
54 | struct fat_mount_options options; |
||
55 | struct nls_table *nls_disk; /* Codepage used on disk */ |
||
56 | struct nls_table *nls_io; /* Charset used for input and display */ |
||
57 | void *dir_ops; /* Opaque; default directory operations */ |
||
58 | int dir_per_block; /* dir entries per block */ |
||
59 | int dir_per_block_bits; /* log2(dir_per_block) */ |
||
60 | |||
61 | spinlock_t cache_lock; |
||
62 | struct fat_cache cache_array[FAT_CACHE_NR], *cache; |
||
63 | }; |
||
64 | |||
65 | #endif |