The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/servers/fs/inode.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /* Inode table.  This table holds inodes that are currently in use.  In some
    2  * cases they have been opened by an open() or creat() system call, in other
    3  * cases the file system itself needs the inode for one reason or another,
    4  * such as to search a directory for a path name.
    5  * The first part of the struct holds fields that are present on the
    6  * disk; the second part holds fields not present on the disk.
    7  * The disk inode part is also declared in "type.h" as 'd1_inode' for V1
    8  * file systems and 'd2_inode' for V2 file systems.
    9  */
   10 
   11 EXTERN struct inode {
   12   mode_t i_mode;                /* file type, protection, etc. */
   13   nlink_t i_nlinks;             /* how many links to this file */
   14   uid_t i_uid;                  /* user id of the file's owner */
   15   gid_t i_gid;                  /* group number */
   16   off_t i_size;                 /* current file size in bytes */
   17   time_t i_atime;               /* time of last access (V2 only) */
   18   time_t i_mtime;               /* when was file data last changed */
   19   time_t i_ctime;               /* when was inode itself changed (V2 only)*/
   20   zone_t i_zone[V2_NR_TZONES]; /* zone numbers for direct, ind, and dbl ind */
   21   
   22   /* The following items are not present on the disk. */
   23   dev_t i_dev;                  /* which device is the inode on */
   24   ino_t i_num;                  /* inode number on its (minor) device */
   25   int i_count;                  /* # times inode used; 0 means slot is free */
   26   int i_ndzones;                /* # direct zones (Vx_NR_DZONES) */
   27   int i_nindirs;                /* # indirect zones per indirect block */
   28   struct super_block *i_sp;     /* pointer to super block for inode's device */
   29   char i_dirt;                  /* CLEAN or DIRTY */
   30   char i_pipe;                  /* set to I_PIPE if pipe */
   31   char i_mount;                 /* this bit is set if file mounted on */
   32   char i_seek;                  /* set on LSEEK, cleared on READ/WRITE */
   33   char i_update;                /* the ATIME, CTIME, and MTIME bits are here */
   34 } inode[NR_INODES];
   35 
   36 #define NIL_INODE (struct inode *) 0    /* indicates absence of inode slot */
   37 
   38 /* Field values.  Note that CLEAN and DIRTY are defined in "const.h" */
   39 #define NO_PIPE            0    /* i_pipe is NO_PIPE if inode is not a pipe */
   40 #define I_PIPE             1    /* i_pipe is I_PIPE if inode is a pipe */
   41 #define NO_MOUNT           0    /* i_mount is NO_MOUNT if file not mounted on*/
   42 #define I_MOUNT            1    /* i_mount is I_MOUNT if file mounted on */
   43 #define NO_SEEK            0    /* i_seek = NO_SEEK if last op was not SEEK */
   44 #define ISEEK              1    /* i_seek = ISEEK if last op was SEEK */

Cache object: 37120152fb4b595aa15fe5e636b251c1


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.