Ok. I didn't make 2.4.0 in 2000. Tough. I tried, but we had some
[davej-history.git] / include / linux / affs_fs.h
blob8a09cd72dd8ede3390127b10bcd4ac3fae320811
1 #ifndef _AFFS_FS_H
2 #define _AFFS_FS_H
3 /*
4 * The affs filesystem constants/structures
5 */
7 #include <linux/types.h>
9 #define AFFS_SUPER_MAGIC 0xadff
11 /* Get the filesystem block size given an inode. */
12 #define AFFS_I2BSIZE(inode) ((inode)->i_sb->s_blocksize)
14 /* Get the filesystem hash table size given an inode. */
15 #define AFFS_I2HSIZE(inode) ((inode)->i_sb->u.affs_sb.s_hashsize)
17 /* Get the block number bits given an inode */
18 #define AFFS_I2BITS(inode) ((inode)->i_sb->s_blocksize_bits)
20 /* Get the fs type given an inode */
21 #define AFFS_I2FSTYPE(inode) ((inode)->i_sb->u.affs_sb.s_flags & SF_INTL)
23 struct DateStamp
25 u32 ds_Days;
26 u32 ds_Minute;
27 u32 ds_Tick;
30 /* --- Prototypes ----------------------------------------------------------------------------- */
32 /* amigaffs.c */
34 extern int affs_get_key_entry(int bsize, void *data, int entry_pos);
35 extern int affs_get_file_name(int bsize, void *fh_data, unsigned char **name);
36 extern u32 affs_checksum_block(int bsize, void *data, s32 *ptype, s32 *stype);
37 extern void affs_fix_checksum(int bsize, void *data, int cspos);
38 extern void secs_to_datestamp(time_t secs, struct DateStamp *ds);
39 extern int prot_to_mode(unsigned int prot);
40 extern u32 mode_to_prot(int mode);
41 extern int affs_insert_hash(unsigned long dir_ino, struct buffer_head *header,
42 struct inode *inode);
43 extern int affs_remove_hash(struct buffer_head *bh, struct inode *inode);
44 extern int affs_remove_link(struct buffer_head *bh, struct inode *inode);
45 extern int affs_remove_header(struct buffer_head *bh, struct inode *inode);
46 extern void affs_error(struct super_block *sb, const char *function, const char *fmt, ...);
47 extern void affs_warning(struct super_block *sb, const char *function, const char *fmt, ...);
48 extern int affs_check_name(const unsigned char *name, int len);
49 extern int affs_copy_name(unsigned char *bstr, const unsigned char *name);
51 /* bitmap. c */
53 extern int affs_count_free_blocks(struct super_block *s);
54 extern int affs_count_free_bits(int blocksize, const char *data);
55 extern void affs_free_block(struct super_block *sb, s32 block);
56 extern s32 affs_new_header(struct inode *inode);
57 extern s32 affs_new_data(struct inode *inode);
58 extern void affs_make_zones(struct super_block *sb);
60 /* namei.c */
62 extern int affs_hash_name(const unsigned char *name, int len, int intl, int hashsize);
63 extern struct dentry *affs_lookup(struct inode *dir, struct dentry *dentry);
64 extern int affs_unlink(struct inode *dir, struct dentry *dentry);
65 extern int affs_create(struct inode *dir, struct dentry *dentry, int mode);
66 extern int affs_mkdir(struct inode *dir, struct dentry *dentry, int mode);
67 extern int affs_rmdir(struct inode *dir, struct dentry *dentry);
68 extern int affs_link(struct dentry *olddentry, struct inode *dir,
69 struct dentry *dentry);
70 extern int affs_symlink(struct inode *dir, struct dentry *dentry,
71 const char *symname);
72 extern int affs_rename(struct inode *old_dir, struct dentry *old_dentry,
73 struct inode *new_dir, struct dentry *new_dentry);
75 /* inode.c */
77 extern struct buffer_head *affs_bread(kdev_t dev, int block, int size);
78 extern void affs_brelse(struct buffer_head *buf);
79 extern unsigned long affs_parent_ino(struct inode *dir);
80 extern struct inode *affs_new_inode(const struct inode *dir);
81 extern int affs_notify_change(struct dentry *dentry, struct iattr *attr);
82 extern int affs_add_entry(struct inode *dir, struct inode *link,
83 struct inode *inode, struct dentry *dentry, s32 type);
84 extern void affs_put_inode(struct inode *inode);
85 extern void affs_delete_inode(struct inode *inode);
86 extern void affs_read_inode(struct inode *inode);
87 extern void affs_write_inode(struct inode *inode, int);
89 /* super.c */
91 extern int affs_fs(void);
93 /* file.c */
95 void affs_free_prealloc(struct inode *inode);
96 extern void affs_truncate(struct inode *);
98 /* dir.c */
100 extern void affs_dir_truncate(struct inode *);
102 /* jump tables */
104 extern struct inode_operations affs_file_inode_operations;
105 extern struct inode_operations affs_dir_inode_operations;
106 extern struct inode_operations affs_symlink_inode_operations;
107 extern struct file_operations affs_file_operations;
108 extern struct file_operations affs_file_operations_ofs;
109 extern struct file_operations affs_dir_operations;
110 extern struct address_space_operations affs_symlink_aops;
111 extern struct address_space_operations affs_aops;
113 extern struct dentry_operations affs_dentry_operations;
114 extern struct dentry_operations affs_dentry_operations_intl;
116 extern int affs_bmap(struct inode *, int);
117 #endif