diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2001-01-10 17:17:53 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2001-01-10 17:17:53 +0000 |
commit | b2ad5f821b1381492d792ca10b1eb7a107b48f14 (patch) | |
tree | 954a648692e7da983db1d2470953705f6a729264 /include/linux/shmem_fs.h | |
parent | c9c06167e7933d93a6e396174c68abf242294abb (diff) |
Merge with Linux 2.4.0-prerelease. Big Makefile rewrite, test your
Makefiles.
Diffstat (limited to 'include/linux/shmem_fs.h')
-rw-r--r-- | include/linux/shmem_fs.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h new file mode 100644 index 000000000..3c61d5a01 --- /dev/null +++ b/include/linux/shmem_fs.h @@ -0,0 +1,37 @@ +#ifndef __SHMEM_FS_H +#define __SHMEM_FS_H + +/* inode in-kernel data */ + +#define SHMEM_NR_DIRECT 16 + +/* + * A swap entry has to fit into a "unsigned long", as + * the entry is hidden in the "index" field of the + * swapper address space. + * + * We have to move it here, since not every user of fs.h is including + * mm.h, but m.h is including fs.h via sched .h :-/ + */ +typedef struct { + unsigned long val; +} swp_entry_t; + +struct shmem_inode_info { + spinlock_t lock; + swp_entry_t i_direct[SHMEM_NR_DIRECT]; /* for the first blocks */ + swp_entry_t **i_indirect; /* doubly indirect blocks */ + unsigned long swapped; + int locked; /* into memory */ + struct list_head list; +}; + +struct shmem_sb_info { + unsigned long max_blocks; /* How many blocks are allowed */ + unsigned long free_blocks; /* How many are left for allocation */ + unsigned long max_inodes; /* How many inodes are allowed */ + unsigned long free_inodes; /* How many are left for allocation */ + spinlock_t stat_lock; +}; + +#endif |