BELLINODE(4) — Silicon Graphics
NAME
bellinode − format of a Bell file system inode
SYNOPSIS
#include <sys/param.h>
#include <sys/inode.h>
DESCRIPTION
An inode under the Bell file system (formerly known as “the” UNIX System V file system) has the following structure.
/*
* Bell style file system inode as it appears on disk. The 40 bytes of
* addressing information is divided into 13 3-byte addresses. The Bell
* inode is 64 bytes long.
*/
structdinode {
ushortdi_mode;/* type and access permissions */
shortdi_nlink; /* number of links */
ushortdi_uid; /* owner’s user id number */
ushortdi_gid; /* group’s group id number */
off_tdi_size; /* number of bytes in file */
char di_addr[40];/* disk block addresses */
time_tdi_atime;/* time of last access (to contents) */
time_tdi_mtime;/* of last modification (of contents) */
time_tdi_ctime;/* of last modification to inode */
};
The types ushort, off_t, and time_t are defined in types(5).
di_mode contains the type of the file (plain file, directory, etc), and its read, write, and execute permissions for the file’s owner, group, and public. di_nlink contains the number of links to the inode. Correctly formed directories have a minimum of two links: a link in the directory’s parent and the ‘.’ link in the directory itself. Additional links may be caused by ‘..’ links from subdirectories. di_uid and di_gid contain the user id and group id of the file (used to determine which set of access permissions apply: owner, group, or public). di_size contains the length of the file in bytes.
di_atime is the time of last access to the file’s contents. di_mtime is the time of last modification of the file’s contents. di_ctime is the time of last modification of the inode, as opposed to the contents of the file it represents. These times are in given in seconds since the beginning of 1970 GMT.
di_addr[0 .. 38] is a packed array of 13 3-byte numbers. If the inode is not a block or character special inode, the first 10 are volume block addresses of the file’s first 10 data blocks. Next is the address of a single indirect block containing block addresses, followed by the address of a double indirect block containing addresses of single indirect blocks, followed by the address of a triple indirect block containing addresses of double indirect blocks. If 0 appears as a direct or indirect block address, the corresponding block is read by the system as all zeros.
If the inode is a block or character special inode, only the first number is used, as a number identifying the device.
FILES
/usr/include/sys/param.h
/usr/include/sys/types.h
/usr/include/sys/inode.h
/usr/include/sys/ino.h
/usr/include/sys/stat.h
SEE ALSO
stat(2), inode(4), fs(4), bellfs(4), types(5).
Version 2.4 — May 08, 1986