Lines Matching refs:inum
45 static struct ubifs_orphan *orphan_add(struct ubifs_info *c, ino_t inum, in orphan_add() argument
54 orphan->inum = inum; in orphan_add()
68 if (inum < o->inum) in orphan_add()
70 else if (inum > o->inum) in orphan_add()
92 dbg_gen("ino %lu", (unsigned long)inum); in orphan_add()
96 static struct ubifs_orphan *lookup_orphan(struct ubifs_info *c, ino_t inum) in lookup_orphan() argument
104 if (inum < o->inum) in lookup_orphan()
106 else if (inum > o->inum) in lookup_orphan()
132 dbg_gen("deleted twice ino %lu", (unsigned long)orph->inum); in orphan_delete()
140 dbg_gen("delete later ino %lu", (unsigned long)orph->inum); in orphan_delete()
155 int ubifs_add_orphan(struct ubifs_info *c, ino_t inum) in ubifs_add_orphan() argument
165 orphan = orphan_add(c, inum, NULL); in ubifs_add_orphan()
169 lowest_xent_key(c, &key, inum); in ubifs_add_orphan()
182 xattr_inum = le64_to_cpu(xent->inum); in ubifs_add_orphan()
207 void ubifs_delete_orphan(struct ubifs_info *c, ino_t inum) in ubifs_delete_orphan() argument
213 orph = lookup_orphan(c, inum); in ubifs_delete_orphan()
216 ubifs_err(c, "missing orphan ino %lu", (unsigned long)inum); in ubifs_delete_orphan()
376 orph->inos[i] = cpu_to_le64(orphan->inum); in write_orph_node()
524 dbg_gen("deleting orphan ino %lu", (unsigned long)orphan->inum); in erase_deleted()
582 static int insert_dead_orphan(struct ubifs_info *c, ino_t inum) in insert_dead_orphan() argument
590 orphan->inum = inum; in insert_dead_orphan()
596 if (inum < o->inum) in insert_dead_orphan()
598 else if (inum > o->inum) in insert_dead_orphan()
613 dbg_mnt("ino %lu, new %d, tot %d", (unsigned long)inum, in insert_dead_orphan()
638 ino_t inum; in do_kill_orphans() local
696 inum = le64_to_cpu(orph->inos[i]); in do_kill_orphans()
698 ino_key_init(c, &key1, inum); in do_kill_orphans()
709 (unsigned long)inum); in do_kill_orphans()
711 lowest_ino_key(c, &key1, inum); in do_kill_orphans()
712 highest_ino_key(c, &key2, inum); in do_kill_orphans()
719 err = insert_dead_orphan(c, inum); in do_kill_orphans()
842 ino_t inum; member
854 static bool dbg_find_orphan(struct ubifs_info *c, ino_t inum) in dbg_find_orphan() argument
859 found = !!lookup_orphan(c, inum); in dbg_find_orphan()
865 static int dbg_ins_check_orphan(struct rb_root *root, ino_t inum) in dbg_ins_check_orphan() argument
873 orphan->inum = inum; in dbg_ins_check_orphan()
879 if (inum < o->inum) in dbg_ins_check_orphan()
881 else if (inum > o->inum) in dbg_ins_check_orphan()
893 static int dbg_find_check_orphan(struct rb_root *root, ino_t inum) in dbg_find_check_orphan() argument
901 if (inum < o->inum) in dbg_find_check_orphan()
903 else if (inum > o->inum) in dbg_find_check_orphan()
923 ino_t inum; in dbg_orphan_check() local
926 inum = key_inum(c, &zbr->key); in dbg_orphan_check()
927 if (inum != ci->last_ino) { in dbg_orphan_check()
931 (unsigned long)inum, key_type(c, &zbr->key)); in dbg_orphan_check()
932 ci->last_ino = inum; in dbg_orphan_check()
941 if (!dbg_find_check_orphan(&ci->root, inum) && in dbg_orphan_check()
942 !dbg_find_orphan(c, inum)) { in dbg_orphan_check()
944 (unsigned long)inum); in dbg_orphan_check()
956 ino_t inum; in dbg_read_orphans() local
966 inum = le64_to_cpu(orph->inos[i]); in dbg_read_orphans()
967 err = dbg_ins_check_orphan(&ci->root, inum); in dbg_read_orphans()