root/include/linux/umsdos_fs_i.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 #ifndef UMSDOS_FS_I_H
   2 #define UMSDOS_FS_I_H
   3 
   4 #ifndef _LINUX_TYPES_H
   5 #include <linux/types.h>
   6 #endif
   7 #include <linux/msdos_fs_i.h>
   8 #include <linux/pipe_fs_i.h>
   9 
  10 /* #Specification: strategy / in memory inode
  11         Here is the information specific to the inode of the UMSDOS file
  12         system. This information is added to the end of the standard struct
  13         inode. Each file system has its own extension to struct inode,
  14         so do the umsdos file system.
  15 
  16         The strategy is to have the umsdos_inode_info as a superset of
  17         the msdos_inode_info, since most of the time the job is done
  18         by the msdos fs code.
  19 
  20         So we duplicate the msdos_inode_info, and add our own info at the
  21         end.
  22 
  23         For all file type (and directory) the inode has a reference to:
  24                 the directory which hold this entry: i_dir_owner
  25                 The EMD file of i_dir_owner: i_emd_owner
  26                 The offset in this EMD file of the entry: pos
  27 
  28         For directory, we also have a reference to the inode of its
  29         own EMD file. Also, we have dir_locking_info to help synchronise
  30         file creation and file lookup. This data is sharing space with
  31         the pipe_inode_info not used by directory. See also msdos_fs_i.h
  32         for more information about pipe_inode_info and msdos_inode_info.
  33 
  34         Special file and fifo do have an inode which correspond to an
  35         empty MSDOS file.
  36 
  37         symlink are processed mostly like regular file. The content is the
  38         link.
  39 
  40         fifos add there own extension to the inode. I have reserved some
  41         space for fifos side by side with msdos_inode_info. This is just
  42         to for the show, because msdos_inode_info already include the
  43         pipe_inode_info.
  44 
  45         The UMSDOS specific extension is placed after the union.
  46 */
  47 struct dir_locking_info {
  48         struct wait_queue *p;
  49         short int looking;              /* How many process doing a lookup */
  50         short int creating;             /* Is there any creation going on here */
  51                                                         /* Only one at a time, although one */
  52                                                         /* may recursively lock, so it is a counter */
  53         long pid;                               /* pid of the process owning the creation */
  54                                                         /* lock */
  55 };
  56 struct umsdos_inode_info {
  57         union {
  58                 struct msdos_inode_info msdos_info;
  59                 struct pipe_inode_info pipe_info;
  60                 struct dir_locking_info dir_info;
  61         }u;     /* Simply a filler, never referenced by fs/umsdos/... */
  62         unsigned long i_dir_owner;      /* Inode of the dir which hold this */
  63                                                                 /* entry */
  64         unsigned long i_emd_owner;      /* Inode of the EMD file of i_dir_owner */
  65         off_t pos;                                      /* Entry offset in the emd_owner file */
  66         /* The rest is used only if this inode describe a directory */
  67         unsigned long i_emd_dir;        /* Inode of the EMD file of this inode */
  68 };
  69 
  70 #endif
  71 #ifndef UMSDOS_FS_I_H
  72 #define UMSDOS_FS_I_H
  73 
  74 #ifndef _LINUX_TYPES_H
  75 #include <linux/types.h>
  76 #endif
  77 #include <linux/msdos_fs_i.h>
  78 #include <linux/pipe_fs_i.h>
  79 
  80 /* #Specification: strategy / in memory inode
  81         Here is the information specific to the inode of the UMSDOS file
  82         system. This information is added to the end of the standard struct
  83         inode. Each file system has its own extension to struct inode,
  84         so do the umsdos file system.
  85 
  86         The strategy is to have the umsdos_inode_info as a superset of
  87         the msdos_inode_info, since most of the time the job is done
  88         by the msdos fs code.
  89 
  90         So we duplicate the msdos_inode_info, and add our own info at the
  91         end.
  92 
  93         For all file type (and directory) the inode has a reference to:
  94                 the directory which hold this entry: i_dir_owner
  95                 The EMD file of i_dir_owner: i_emd_owner
  96                 The offset in this EMD file of the entry: pos
  97 
  98         For directory, we also have a reference to the inode of its
  99         own EMD file. Also, we have dir_locking_info to help synchronise
 100         file creation and file lookup. This data is sharing space with
 101         the pipe_inode_info not used by directory. See also msdos_fs_i.h
 102         for more information about pipe_inode_info and msdos_inode_info.
 103 
 104         Special file and fifo do have an inode which correspond to an
 105         empty MSDOS file.
 106 
 107         symlink are processed mostly like regular file. The content is the
 108         link.
 109 
 110         fifos add there own extension to the inode. I have reserved some
 111         space for fifos side by side with msdos_inode_info. This is just
 112         to for the show, because msdos_inode_info already include the
 113         pipe_inode_info.
 114 
 115         The UMSDOS specific extension is placed after the union.
 116 */
 117 struct dir_locking_info {
 118         struct wait_queue *p;
 119         short int looking;              /* How many process doing a lookup */
 120         short int creating;             /* Is there any creation going on here */
 121                                                         /* Only one at a time, although one */
 122                                                         /* may recursively lock, so it is a counter */
 123         long pid;                               /* pid of the process owning the creation */
 124                                                         /* lock */
 125 };
 126 struct umsdos_inode_info {
 127         union {
 128                 struct msdos_inode_info msdos_info;
 129                 struct pipe_inode_info pipe_info;
 130                 struct dir_locking_info dir_info;
 131         }u;     /* Simply a filler, never referenced by fs/umsdos/... */
 132         unsigned long i_dir_owner;      /* Inode of the dir which hold this */
 133                                                                 /* entry */
 134         unsigned long i_emd_owner;      /* Inode of the EMD file of i_dir_owner */
 135         off_t pos;                                      /* Entry offset in the emd_owner file */
 136         /* The rest is used only if this inode describe a directory */
 137         unsigned long i_emd_dir;        /* Inode of the EMD file of this inode */
 138 };
 139 
 140 #endif

/* [previous][next][first][last][top][bottom][index][help] */