aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/nodelist.h
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2006-05-22 19:38:06 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2006-05-22 19:38:06 -0400
commit9fe4854cd1f60273f9a3ece053f4789605f58a5e (patch)
tree277ac17807a1596f78464641500ed35f3d47a32a /fs/jffs2/nodelist.h
parent5fa433942ba4e399f7e28764c9db4ade89e91d40 (diff)
[JFFS2] Remove flash offset argument from various functions.
We don't need the upper layers to deal with the physical offset. It's _always_ c->nextblock->offset + c->sector_size - c->nextblock->free_size so we might as well just let the actual write functions deal with that. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'fs/jffs2/nodelist.h')
-rw-r--r--fs/jffs2/nodelist.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/fs/jffs2/nodelist.h b/fs/jffs2/nodelist.h
index 1e1c39da6da4..76f1b9419eea 100644
--- a/fs/jffs2/nodelist.h
+++ b/fs/jffs2/nodelist.h
@@ -167,6 +167,8 @@ struct jffs2_inode_cache {
167 167
168#define INOCACHE_HASHSIZE 128 168#define INOCACHE_HASHSIZE 128
169 169
170#define write_ofs(c) ((c)->nextblock->offset + (c)->sector_size - (c)->nextblock->free_size)
171
170/* 172/*
171 Larger representation of a raw node, kept in-core only when the 173 Larger representation of a raw node, kept in-core only when the
172 struct inode for this particular ino is instantiated. 174 struct inode for this particular ino is instantiated.
@@ -325,9 +327,9 @@ extern uint32_t __jffs2_ref_totlen(struct jffs2_sb_info *c,
325 327
326/* nodemgmt.c */ 328/* nodemgmt.c */
327int jffs2_thread_should_wake(struct jffs2_sb_info *c); 329int jffs2_thread_should_wake(struct jffs2_sb_info *c);
328int jffs2_reserve_space(struct jffs2_sb_info *c, uint32_t minsize, uint32_t *ofs, 330int jffs2_reserve_space(struct jffs2_sb_info *c, uint32_t minsize,
329 uint32_t *len, int prio, uint32_t sumsize); 331 uint32_t *len, int prio, uint32_t sumsize);
330int jffs2_reserve_space_gc(struct jffs2_sb_info *c, uint32_t minsize, uint32_t *ofs, 332int jffs2_reserve_space_gc(struct jffs2_sb_info *c, uint32_t minsize,
331 uint32_t *len, uint32_t sumsize); 333 uint32_t *len, uint32_t sumsize);
332int jffs2_add_physical_node_ref(struct jffs2_sb_info *c, 334int jffs2_add_physical_node_ref(struct jffs2_sb_info *c,
333 struct jffs2_raw_node_ref *new, 335 struct jffs2_raw_node_ref *new,
@@ -339,14 +341,21 @@ void jffs2_mark_node_obsolete(struct jffs2_sb_info *c, struct jffs2_raw_node_ref
339/* write.c */ 341/* write.c */
340int jffs2_do_new_inode(struct jffs2_sb_info *c, struct jffs2_inode_info *f, uint32_t mode, struct jffs2_raw_inode *ri); 342int jffs2_do_new_inode(struct jffs2_sb_info *c, struct jffs2_inode_info *f, uint32_t mode, struct jffs2_raw_inode *ri);
341 343
342struct jffs2_full_dnode *jffs2_write_dnode(struct jffs2_sb_info *c, struct jffs2_inode_info *f, struct jffs2_raw_inode *ri, const unsigned char *data, uint32_t datalen, uint32_t flash_ofs, int alloc_mode); 344struct jffs2_full_dnode *jffs2_write_dnode(struct jffs2_sb_info *c, struct jffs2_inode_info *f,
343struct jffs2_full_dirent *jffs2_write_dirent(struct jffs2_sb_info *c, struct jffs2_inode_info *f, struct jffs2_raw_dirent *rd, const unsigned char *name, uint32_t namelen, uint32_t flash_ofs, int alloc_mode); 345 struct jffs2_raw_inode *ri, const unsigned char *data,
346 uint32_t datalen, int alloc_mode);
347struct jffs2_full_dirent *jffs2_write_dirent(struct jffs2_sb_info *c, struct jffs2_inode_info *f,
348 struct jffs2_raw_dirent *rd, const unsigned char *name,
349 uint32_t namelen, int alloc_mode);
344int jffs2_write_inode_range(struct jffs2_sb_info *c, struct jffs2_inode_info *f, 350int jffs2_write_inode_range(struct jffs2_sb_info *c, struct jffs2_inode_info *f,
345 struct jffs2_raw_inode *ri, unsigned char *buf, 351 struct jffs2_raw_inode *ri, unsigned char *buf,
346 uint32_t offset, uint32_t writelen, uint32_t *retlen); 352 uint32_t offset, uint32_t writelen, uint32_t *retlen);
347int jffs2_do_create(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, struct jffs2_inode_info *f, struct jffs2_raw_inode *ri, const char *name, int namelen); 353int jffs2_do_create(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, struct jffs2_inode_info *f,
348int jffs2_do_unlink(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, const char *name, int namelen, struct jffs2_inode_info *dead_f, uint32_t time); 354 struct jffs2_raw_inode *ri, const char *name, int namelen);
349int jffs2_do_link (struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, uint32_t ino, uint8_t type, const char *name, int namelen, uint32_t time); 355int jffs2_do_unlink(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, const char *name,
356 int namelen, struct jffs2_inode_info *dead_f, uint32_t time);
357int jffs2_do_link(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, uint32_t ino,
358 uint8_t type, const char *name, int namelen, uint32_t time);
350 359
351 360
352/* readinode.c */ 361/* readinode.c */