fs.h File Reference

#include <linux/linkage.h>
#include <linux/limits.h>
#include <linux/wait.h>
#include <linux/types.h>
#include <linux/dirent.h>
#include <linux/vfs.h>
#include <linux/net.h>
#include <linux/pipe_fs_i.h>
#include <linux/minix_fs_i.h>
#include <linux/ext_fs_i.h>
#include <linux/ext2_fs_i.h>
#include <linux/hpfs_fs_i.h>
#include <linux/msdos_fs_i.h>
#include <linux/iso_fs_i.h>
#include <linux/nfs_fs_i.h>
#include <linux/xia_fs_i.h>
#include <linux/sysv_fs_i.h>
#include <linux/minix_fs_sb.h>
#include <linux/ext_fs_sb.h>
#include <linux/ext2_fs_sb.h>
#include <linux/hpfs_fs_sb.h>
#include <linux/msdos_fs_sb.h>
#include <linux/iso_fs_sb.h>
#include <linux/nfs_fs_sb.h>
#include <linux/xia_fs_sb.h>
#include <linux/sysv_fs_sb.h>

Go to the source code of this file.

Data Structures

struct  buffer_head
struct  inode
struct  file
struct  file_lock
struct  super_block
struct  file_operations
struct  inode_operations
struct  super_operations
struct  file_system_type

Defines

#define NR_OPEN   256
#define NR_INODE   2048
 this should be bigger than NR_FILE
#define NR_FILE   1024
 this can well be larger on a larger system
#define NR_SUPER   32
#define NR_HASH   997
#define NR_IHASH   131
#define NR_FILE_LOCKS   64
#define BLOCK_SIZE   1024
#define BLOCK_SIZE_BITS   10
#define MAY_EXEC   1
#define MAY_WRITE   2
#define MAY_READ   4
#define READ   0
#define WRITE   1
#define READA   2
 read-ahead - don't pause
#define WRITEA   3
 "write-ahead" - silly, but somewhat useful
#define MAJOR(a)   (int)((unsigned short)(a) >> 8)
#define MINOR(a)   (int)((unsigned short)(a) & 0xFF)
#define MKDEV(a, b)   ((int)((((a) & 0xff) << 8) | ((b) & 0xff)))
#define NIL_FILP   ((struct file *)0)
#define SEL_IN   1
#define SEL_OUT   2
#define SEL_EX   4
#define MS_RDONLY   1
 mount read-only
#define MS_NOSUID   2
 ignore suid and sgid bits
#define MS_NODEV   4
 disallow access to device special files
#define MS_NOEXEC   8
 disallow program execution
#define MS_SYNC   16
 writes are synced at once
#define MS_REMOUNT   32
 alter flags of a mounted FS
#define MS_RMT_MASK   (MS_RDONLY)
#define MS_MGC_VAL   0xC0ED0000
 magic flag number to indicate "new" flags
#define MS_MGC_MSK   0xffff0000
 magic flag number mask
#define IS_RDONLY(inode)   (((inode)->i_sb) && ((inode)->i_sb->s_flags & MS_RDONLY))
#define IS_NOSUID(inode)   ((inode)->i_flags & MS_NOSUID)
#define IS_NODEV(inode)   ((inode)->i_flags & MS_NODEV)
#define IS_NOEXEC(inode)   ((inode)->i_flags & MS_NOEXEC)
#define IS_SYNC(inode)   ((inode)->i_flags & MS_SYNC)
#define BLKROSET   4701
 set device read-only (0 = read-write)
#define BLKROGET   4702
 get read-only status (0 = read_write)
#define BLKRRPART   4703
 re-read partition table
#define BLKGETSIZE   4704
 return device size
#define BLKFLSBUF   4705
 flush buffer cache
#define SCSI_IOCTL_GET_IDLUN   0x5382
 These are a few other constants only used by scsi devices.
#define SCSI_IOCTL_TAGGED_ENABLE   0x5383
 Used to turn on and off tagged queueing for scsi devices.
#define SCSI_IOCTL_TAGGED_DISABLE   0x5384
#define BMAP_IOCTL   1
 obsolete - kept for compatibility
#define FIBMAP   1
 bmap access
#define FIGETBSZ   2
 get the block size used for bmap
#define NOTIFY_SIZE   1
 these flags tell notify_change what is being changed
#define NOTIFY_MODE   2
#define NOTIFY_TIME   4
#define NOTIFY_UIDGID   8

Typedefs

typedef char buffer_block [BLOCK_SIZE]

Functions

void buffer_init (void)
unsigned long inode_init (unsigned long start, unsigned long end)
unsigned long file_table_init (unsigned long start, unsigned long end)


Define Documentation

#define BLKFLSBUF   4705

flush buffer cache

Definition at line 133 of file fs.h.

#define BLKGETSIZE   4704

return device size

Definition at line 132 of file fs.h.

#define BLKROGET   4702

get read-only status (0 = read_write)

Definition at line 130 of file fs.h.

#define BLKROSET   4701

set device read-only (0 = read-write)

the read-only stuff doesn't really belong here, but any other place is

Definition at line 129 of file fs.h.

#define BLKRRPART   4703

re-read partition table

Definition at line 131 of file fs.h.

#define BLOCK_SIZE   1024

Definition at line 42 of file fs.h.

Referenced by sysv_bread().

#define BLOCK_SIZE_BITS   10

Definition at line 43 of file fs.h.

#define BMAP_IOCTL   1

obsolete - kept for compatibility

Definition at line 145 of file fs.h.

