Home
last modified time | relevance | path

Searched refs:ri (Results 1 – 25 of 31) sorted by relevance

12

/fs/jffs2/
Dread.c27 struct jffs2_raw_inode *ri; in jffs2_read_dnode() local
34 ri = jffs2_alloc_raw_inode(); in jffs2_read_dnode()
35 if (!ri) in jffs2_read_dnode()
38 ret = jffs2_flash_read(c, ref_offset(fd->raw), sizeof(*ri), &readlen, (char *)ri); in jffs2_read_dnode()
40 jffs2_free_raw_inode(ri); in jffs2_read_dnode()
45 if (readlen != sizeof(*ri)) { in jffs2_read_dnode()
46 jffs2_free_raw_inode(ri); in jffs2_read_dnode()
48 ref_offset(fd->raw), sizeof(*ri), readlen); in jffs2_read_dnode()
51 crc = crc32(0, ri, sizeof(*ri)-8); in jffs2_read_dnode()
54 ref_offset(fd->raw), je32_to_cpu(ri->node_crc), in jffs2_read_dnode()
[all …]
Dwrite.c24 uint32_t mode, struct jffs2_raw_inode *ri) in jffs2_do_new_inode() argument
42 ri->ino = cpu_to_je32(f->inocache->ino); in jffs2_do_new_inode()
44 ri->magic = cpu_to_je16(JFFS2_MAGIC_BITMASK); in jffs2_do_new_inode()
45 ri->nodetype = cpu_to_je16(JFFS2_NODETYPE_INODE); in jffs2_do_new_inode()
46 ri->totlen = cpu_to_je32(PAD(sizeof(*ri))); in jffs2_do_new_inode()
47 ri->hdr_crc = cpu_to_je32(crc32(0, ri, sizeof(struct jffs2_unknown_node)-4)); in jffs2_do_new_inode()
48 ri->mode = cpu_to_jemode(mode); in jffs2_do_new_inode()
51 ri->version = cpu_to_je32(f->highest_version); in jffs2_do_new_inode()
60 struct jffs2_raw_inode *ri, const unsigned char *data, in jffs2_write_dnode() argument
72 D1(if(je32_to_cpu(ri->hdr_crc) != crc32(0, ri, sizeof(struct jffs2_unknown_node)-4)) { in jffs2_write_dnode()
[all …]
Dfile.c147 struct jffs2_raw_inode ri; in jffs2_write_begin() local
154 ret = jffs2_reserve_space(c, sizeof(ri), &alloc_len, in jffs2_write_begin()
160 memset(&ri, 0, sizeof(ri)); in jffs2_write_begin()
162 ri.magic = cpu_to_je16(JFFS2_MAGIC_BITMASK); in jffs2_write_begin()
163 ri.nodetype = cpu_to_je16(JFFS2_NODETYPE_INODE); in jffs2_write_begin()
164 ri.totlen = cpu_to_je32(sizeof(ri)); in jffs2_write_begin()
165 ri.hdr_crc = cpu_to_je32(crc32(0, &ri, sizeof(struct jffs2_unknown_node)-4)); in jffs2_write_begin()
167 ri.ino = cpu_to_je32(f->inocache->ino); in jffs2_write_begin()
168 ri.version = cpu_to_je32(++f->highest_version); in jffs2_write_begin()
169 ri.mode = cpu_to_jemode(inode->i_mode); in jffs2_write_begin()
[all …]
Dgc.c762 struct jffs2_raw_inode ri; in jffs2_garbage_collect_metadata() local
796 ret = jffs2_reserve_space_gc(c, sizeof(ri) + mdatalen, &alloclen, in jffs2_garbage_collect_metadata()
800 sizeof(ri) + mdatalen, ret); in jffs2_garbage_collect_metadata()
812 memset(&ri, 0, sizeof(ri)); in jffs2_garbage_collect_metadata()
813 ri.magic = cpu_to_je16(JFFS2_MAGIC_BITMASK); in jffs2_garbage_collect_metadata()
814 ri.nodetype = cpu_to_je16(JFFS2_NODETYPE_INODE); in jffs2_garbage_collect_metadata()
815 ri.totlen = cpu_to_je32(sizeof(ri) + mdatalen); in jffs2_garbage_collect_metadata()
816 ri.hdr_crc = cpu_to_je32(crc32(0, &ri, sizeof(struct jffs2_unknown_node)-4)); in jffs2_garbage_collect_metadata()
818 ri.ino = cpu_to_je32(f->inocache->ino); in jffs2_garbage_collect_metadata()
819 ri.version = cpu_to_je32(++f->highest_version); in jffs2_garbage_collect_metadata()
[all …]
Dfs.c37 struct jffs2_raw_inode *ri; in jffs2_do_setattr() local
78 ri = jffs2_alloc_raw_inode(); in jffs2_do_setattr()
79 if (!ri) { in jffs2_do_setattr()
85 ret = jffs2_reserve_space(c, sizeof(*ri) + mdatalen, &alloclen, in jffs2_do_setattr()
88 jffs2_free_raw_inode(ri); in jffs2_do_setattr()
96 ri->magic = cpu_to_je16(JFFS2_MAGIC_BITMASK); in jffs2_do_setattr()
97 ri->nodetype = cpu_to_je16(JFFS2_NODETYPE_INODE); in jffs2_do_setattr()
98 ri->totlen = cpu_to_je32(sizeof(*ri) + mdatalen); in jffs2_do_setattr()
99 ri->hdr_crc = cpu_to_je32(crc32(0, ri, sizeof(struct jffs2_unknown_node)-4)); in jffs2_do_setattr()
101 ri->ino = cpu_to_je32(inode->i_ino); in jffs2_do_setattr()
[all …]
Ddir.c163 struct jffs2_raw_inode *ri; in jffs2_create() local
169 ri = jffs2_alloc_raw_inode(); in jffs2_create()
170 if (!ri) in jffs2_create()
177 inode = jffs2_new_inode(dir_i, mode, ri); in jffs2_create()
181 jffs2_free_raw_inode(ri); in jffs2_create()
200 ret = jffs2_do_create(c, dir_f, f, ri, &dentry->d_name); in jffs2_create()
204 dir_i->i_mtime = dir_i->i_ctime = ITIME(je32_to_cpu(ri->ctime)); in jffs2_create()
206 jffs2_free_raw_inode(ri); in jffs2_create()
217 jffs2_free_raw_inode(ri); in jffs2_create()
284 struct jffs2_raw_inode *ri; in jffs2_symlink() local
[all …]
Dscan.c47 struct jffs2_raw_inode *ri, uint32_t ofs, struct jffs2_summary *s);
992 struct jffs2_raw_inode *ri, uint32_t ofs, struct jffs2_summary *s) in jffs2_scan_inode_node() argument
995 uint32_t crc, ino = je32_to_cpu(ri->ino); in jffs2_scan_inode_node()
1009 crc = crc32(0, ri, sizeof(*ri)-8); in jffs2_scan_inode_node()
1010 if (crc != je32_to_cpu(ri->node_crc)) { in jffs2_scan_inode_node()
1012 __func__, ofs, je32_to_cpu(ri->node_crc), crc); in jffs2_scan_inode_node()
1018 PAD(je32_to_cpu(ri->totlen))); in jffs2_scan_inode_node()
1029 jffs2_link_node_ref(c, jeb, ofs | REF_UNCHECKED, PAD(je32_to_cpu(ri->totlen)), ic); in jffs2_scan_inode_node()
1032 je32_to_cpu(ri->ino), je32_to_cpu(ri->version), in jffs2_scan_inode_node()
1033 je32_to_cpu(ri->offset), in jffs2_scan_inode_node()
[all …]
Dnodelist.h396 …de(struct jffs2_sb_info *c, struct jffs2_inode_info *f, uint32_t mode, struct jffs2_raw_inode *ri);
399 struct jffs2_raw_inode *ri, const unsigned char *data,
405 struct jffs2_raw_inode *ri, unsigned char *buf,
408 struct jffs2_raw_inode *ri, const struct qstr *qstr);
Dsummary.c115 int jffs2_sum_add_inode_mem(struct jffs2_summary *s, struct jffs2_raw_inode *ri, in jffs2_sum_add_inode_mem() argument
123 temp->nodetype = ri->nodetype; in jffs2_sum_add_inode_mem()
124 temp->inode = ri->ino; in jffs2_sum_add_inode_mem()
125 temp->version = ri->version; in jffs2_sum_add_inode_mem()
127 temp->totlen = ri->totlen; in jffs2_sum_add_inode_mem()
/fs/f2fs/
Dinode.c62 static void __get_inode_rdev(struct inode *inode, struct f2fs_inode *ri) in __get_inode_rdev() argument
68 if (ri->i_addr[extra_size]) in __get_inode_rdev()
70 le32_to_cpu(ri->i_addr[extra_size])); in __get_inode_rdev()
73 le32_to_cpu(ri->i_addr[extra_size + 1])); in __get_inode_rdev()
78 struct f2fs_inode *ri) in __written_first_block() argument
80 block_t addr = le32_to_cpu(ri->i_addr[offset_in_addr(ri)]); in __written_first_block()
89 static void __set_inode_rdev(struct inode *inode, struct f2fs_inode *ri) in __set_inode_rdev() argument
95 ri->i_addr[extra_size] = in __set_inode_rdev()
97 ri->i_addr[extra_size + 1] = 0; in __set_inode_rdev()
99 ri->i_addr[extra_size] = 0; in __set_inode_rdev()
[all …]
Dinline.c296 struct f2fs_inode *ri = NULL; in f2fs_recover_inline_data() local
309 ri = F2FS_INODE(npage); in f2fs_recover_inline_data()
312 ri && (ri->i_inline & F2FS_INLINE_DATA)) { in f2fs_recover_inline_data()
340 } else if (ri && (ri->i_inline & F2FS_INLINE_DATA)) { in f2fs_recover_inline_data()
Df2fs.h3038 static inline void get_inline_info(struct inode *inode, struct f2fs_inode *ri) in get_inline_info() argument
3042 if (ri->i_inline & F2FS_INLINE_XATTR) in get_inline_info()
3044 if (ri->i_inline & F2FS_INLINE_DATA) in get_inline_info()
3046 if (ri->i_inline & F2FS_INLINE_DENTRY) in get_inline_info()
3048 if (ri->i_inline & F2FS_DATA_EXIST) in get_inline_info()
3050 if (ri->i_inline & F2FS_INLINE_DOTS) in get_inline_info()
3052 if (ri->i_inline & F2FS_EXTRA_ATTR) in get_inline_info()
3054 if (ri->i_inline & F2FS_PIN_FILE) in get_inline_info()
3056 if (ri->i_inline & F2FS_COMPRESS_RELEASED) in get_inline_info()
3060 static inline void set_raw_inline(struct inode *inode, struct f2fs_inode *ri) in set_raw_inline() argument
[all …]
Ddir.c498 struct f2fs_inode *ri; in init_dent_inode() local
506 ri = F2FS_INODE(ipage); in init_dent_inode()
507 ri->i_namelen = cpu_to_le32(fname->disk_name.len); in init_dent_inode()
508 memcpy(ri->i_name, fname->disk_name.name, fname->disk_name.len); in init_dent_inode()
522 &ri->i_name[fname->disk_name.len]); in init_dent_inode()
Dnode.c1033 struct f2fs_inode *ri, int *offset, int depth) in truncate_partial_nodes() argument
1042 nid[0] = le32_to_cpu(ri->i_nid[offset[0] - NODE_DIR1_BLOCK]); in truncate_partial_nodes()
1103 struct f2fs_inode *ri; in f2fs_truncate_inode_blocks() local
1124 ri = F2FS_INODE(page); in f2fs_truncate_inode_blocks()
1134 err = truncate_partial_nodes(&dn, ri, offset, level); in f2fs_truncate_inode_blocks()
1143 err = truncate_partial_nodes(&dn, ri, offset, level); in f2fs_truncate_inode_blocks()
1153 dn.nid = le32_to_cpu(ri->i_nid[offset[0] - NODE_DIR1_BLOCK]); in f2fs_truncate_inode_blocks()
1176 ri->i_nid[offset[0] - NODE_DIR1_BLOCK]) { in f2fs_truncate_inode_blocks()
1180 ri->i_nid[offset[0] - NODE_DIR1_BLOCK] = 0; in f2fs_truncate_inode_blocks()
2659 struct f2fs_inode *ri; in f2fs_recover_inline_xattr() local
[all …]
/fs/nilfs2/
Drecovery.c417 struct nilfs_recovery_info *ri) in nilfs_prepare_segment_for_recovery() argument
419 struct list_head *head = &ri->ri_used_segments; in nilfs_prepare_segment_for_recovery()
428 segnum[2] = ri->ri_segnum; in nilfs_prepare_segment_for_recovery()
429 segnum[3] = ri->ri_nextnum; in nilfs_prepare_segment_for_recovery()
465 nilfs->ns_seg_seq = ri->ri_seq + 2; in nilfs_prepare_segment_for_recovery()
571 struct nilfs_recovery_info *ri) in nilfs_do_roll_forward() argument
590 pseg_start = ri->ri_lsegs_start; in nilfs_do_roll_forward()
591 seg_seq = ri->ri_lsegs_start_seq; in nilfs_do_roll_forward()
595 while (segnum != ri->ri_segnum || pseg_start <= ri->ri_pseg_start) { in nilfs_do_roll_forward()
651 if (pseg_start == ri->ri_lsegs_end) in nilfs_do_roll_forward()
[all …]
Dthe_nilfs.c150 static void nilfs_init_recovery_info(struct nilfs_recovery_info *ri) in nilfs_init_recovery_info() argument
152 memset(ri, 0, sizeof(*ri)); in nilfs_init_recovery_info()
153 INIT_LIST_HEAD(&ri->ri_used_segments); in nilfs_init_recovery_info()
156 static void nilfs_clear_recovery_info(struct nilfs_recovery_info *ri) in nilfs_clear_recovery_info() argument
158 nilfs_dispose_segment_list(&ri->ri_used_segments); in nilfs_clear_recovery_info()
234 struct nilfs_recovery_info ri; in load_nilfs() local
250 nilfs_init_recovery_info(&ri); in load_nilfs()
252 err = nilfs_search_super_root(nilfs, &ri); in load_nilfs()
296 err = nilfs_search_super_root(nilfs, &ri); in load_nilfs()
301 err = nilfs_load_super_root(nilfs, sb, ri.ri_super_root); in load_nilfs()
[all …]
Dsegment.h246 struct nilfs_recovery_info *ri);
/fs/dlm/
Ddebug_fs.c382 struct rsbtbl_iter *ri = iter_ptr; in table_seq_show() local
384 switch (ri->format) { in table_seq_show()
386 print_format1(ri->rsb, seq); in table_seq_show()
389 if (ri->header) { in table_seq_show()
391 ri->header = 0; in table_seq_show()
393 print_format2(ri->rsb, seq); in table_seq_show()
396 if (ri->header) { in table_seq_show()
398 ri->header = 0; in table_seq_show()
400 print_format3(ri->rsb, seq); in table_seq_show()
403 if (ri->header) { in table_seq_show()
[all …]
/fs/romfs/
Dsuper.c154 struct romfs_inode ri; in romfs_readdir() local
165 ret = romfs_dev_read(i->i_sb, offset, &ri, ROMFH_SIZE); in romfs_readdir()
168 offset = be32_to_cpu(ri.spec) & ROMFH_MASK; in romfs_readdir()
181 ret = romfs_dev_read(i->i_sb, offset, &ri, ROMFH_SIZE); in romfs_readdir()
196 nextfh = be32_to_cpu(ri.next); in romfs_readdir()
198 ino = be32_to_cpu(ri.spec); in romfs_readdir()
217 struct romfs_inode ri; in romfs_lookup() local
222 ret = romfs_dev_read(dir->i_sb, offset, &ri, ROMFH_SIZE); in romfs_lookup()
229 offset = be32_to_cpu(ri.spec) & ROMFH_MASK; in romfs_lookup()
238 ret = romfs_dev_read(dir->i_sb, offset, &ri, sizeof(ri)); in romfs_lookup()
[all …]
/fs/xfs/scrub/
Drepair.c675 struct xrep_findroot *ri, in xrep_findroot_block() argument
681 struct xfs_mount *mp = ri->sc->mp; in xrep_findroot_block()
688 daddr = XFS_AGB_TO_DADDR(mp, ri->sc->sa.agno, agbno); in xrep_findroot_block()
697 error = xfs_agfl_walk(mp, ri->agf, ri->agfl_bp, in xrep_findroot_block()
723 error = xfs_trans_read_buf(mp, ri->sc->tp, mp->m_ddev_targp, daddr, in xrep_findroot_block()
817 trace_xrep_findroot_block(mp, ri->sc->sa.agno, agbno, in xrep_findroot_block()
820 xfs_trans_brelse(ri->sc->tp, bp); in xrep_findroot_block()
834 struct xrep_findroot *ri = priv; in xrep_findroot_rmap() local
847 for (fab = ri->btree_info; fab->buf_ops; fab++) { in xrep_findroot_rmap()
850 error = xrep_findroot_block(ri, fab, in xrep_findroot_rmap()
[all …]
/fs/ceph/
Dsnap.c699 struct ceph_mds_snap_realm *ri; /* encoded */ in ceph_update_snap_trace() local
715 ceph_decode_need(&p, e, sizeof(*ri), bad); in ceph_update_snap_trace()
716 ri = p; in ceph_update_snap_trace()
717 p += sizeof(*ri); in ceph_update_snap_trace()
718 ceph_decode_need(&p, e, sizeof(u64)*(le32_to_cpu(ri->num_snaps) + in ceph_update_snap_trace()
719 le32_to_cpu(ri->num_prior_parent_snaps)), bad); in ceph_update_snap_trace()
721 p += sizeof(u64) * le32_to_cpu(ri->num_snaps); in ceph_update_snap_trace()
723 p += sizeof(u64) * le32_to_cpu(ri->num_prior_parent_snaps); in ceph_update_snap_trace()
725 realm = ceph_lookup_snap_realm(mdsc, le64_to_cpu(ri->ino)); in ceph_update_snap_trace()
727 realm = ceph_create_snap_realm(mdsc, le64_to_cpu(ri->ino)); in ceph_update_snap_trace()
[all …]
/fs/btrfs/
Dtree-checker.c1078 struct btrfs_root_item ri = { 0 }; in check_root_item() local
1087 if (btrfs_item_size_nr(leaf, slot) != sizeof(ri) && in check_root_item()
1091 btrfs_item_size_nr(leaf, slot), sizeof(ri), in check_root_item()
1101 read_extent_buffer(leaf, &ri, btrfs_item_ptr_offset(leaf, slot), in check_root_item()
1105 if (btrfs_root_generation(&ri) > in check_root_item()
1109 btrfs_root_generation(&ri), in check_root_item()
1113 if (btrfs_root_generation_v2(&ri) > in check_root_item()
1117 btrfs_root_generation_v2(&ri), in check_root_item()
1121 if (btrfs_root_last_snapshot(&ri) > in check_root_item()
1125 btrfs_root_last_snapshot(&ri), in check_root_item()
[all …]
Dprint-tree.c212 struct btrfs_root_item *ri; in btrfs_print_leaf() local
257 ri = btrfs_item_ptr(l, i, struct btrfs_root_item); in btrfs_print_leaf()
259 btrfs_disk_root_bytenr(l, ri), in btrfs_print_leaf()
260 btrfs_disk_root_refs(l, ri)); in btrfs_print_leaf()
/fs/xfs/libxfs/
Dxfs_refcount.c1237 struct xfs_refcount_intent *ri; in __xfs_refcount_add() local
1244 ri = kmem_alloc(sizeof(struct xfs_refcount_intent), in __xfs_refcount_add()
1246 INIT_LIST_HEAD(&ri->ri_list); in __xfs_refcount_add()
1247 ri->ri_type = type; in __xfs_refcount_add()
1248 ri->ri_startblock = startblock; in __xfs_refcount_add()
1249 ri->ri_blockcount = blockcount; in __xfs_refcount_add()
1251 xfs_defer_add(tp, XFS_DEFER_OPS_TYPE_REFCOUNT, &ri->ri_list); in __xfs_refcount_add()
/fs/gfs2/
Dglock.c790 struct gfs2_inode_lvb *ri = (void *)gl->gl_lksb.sb_lvbptr; in gfs2_inode_remember_delete() local
792 if (ri->ri_magic == 0) in gfs2_inode_remember_delete()
793 ri->ri_magic = cpu_to_be32(GFS2_MAGIC); in gfs2_inode_remember_delete()
794 if (ri->ri_magic == cpu_to_be32(GFS2_MAGIC)) in gfs2_inode_remember_delete()
795 ri->ri_generation_deleted = cpu_to_be64(generation); in gfs2_inode_remember_delete()
800 struct gfs2_inode_lvb *ri = (void *)gl->gl_lksb.sb_lvbptr; in gfs2_inode_already_deleted() local
802 if (ri->ri_magic != cpu_to_be32(GFS2_MAGIC)) in gfs2_inode_already_deleted()
804 return generation <= be64_to_cpu(ri->ri_generation_deleted); in gfs2_inode_already_deleted()

12