Whamcloud - gitweb
Updated parameters for obdfs_writepage() to use struct *dentry instead of
[fs/lustre-release.git] / lustre / include / linux / inofs.h
1 /* object based disk file system
2  * 
3  * This software is licensed under the GPL.  See the file COPYING in the
4  * top directory of this distribution for details.
5  * 
6  * Copyright (C), 1999, Stelias Computing Inc
7  *
8  *
9  */
10
11
12 #ifndef _INOFS_H
13 #define INOFS_H
14 #include <linux/obd_class.h>
15
16 /* super.c */
17 void inofs_read_inode(struct inode *inode);
18
19
20 /* file.c */
21 ssize_t inofs_file_write(struct file *file, const char *buf, size_t count, loff_t *ppos);
22
23
24 /* rw.c */
25 struct page *inofs_getpage(struct inode *inode, unsigned long offset, int create, int locked);
26 int inofs_writepage(struct file *file, struct page *page);
27 int inofs_write_one_page(struct file *file, struct page *page, unsigned long offset, unsigned long bytes, const char * buf);
28
29 /* namei.c */
30 struct dentry *inofs_lookup(struct inode * dir, struct dentry *dentry);
31 int inofs_create (struct inode * dir, struct dentry * dentry, int mode);
32 int inofs_mkdir(struct inode *dir, struct dentry *dentry, int mode);
33 int inofs_rmdir(struct inode *dir, struct dentry *dentry);
34 int inofs_unlink(struct inode *dir, struct dentry *dentry);
35 int inofs_mknod(struct inode *dir, struct dentry *dentry, int mode, int rdev);
36 int inofs_symlink(struct inode *dir, struct dentry *dentry, const char *symname);
37 int inofs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry);
38 int inofs_rename(struct inode *old_dir, struct dentry *old_dentry, struct inode *new_dir, struct dentry *new_dentry);
39 /* dir.c */
40 int inofs_readdir(struct file * filp, void * dirent, filldir_t filldir);
41 int inofs_check_dir_entry (const char * function, struct inode * dir,
42                           struct ext2_dir_entry_2 * de,
43                           struct page * page,
44                            unsigned long offset);
45
46 struct inofs_sb_info {
47         struct obd_conn_info osi_conn_info;
48         struct super_block *osi_super;
49         struct obd_device *osi_obd;
50         struct obd_ops *osi_ops;
51 };
52
53 void inofs_sysctl_init(void);
54 void inofs_sysctl_clean(void);
55
56 struct inofs_inode_info;
57
58 extern struct file_operations inofs_file_ops;
59 extern struct inode_operations inofs_inode_ops;
60
61 static inline struct obd_ops *iops(struct inode *i)
62 {
63         struct inofs_sb_info *sbi = (struct inofs_sb_info *) i->i_sb->u.generic_sbp;
64         return sbi->osi_ops;
65 }
66
67 #define NOLOCK 0
68 #define LOCKED 1
69
70
71 #define INOFS_SUPER_MAGIC 0x4711
72
73 #endif
74