#define FIBMAP   1

bmap access

Definition at line 146 of file fs.h.

#define FIGETBSZ   2

get the block size used for bmap

Definition at line 147 of file fs.h.

#define IS_NODEV ( inode   )     ((inode)->i_flags & MS_NODEV)

Definition at line 118 of file fs.h.

#define IS_NOEXEC ( inode   )     ((inode)->i_flags & MS_NOEXEC)

Definition at line 119 of file fs.h.

#define IS_NOSUID ( inode   )     ((inode)->i_flags & MS_NOSUID)

Definition at line 117 of file fs.h.

#define IS_RDONLY ( inode   )     (((inode)->i_sb) && ((inode)->i_sb->s_flags & MS_RDONLY))

Note that read-only etc flags are inode-specific: setting some file-system flags just means all the inodes inherit those flags by default. It might be possible to overrride it sevelctively if you really wanted to with some ioctl() that is not currently implemented.

Exception: MS_RDONLY is always applied to the entire file system.

Definition at line 116 of file fs.h.

#define IS_SYNC ( inode   )     ((inode)->i_flags & MS_SYNC)

Definition at line 120 of file fs.h.

#define MAJOR (  )     (int)((unsigned short)(a) >> 8)

Definition at line 58 of file fs.h.

#define MAY_EXEC   1

Definition at line 45 of file fs.h.

#define MAY_READ   4

Definition at line 47 of file fs.h.

#define MAY_WRITE   2

Definition at line 46 of file fs.h.

#define MINOR (  )     (int)((unsigned short)(a) & 0xFF)

Definition at line 59 of file fs.h.

#define MKDEV ( a,
 )     ((int)((((a) & 0xff) << 8) | ((b) & 0xff)))

Definition at line 60 of file fs.h.

#define MS_MGC_MSK   0xffff0000

magic flag number mask

Definition at line 102 of file fs.h.

#define MS_MGC_VAL   0xC0ED0000

magic flag number to indicate "new" flags

Magic mount flag number. Has to be or-ed to the flag values.

Definition at line 101 of file fs.h.

#define MS_NODEV   4

disallow access to device special files

Definition at line 80 of file fs.h.

#define MS_NOEXEC   8

disallow program execution

Definition at line 81 of file fs.h.

#define MS_NOSUID   2

ignore suid and sgid bits

Definition at line 79 of file fs.h.

#define MS_RDONLY   1

mount read-only

These are the fs-independent mount-flags: up to 16 flags are supported

Definition at line 78 of file fs.h.

#define MS_REMOUNT   32

alter flags of a mounted FS

Definition at line 83 of file fs.h.

#define MS_RMT_MASK   (MS_RDONLY)

Flags that can be altered by MS_REMOUNT

Definition at line 92 of file fs.h.

#define MS_SYNC   16

writes are synced at once

Definition at line 82 of file fs.h.

#define NIL_FILP   ((struct file *)0)

Definition at line 66 of file fs.h.

#define NOTIFY_MODE   2

Definition at line 152 of file fs.h.

#define NOTIFY_SIZE   1

these flags tell notify_change what is being changed

Definition at line 151 of file fs.h.

#define NOTIFY_TIME   4

Definition at line 153 of file fs.h.

#define NOTIFY_UIDGID   8

Definition at line 154 of file fs.h.

#define NR_FILE   1024

this can well be larger on a larger system

Definition at line 37 of file fs.h.

#define NR_FILE_LOCKS   64

Definition at line 41 of file fs.h.

#define NR_HASH   997

Definition at line 39 of file fs.h.

#define NR_IHASH   131

Definition at line 40 of file fs.h.

#define NR_INODE   2048

this should be bigger than NR_FILE

Definition at line 36 of file fs.h.

#define NR_OPEN   256

It's silly to have NR_OPEN bigger than NR_FILE, but I'll fix that later. Anyway, now the file code is no longer dependent on bitmaps in unsigned longs, but uses the new fd_set structure..

Some programs (notably those using select()) may have to be recompiled to take full advantage of the new limits..

Definition at line 34 of file fs.h.

#define NR_SUPER   32

Definition at line 38 of file fs.h.

#define READ   0

Definition at line 49 of file fs.h.

#define READA   2

read-ahead - don't pause

Definition at line 51 of file fs.h.

#define SCSI_IOCTL_GET_IDLUN   0x5382

These are a few other constants only used by scsi devices.

Definition at line 137 of file fs.h.

#define SCSI_IOCTL_TAGGED_DISABLE   0x5384

Definition at line 142 of file fs.h.

#define SCSI_IOCTL_TAGGED_ENABLE   0x5383

Used to turn on and off tagged queueing for scsi devices.

Definition at line 141 of file fs.h.

#define SEL_EX   4

Definition at line 69 of file fs.h.

#define SEL_IN   1

Definition at line 67 of file fs.h.

#define SEL_OUT   2

Definition at line 68 of file fs.h.

#define WRITE   1

Definition at line 50 of file fs.h.

#define WRITEA   3

"write-ahead" - silly, but somewhat useful

Definition at line 52 of file fs.h.


Typedef Documentation

typedef char buffer_block[BLOCK_SIZE]

Definition at line 156 of file fs.h.


Function Documentation

void buffer_init ( void   ) 

unsigned long file_table_init ( unsigned long  start,
unsigned long  end 
)

unsigned long inode_init ( unsigned long  start,
unsigned long  end 
)


Generated on Mon May 1 21:47:00 2006 for KernelAPI by  doxygen 1.4.6-5