aboutsummaryrefslogtreecommitdiffstats
path: root/fs/adfs/adfs.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/adfs/adfs.h')
-rw-r--r--fs/adfs/adfs.h59
1 files changed, 58 insertions, 1 deletions
diff --git a/fs/adfs/adfs.h b/fs/adfs/adfs.h
index e0a85dbeeb88..9cc18775b832 100644
--- a/fs/adfs/adfs.h
+++ b/fs/adfs/adfs.h
@@ -1,3 +1,6 @@
1#include <linux/fs.h>
2#include <linux/adfs_fs.h>
3
1/* Internal data structures for ADFS */ 4/* Internal data structures for ADFS */
2 5
3#define ADFS_FREE_FRAG 0 6#define ADFS_FREE_FRAG 0
@@ -17,6 +20,58 @@
17struct buffer_head; 20struct buffer_head;
18 21
19/* 22/*
23 * adfs file system inode data in memory
24 */
25struct adfs_inode_info {
26 loff_t mmu_private;
27 unsigned long parent_id; /* object id of parent */
28 __u32 loadaddr; /* RISC OS load address */
29 __u32 execaddr; /* RISC OS exec address */
30 unsigned int filetype; /* RISC OS file type */
31 unsigned int attr; /* RISC OS permissions */
32 unsigned int stamped:1; /* RISC OS file has date/time */
33 struct inode vfs_inode;
34};
35
36/*
37 * Forward-declare this
38 */
39struct adfs_discmap;
40struct adfs_dir_ops;
41
42/*
43 * ADFS file system superblock data in memory
44 */
45struct adfs_sb_info {
46 struct adfs_discmap *s_map; /* bh list containing map */
47 struct adfs_dir_ops *s_dir; /* directory operations */
48
49 uid_t s_uid; /* owner uid */
50 gid_t s_gid; /* owner gid */
51 umode_t s_owner_mask; /* ADFS owner perm -> unix perm */
52 umode_t s_other_mask; /* ADFS other perm -> unix perm */
53
54 __u32 s_ids_per_zone; /* max. no ids in one zone */
55 __u32 s_idlen; /* length of ID in map */
56 __u32 s_map_size; /* sector size of a map */
57 unsigned long s_size; /* total size (in blocks) of this fs */
58 signed int s_map2blk; /* shift left by this for map->sector */
59 unsigned int s_log2sharesize;/* log2 share size */
60 __le32 s_version; /* disc format version */
61 unsigned int s_namelen; /* maximum number of characters in name */
62};
63
64static inline struct adfs_sb_info *ADFS_SB(struct super_block *sb)
65{
66 return sb->s_fs_info;
67}
68
69static inline struct adfs_inode_info *ADFS_I(struct inode *inode)
70{
71 return container_of(inode, struct adfs_inode_info, vfs_inode);
72}
73
74/*
20 * Directory handling 75 * Directory handling
21 */ 76 */
22struct adfs_dir { 77struct adfs_dir {
@@ -53,6 +108,7 @@ struct adfs_dir_ops {
53 int (*update)(struct adfs_dir *dir, struct object_info *obj); 108 int (*update)(struct adfs_dir *dir, struct object_info *obj);
54 int (*create)(struct adfs_dir *dir, struct object_info *obj); 109 int (*create)(struct adfs_dir *dir, struct object_info *obj);
55 int (*remove)(struct adfs_dir *dir, struct object_info *obj); 110 int (*remove)(struct adfs_dir *dir, struct object_info *obj);
111 int (*sync)(struct adfs_dir *dir);
56 void (*free)(struct adfs_dir *dir); 112 void (*free)(struct adfs_dir *dir);
57}; 113};
58 114
@@ -90,7 +146,8 @@ extern const struct dentry_operations adfs_dentry_operations;
90extern struct adfs_dir_ops adfs_f_dir_ops; 146extern struct adfs_dir_ops adfs_f_dir_ops;
91extern struct adfs_dir_ops adfs_fplus_dir_ops; 147extern struct adfs_dir_ops adfs_fplus_dir_ops;
92 148
93extern int adfs_dir_update(struct super_block *sb, struct object_info *obj); 149extern int adfs_dir_update(struct super_block *sb, struct object_info *obj,
150 int wait);
94 151
95/* file.c */ 152/* file.c */
96extern const struct inode_operations adfs_file_inode_operations; 153extern const struct inode_operations adfs_file_inode_operations;