pre-2.3.4..
[davej-history.git] / include / linux / umsdos_fs_i.h
blobe3af5e921e9d10ca29fb2c2bcc5bfb243f52ab12
1 #ifndef UMSDOS_FS_I_H
2 #define UMSDOS_FS_I_H
4 #ifndef _LINUX_TYPES_H
5 #include <linux/types.h>
6 #endif
8 #include <linux/msdos_fs_i.h>
9 #include <linux/pipe_fs_i.h>
11 /* #Specification: strategy / in memory inode
12 * Here is the information specific to the inode of the UMSDOS file
13 * system. This information is added to the end of the standard struct
14 * inode. Each file system has its own extension to struct inode,
15 * so do the umsdos file system.
17 * The strategy is to have the umsdos_inode_info as a superset of
18 * the msdos_inode_info, since most of the time the job is done
19 * by the msdos fs code.
21 * So we duplicate the msdos_inode_info, and add our own info at the
22 * end.
24 * For all file type (and directory) the inode has a reference to:
25 * the directory which hold this entry: i_dir_owner
26 * The EMD file of i_dir_owner: i_emd_owner
27 * The offset in this EMD file of the entry: pos
29 * For directory, we also have a reference to the inode of its
30 * own EMD file. Also, we have dir_locking_info to help synchronise
31 * file creation and file lookup. This data is sharing space with
32 * the pipe_inode_info not used by directory. See also msdos_fs_i.h
33 * for more information about pipe_inode_info and msdos_inode_info.
35 * Special file and fifo do have an inode which correspond to an
36 * empty MSDOS file.
38 * symlink are processed mostly like regular file. The content is the
39 * link.
41 * fifos add there own extension to the inode. I have reserved some
42 * space for fifos side by side with msdos_inode_info. This is just
43 * to for the show, because msdos_inode_info already include the
44 * pipe_inode_info.
46 * The UMSDOS specific extension is placed after the union.
49 struct dir_locking_info {
50 wait_queue_head_t p;
51 short int looking; /* How many process doing a lookup */
52 short int creating; /* Is there any creation going on here
53 * Only one at a time, although one
54 * may recursively lock, so it is a counter
56 long pid; /* pid of the process owning the creation */
57 /* lock */
60 struct umsdos_inode_info {
61 union {
62 struct msdos_inode_info msdos_info;
63 struct pipe_inode_info pipe_info;
64 struct dir_locking_info dir_info;
65 } u;
66 int i_patched; /* Inode has been patched */
67 int i_is_hlink; /* Resolved hardlink inode? */
68 unsigned long i_emd_owner; /* Is this the EMD file inode? */
69 off_t pos; /* Entry offset in the emd_owner file */
70 /* The rest is used only if this inode describes a directory */
71 struct dentry *i_emd_dentry; /* EMD dentry for this directory */
72 unsigned long i_emd_dir; /* Inode of the EMD file */
75 #endif