@@ -26,14 +26,13 @@ static inline u16 adfs_filetype(u32 loadaddr)
26
26
#define ADFS_NDA_PUBLIC_READ (1 << 5)
27
27
#define ADFS_NDA_PUBLIC_WRITE (1 << 6)
28
28
29
- #include "dir_f.h"
30
-
31
29
/*
32
30
* adfs file system inode data in memory
33
31
*/
34
32
struct adfs_inode_info {
35
33
loff_t mmu_private ;
36
34
__u32 parent_id ; /* parent indirect disc address */
35
+ __u32 indaddr ; /* object indirect disc address */
37
36
__u32 loadaddr ; /* RISC OS load address */
38
37
__u32 execaddr ; /* RISC OS exec address */
39
38
unsigned int attr ; /* RISC OS permissions */
@@ -93,15 +92,19 @@ struct adfs_dir {
93
92
94
93
int nr_buffers ;
95
94
struct buffer_head * bh [4 ];
96
-
97
- /* big directories need allocated buffers */
98
- struct buffer_head * * bh_fplus ;
95
+ struct buffer_head * * bhs ;
99
96
100
97
unsigned int pos ;
101
98
__u32 parent_id ;
102
99
103
- struct adfs_dirheader dirhead ;
104
- union adfs_dirtail dirtail ;
100
+ union {
101
+ struct adfs_dirheader * dirhead ;
102
+ struct adfs_bigdirheader * bighead ;
103
+ };
104
+ union {
105
+ struct adfs_newdirtail * newtail ;
106
+ struct adfs_bigdirtail * bigtail ;
107
+ };
105
108
};
106
109
107
110
/*
@@ -122,13 +125,13 @@ struct object_info {
122
125
struct adfs_dir_ops {
123
126
int (* read )(struct super_block * sb , unsigned int indaddr ,
124
127
unsigned int size , struct adfs_dir * dir );
128
+ int (* iterate )(struct adfs_dir * dir , struct dir_context * ctx );
125
129
int (* setpos )(struct adfs_dir * dir , unsigned int fpos );
126
130
int (* getnext )(struct adfs_dir * dir , struct object_info * obj );
127
131
int (* update )(struct adfs_dir * dir , struct object_info * obj );
128
132
int (* create )(struct adfs_dir * dir , struct object_info * obj );
129
133
int (* remove )(struct adfs_dir * dir , struct object_info * obj );
130
- int (* sync )(struct adfs_dir * dir );
131
- void (* free )(struct adfs_dir * dir );
134
+ int (* commit )(struct adfs_dir * dir );
132
135
};
133
136
134
137
struct adfs_discmap {
@@ -145,7 +148,9 @@ int adfs_notify_change(struct dentry *dentry, struct iattr *attr);
145
148
146
149
/* map.c */
147
150
int adfs_map_lookup (struct super_block * sb , u32 frag_id , unsigned int offset );
148
- extern unsigned int adfs_map_free (struct super_block * sb );
151
+ void adfs_map_statfs (struct super_block * sb , struct kstatfs * buf );
152
+ struct adfs_discmap * adfs_read_map (struct super_block * sb , struct adfs_discrecord * dr );
153
+ void adfs_free_map (struct super_block * sb );
149
154
150
155
/* Misc */
151
156
__printf (3 , 4 )
@@ -167,6 +172,13 @@ extern const struct dentry_operations adfs_dentry_operations;
167
172
extern const struct adfs_dir_ops adfs_f_dir_ops ;
168
173
extern const struct adfs_dir_ops adfs_fplus_dir_ops ;
169
174
175
+ int adfs_dir_copyfrom (void * dst , struct adfs_dir * dir , unsigned int offset ,
176
+ size_t len );
177
+ int adfs_dir_copyto (struct adfs_dir * dir , unsigned int offset , const void * src ,
178
+ size_t len );
179
+ void adfs_dir_relse (struct adfs_dir * dir );
180
+ int adfs_dir_read_buffers (struct super_block * sb , u32 indaddr ,
181
+ unsigned int size , struct adfs_dir * dir );
170
182
void adfs_object_fixup (struct adfs_dir * dir , struct object_info * obj );
171
183
extern int adfs_dir_update (struct super_block * sb , struct object_info * obj ,
172
184
int wait );
0 commit comments