summaryrefslogtreecommitdiff
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@burns.home.kernel.dk>2002-02-07 10:37:19 +0100
committerJens Axboe <axboe@burns.home.kernel.dk>2002-02-07 10:37:19 +0100
commit2adf779dd193e1c8673f5896da4fef1dda830774 (patch)
treef8014bbf33b023dd09bda6f9145bb776f73389d2 /include/linux/fs.h
parent07916eb45f4a6c63acb93e269c10490e4e623a0c (diff)
parent0ec120046dee44027a28b66a3c28d1031982a9eb (diff)
Merge http://linux.bkbits.net/linux-2.5
into burns.home.kernel.dk:/usr/local/kernel/BK/linux-2.5
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h56
1 files changed, 50 insertions, 6 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index cdfaac0cdc0e..8e3ce34f39da 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -91,7 +91,6 @@ extern int leases_enable, dir_notify_enable, lease_break_time;
#define FS_NO_PRELIM 4 /* prevent preloading of dentries, even if
* FS_NO_DCACHE is not set.
*/
-#define FS_SINGLE 8 /* Filesystem that can have only one superblock */
#define FS_NOMOUNT 16 /* Never mount from userland */
#define FS_LITTER 32 /* Keeps the tree in dcache */
#define FS_ODD_RENAME 32768 /* Temporary stuff; will go away as soon
@@ -208,6 +207,7 @@ extern void update_atime (struct inode *);
extern void buffer_init(unsigned long);
extern void inode_init(unsigned long);
extern void mnt_init(unsigned long);
+extern void files_init(unsigned long);
/* bh state bits */
enum bh_state_bits {
@@ -289,7 +289,6 @@ extern void set_bh_page(struct buffer_head *bh, struct page *page, unsigned long
#include <linux/pipe_fs_i.h>
/* #include <linux/umsdos_fs_i.h> */
#include <linux/romfs_fs_i.h>
-#include <linux/proc_fs_i.h>
#include <linux/cramfs_fs_sb.h>
/*
@@ -455,12 +454,25 @@ struct inode {
union {
/* struct umsdos_inode_info umsdos_i; */
struct romfs_inode_info romfs_i;
- struct proc_inode_info proc_i;
- struct socket socket_i;
void *generic_ip;
} u;
};
+struct socket_alloc {
+ struct socket socket;
+ struct inode vfs_inode;
+};
+
+static inline struct socket *SOCKET_I(struct inode *inode)
+{
+ return &list_entry(inode, struct socket_alloc, vfs_inode)->socket;
+}
+
+static inline struct inode *SOCK_INODE(struct socket *socket)
+{
+ return &list_entry(socket, struct socket_alloc, socket)->vfs_inode;
+}
+
#include <linux/shmem_fs.h>
/* will die */
#include <linux/coda_fs_i.h>
@@ -507,6 +519,14 @@ extern int init_private_file(struct file *, struct dentry *, int);
#define MAX_NON_LFS ((1UL<<31) - 1)
+/* Page cache limit. The filesystems should put that into their s_maxbytes
+ limits, otherwise bad things can happen in VM. */
+#if BITS_PER_LONG==32
+#define MAX_LFS_FILESIZE (((u64)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1)
+#elif BITS_PER_LONG==64
+#define MAX_LFS_FILESIZE 0x7fffffffffffffff
+#endif
+
#define FL_POSIX 1
#define FL_FLOCK 2
#define FL_BROKEN 4 /* broken flock() emulation */
@@ -914,15 +934,36 @@ struct dquot_operations {
int (*transfer) (struct inode *, struct iattr *);
};
+/*
+ * NOTE NOTE NOTE
+ *
+ * ->read_super() is going to die. New method (->get_sb) should replace
+ * it. The only reason why ->read_super() is left for _SHORT_ transition
+ * period is to avoid a single patch touching every fs. They will be
+ * converted one-by-one and ONCE THAT IS DONE OR TWO WEEKS HAD PASSED
+ * (whatever sooner) ->read_super() WILL DISAPPEAR.
+ */
+
struct file_system_type {
const char *name;
int fs_flags;
+ struct super_block *(*get_sb) (struct file_system_type *, int, char *, void *);
struct super_block *(*read_super) (struct super_block *, void *, int);
struct module *owner;
struct file_system_type * next;
struct list_head fs_supers;
};
+struct super_block *get_sb_bdev(struct file_system_type *fs_type,
+ int flags, char *dev_name, void * data,
+ int (*fill_super)(struct super_block *, void *, int));
+struct super_block *get_sb_single(struct file_system_type *fs_type,
+ int flags, void *data,
+ int (*fill_super)(struct super_block *, void *, int));
+struct super_block *get_sb_nodev(struct file_system_type *fs_type,
+ int flags, void *data,
+ int (*fill_super)(struct super_block *, void *, int));
+
#define DECLARE_FSTYPE(var,type,read,flags) \
struct file_system_type var = { \
name: type, \
@@ -1449,6 +1490,7 @@ extern ssize_t generic_file_write(struct file *, const char *, size_t, loff_t *)
extern void do_generic_file_read(struct file *, loff_t *, read_descriptor_t *, read_actor_t);
extern loff_t no_llseek(struct file *file, loff_t offset, int origin);
extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin);
+extern loff_t remote_llseek(struct file *file, loff_t offset, int origin);
extern ssize_t generic_read_dir(struct file *, char *, size_t, loff_t *);
extern int generic_file_open(struct inode * inode, struct file * filp);
@@ -1463,6 +1505,10 @@ extern struct inode_operations page_symlink_inode_operations;
extern int vfs_readdir(struct file *, filldir_t, void *);
extern int dcache_readdir(struct file *, void *, filldir_t);
+extern int vfs_stat(char *, struct kstat *);
+extern int vfs_lstat(char *, struct kstat *);
+extern int vfs_fstat(unsigned int, struct kstat *);
+
extern struct file_system_type *get_fs_type(const char *name);
extern struct super_block *get_super(kdev_t);
extern void drop_super(struct super_block *sb);
@@ -1475,8 +1521,6 @@ static inline int is_mounted(kdev_t dev)
}
return 0;
}
-unsigned long generate_cluster(kdev_t, int b[], int);
-unsigned long generate_cluster_swab32(kdev_t, int b[], int);
extern kdev_t ROOT_DEV;
extern char root_device_name[];