Lines Matching refs:c
23 static void jffs2_obsolete_node_frag(struct jffs2_sb_info *c,
26 void jffs2_add_fd_to_list(struct jffs2_sb_info *c, struct jffs2_full_dirent *new, struct jffs2_full… in jffs2_add_fd_to_list() argument
38 jffs2_mark_node_obsolete(c, new->raw); in jffs2_add_fd_to_list()
47 jffs2_mark_node_obsolete(c, ((*prev)->raw)); in jffs2_add_fd_to_list()
59 uint32_t jffs2_truncate_fragtree(struct jffs2_sb_info *c, struct rb_root *list, uint32_t size) in jffs2_truncate_fragtree() argument
76 jffs2_obsolete_node_frag(c, frag); in jffs2_truncate_fragtree()
101 static void jffs2_obsolete_node_frag(struct jffs2_sb_info *c, in jffs2_obsolete_node_frag() argument
110 jffs2_mark_node_obsolete(c, this->node->raw); in jffs2_obsolete_node_frag()
169 static int no_overlapping_node(struct jffs2_sb_info *c, struct rb_root *root, in no_overlapping_node() argument
215 static int jffs2_add_frag_to_fragtree(struct jffs2_sb_info *c, struct rb_root *root, struct jffs2_n… in jffs2_add_frag_to_fragtree() argument
246 return no_overlapping_node(c, root, newfrag, this, lastend); in jffs2_add_frag_to_fragtree()
321 jffs2_obsolete_node_frag(c, this); in jffs2_add_frag_to_fragtree()
339 jffs2_obsolete_node_frag(c, this); in jffs2_add_frag_to_fragtree()
363 int jffs2_add_full_dnode_to_inode(struct jffs2_sb_info *c, struct jffs2_inode_info *f, struct jffs2… in jffs2_add_full_dnode_to_inode() argument
379 ret = jffs2_add_frag_to_fragtree(c, &f->fragtree, newfrag); in jffs2_add_full_dnode_to_inode()
408 void jffs2_set_inocache_state(struct jffs2_sb_info *c, struct jffs2_inode_cache *ic, int state) in jffs2_set_inocache_state() argument
410 spin_lock(&c->inocache_lock); in jffs2_set_inocache_state()
412 wake_up(&c->inocache_wq); in jffs2_set_inocache_state()
413 spin_unlock(&c->inocache_lock); in jffs2_set_inocache_state()
421 struct jffs2_inode_cache *jffs2_get_ino_cache(struct jffs2_sb_info *c, uint32_t ino) in jffs2_get_ino_cache() argument
425 ret = c->inocache_list[ino % c->inocache_hashsize]; in jffs2_get_ino_cache()
436 void jffs2_add_ino_cache (struct jffs2_sb_info *c, struct jffs2_inode_cache *new) in jffs2_add_ino_cache() argument
440 spin_lock(&c->inocache_lock); in jffs2_add_ino_cache()
442 new->ino = ++c->highest_ino; in jffs2_add_ino_cache()
446 prev = &c->inocache_list[new->ino % c->inocache_hashsize]; in jffs2_add_ino_cache()
454 spin_unlock(&c->inocache_lock); in jffs2_add_ino_cache()
457 void jffs2_del_ino_cache(struct jffs2_sb_info *c, struct jffs2_inode_cache *old) in jffs2_del_ino_cache() argument
465 spin_lock(&c->inocache_lock); in jffs2_del_ino_cache()
467 prev = &c->inocache_list[old->ino % c->inocache_hashsize]; in jffs2_del_ino_cache()
484 spin_unlock(&c->inocache_lock); in jffs2_del_ino_cache()
487 void jffs2_free_ino_caches(struct jffs2_sb_info *c) in jffs2_free_ino_caches() argument
492 for (i=0; i < c->inocache_hashsize; i++) { in jffs2_free_ino_caches()
493 this = c->inocache_list[i]; in jffs2_free_ino_caches()
496 jffs2_xattr_free_inode(c, this); in jffs2_free_ino_caches()
500 c->inocache_list[i] = NULL; in jffs2_free_ino_caches()
504 void jffs2_free_raw_node_refs(struct jffs2_sb_info *c) in jffs2_free_raw_node_refs() argument
509 for (i=0; i<c->nr_blocks; i++) { in jffs2_free_raw_node_refs()
510 this = c->blocks[i].first_node; in jffs2_free_raw_node_refs()
520 c->blocks[i].first_node = c->blocks[i].last_node = NULL; in jffs2_free_raw_node_refs()
565 void jffs2_kill_fragtree(struct rb_root *root, struct jffs2_sb_info *c) in jffs2_kill_fragtree() argument
574 if (c) in jffs2_kill_fragtree()
575 jffs2_mark_node_obsolete(c, frag->node->raw); in jffs2_kill_fragtree()
585 struct jffs2_raw_node_ref *jffs2_link_node_ref(struct jffs2_sb_info *c, in jffs2_link_node_ref() argument
615 } else if (unlikely(ref_offset(ref) != jeb->offset + c->sector_size - jeb->free_size)) { in jffs2_link_node_ref()
616 uint32_t last_len = ref_totlen(c, jeb, jeb->last_node); in jffs2_link_node_ref()
635 c->unchecked_size += len; in jffs2_link_node_ref()
641 c->used_size += len; in jffs2_link_node_ref()
646 c->dirty_size += len; in jffs2_link_node_ref()
650 c->free_size -= len; in jffs2_link_node_ref()
656 ref_totlen(c, jeb, ref); in jffs2_link_node_ref()
662 int jffs2_scan_dirty_space(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb, in jffs2_scan_dirty_space() argument
677 c->dirty_size += size; in jffs2_scan_dirty_space()
678 c->free_size -= size; in jffs2_scan_dirty_space()
682 uint32_t ofs = jeb->offset + c->sector_size - jeb->free_size; in jffs2_scan_dirty_space()
685 jffs2_link_node_ref(c, jeb, ofs, size, NULL); in jffs2_scan_dirty_space()
692 static inline uint32_t __ref_totlen(struct jffs2_sb_info *c, in __ref_totlen() argument
703 jeb = &c->blocks[ref->flash_offset / c->sector_size]; in __ref_totlen()
713 ref_end = jeb->offset + c->sector_size - jeb->free_size; in __ref_totlen()
718 uint32_t __jffs2_ref_totlen(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb, in __jffs2_ref_totlen() argument
723 ret = __ref_totlen(c, jeb, ref); in __jffs2_ref_totlen()
728 jeb = &c->blocks[ref->flash_offset / c->sector_size]; in __jffs2_ref_totlen()
746 __jffs2_dbg_dump_node_refs_nolock(c, jeb); in __jffs2_ref_totlen()