2.6.12 planetlab config file
[linux-2.6.git] / include / linux / msdos_fs_sb.h
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_HASH_BITS   8
30 #define FAT_HASH_SIZE   (1UL << FAT_HASH_BITS)
31 #define FAT_HASH_MASK   (FAT_HASH_SIZE-1)
32
33 struct msdos_sb_info {
34         unsigned short sec_per_clus; /* sectors/cluster */
35         unsigned short cluster_bits; /* log2(cluster_size) */
36         unsigned int cluster_size;   /* cluster size */
37         unsigned char fats,fat_bits; /* number of FATs, FAT bits (12 or 16) */
38         unsigned short fat_start;
39         unsigned long fat_length;    /* FAT start & length (sec.) */
40         unsigned long dir_start;
41         unsigned short dir_entries;  /* root dir start & entries */
42         unsigned long data_start;    /* first data sector */
43         unsigned long clusters;      /* number of clusters */
44         unsigned long root_cluster;  /* first cluster of the root directory */
45         unsigned long fsinfo_sector; /* sector number of FAT32 fsinfo */
46         struct semaphore fat_lock;
47         int prev_free;               /* previously allocated cluster number */
48         int free_clusters;           /* -1 if undefined */
49         struct fat_mount_options options;
50         struct nls_table *nls_disk;  /* Codepage used on disk */
51         struct nls_table *nls_io;    /* Charset used for input and display */
52         void *dir_ops;               /* Opaque; default directory operations */
53         int dir_per_block;           /* dir entries per block */
54         int dir_per_block_bits;      /* log2(dir_per_block) */
55
56         spinlock_t inode_hash_lock;
57         struct hlist_head inode_hashtable[FAT_HASH_SIZE];
58 };
59
60 #endif