1#ifndef _AFFS_FS_H 2#define _AFFS_FS_H 3/* 4 * The affs filesystem constants/structures 5 */ 6 7#include <linux/types.h> 8 9#define AFFS_SUPER_MAGIC 0xadff 10 11struct affs_date; 12 13/* --- Prototypes ----------------------------------------------------------------------------- */ 14 15/* amigaffs.c */ 16 17extern int affs_insert_hash(struct inode *inode, struct buffer_head *bh); 18extern int affs_remove_hash(struct inode *dir, struct buffer_head *rem_bh); 19extern int affs_remove_header(struct dentry *dentry); 20extern u32 affs_checksum_block(struct super_block *sb, struct buffer_head *bh); 21extern void affs_fix_checksum(struct super_block *sb, struct buffer_head *bh); 22extern void secs_to_datestamp(time_t secs, struct affs_date *ds); 23extern mode_t prot_to_mode(u32 prot); 24extern void mode_to_prot(struct inode *inode); 25extern void affs_error(struct super_block *sb, const char *function, const char *fmt, ...); 26extern void affs_warning(struct super_block *sb, const char *function, const char *fmt, ...); 27extern int affs_check_name(const unsigned char *name, int len); 28extern int affs_copy_name(unsigned char *bstr, struct dentry *dentry); 29 30/* bitmap. c */ 31 32extern u32 affs_count_free_bits(u32 blocksize, const void *data); 33extern u32 affs_count_free_blocks(struct super_block *s); 34extern void affs_free_block(struct super_block *sb, u32 block); 35extern u32 affs_alloc_block(struct inode *inode, u32 goal); 36extern int affs_init_bitmap(struct super_block *sb); 37 38/* namei.c */ 39 40extern int affs_hash_name(struct super_block *sb, const u8 *name, unsigned int len); 41extern struct dentry *affs_lookup(struct inode *dir, struct dentry *dentry); 42extern int affs_unlink(struct inode *dir, struct dentry *dentry); 43extern int affs_create(struct inode *dir, struct dentry *dentry, int mode); 44extern int affs_mkdir(struct inode *dir, struct dentry *dentry, int mode); 45extern int affs_rmdir(struct inode *dir, struct dentry *dentry); 46extern int affs_link(struct dentry *olddentry, struct inode *dir, 47 struct dentry *dentry); 48extern int affs_symlink(struct inode *dir, struct dentry *dentry, 49 const char *symname); 50extern int affs_rename(struct inode *old_dir, struct dentry *old_dentry, 51 struct inode *new_dir, struct dentry *new_dentry); 52 53/* inode.c */ 54 55extern unsigned long affs_parent_ino(struct inode *dir); 56extern struct inode *affs_new_inode(struct inode *dir); 57extern int affs_notify_change(struct dentry *dentry, struct iattr *attr); 58extern void affs_put_inode(struct inode *inode); 59extern void affs_delete_inode(struct inode *inode); 60extern void affs_clear_inode(struct inode *inode); 61extern void affs_read_inode(struct inode *inode); 62extern void affs_write_inode(struct inode *inode, int); 63extern int affs_add_entry(struct inode *dir, struct inode *inode, struct dentry *dentry, s32 type); 64 65/* super.c */ 66 67extern int affs_fs(void); 68 69/* file.c */ 70 71void affs_free_prealloc(struct inode *inode); 72extern void affs_truncate(struct inode *); 73 74/* dir.c */ 75 76extern void affs_dir_truncate(struct inode *); 77 78/* jump tables */ 79 80extern struct inode_operations affs_file_inode_operations; 81extern struct inode_operations affs_dir_inode_operations; 82extern struct inode_operations affs_symlink_inode_operations; 83extern struct file_operations affs_file_operations; 84extern struct file_operations affs_file_operations_ofs; 85extern struct file_operations affs_dir_operations; 86extern struct address_space_operations affs_symlink_aops; 87extern struct address_space_operations affs_aops; 88extern struct address_space_operations affs_aops_ofs; 89 90extern struct dentry_operations affs_dentry_operations; 91extern struct dentry_operations affs_dentry_operations_intl; 92 93#endif 94