#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 BLKROSET 4701 |
| #define BLOCK_SIZE 1024 |
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.
| #define MKDEV | ( | a, | |||
| b | ) | ((int)((((a) & 0xff) << 8) | ((b) & 0xff))) |
| #define MS_MGC_VAL 0xC0ED0000 |
| #define MS_RDONLY 1 |
| #define MS_RMT_MASK (MS_RDONLY) |
| #define NOTIFY_SIZE 1 |
| #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..
| #define SCSI_IOCTL_GET_IDLUN 0x5382 |
| #define SCSI_IOCTL_TAGGED_ENABLE 0x5383 |
| typedef char buffer_block[BLOCK_SIZE] |
| 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 | |||
| ) |
1.4.6-5