/fs/jffs2/ |
D | read.c | 27 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 …]
|
D | write.c | 24 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 …]
|
D | file.c | 147 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 …]
|
D | gc.c | 762 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 …]
|
D | fs.c | 37 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 …]
|
D | dir.c | 166 struct jffs2_raw_inode *ri; in jffs2_create() local 172 ri = jffs2_alloc_raw_inode(); in jffs2_create() 173 if (!ri) in jffs2_create() 180 inode = jffs2_new_inode(dir_i, mode, ri); in jffs2_create() 184 jffs2_free_raw_inode(ri); in jffs2_create() 203 ret = jffs2_do_create(c, dir_f, f, ri, &dentry->d_name); in jffs2_create() 207 dir_i->i_mtime = dir_i->i_ctime = ITIME(je32_to_cpu(ri->ctime)); in jffs2_create() 209 jffs2_free_raw_inode(ri); in jffs2_create() 220 jffs2_free_raw_inode(ri); in jffs2_create() 288 struct jffs2_raw_inode *ri; in jffs2_symlink() local [all …]
|
D | scan.c | 47 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 …]
|
D | nodelist.h | 396 …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);
|
D | summary.c | 115 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/ |
D | inode.c | 62 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() 91 static void __set_inode_rdev(struct inode *inode, struct f2fs_inode *ri) in __set_inode_rdev() argument 97 ri->i_addr[extra_size] = in __set_inode_rdev() 99 ri->i_addr[extra_size + 1] = 0; in __set_inode_rdev() 101 ri->i_addr[extra_size] = 0; in __set_inode_rdev() [all …]
|
D | inline.c | 278 struct f2fs_inode *ri = NULL; in f2fs_recover_inline_data() local 291 ri = F2FS_INODE(npage); in f2fs_recover_inline_data() 294 ri && (ri->i_inline & F2FS_INLINE_DATA)) { in f2fs_recover_inline_data() 322 } else if (ri && (ri->i_inline & F2FS_INLINE_DATA)) { in f2fs_recover_inline_data()
|
D | f2fs.h | 3081 static inline void get_inline_info(struct inode *inode, struct f2fs_inode *ri) in get_inline_info() argument 3085 if (ri->i_inline & F2FS_INLINE_XATTR) in get_inline_info() 3087 if (ri->i_inline & F2FS_INLINE_DATA) in get_inline_info() 3089 if (ri->i_inline & F2FS_INLINE_DENTRY) in get_inline_info() 3091 if (ri->i_inline & F2FS_DATA_EXIST) in get_inline_info() 3093 if (ri->i_inline & F2FS_INLINE_DOTS) in get_inline_info() 3095 if (ri->i_inline & F2FS_EXTRA_ATTR) in get_inline_info() 3097 if (ri->i_inline & F2FS_PIN_FILE) in get_inline_info() 3099 if (ri->i_inline & F2FS_COMPRESS_RELEASED) in get_inline_info() 3103 static inline void set_raw_inline(struct inode *inode, struct f2fs_inode *ri) in set_raw_inline() argument [all …]
|
D | dir.c | 467 struct f2fs_inode *ri; in init_dent_inode() local 475 ri = F2FS_INODE(ipage); in init_dent_inode() 476 ri->i_namelen = cpu_to_le32(fname->disk_name.len); in init_dent_inode() 477 memcpy(ri->i_name, fname->disk_name.name, fname->disk_name.len); in init_dent_inode() 491 &ri->i_name[fname->disk_name.len]); in init_dent_inode()
|
D | node.c | 1032 struct f2fs_inode *ri, int *offset, int depth) in truncate_partial_nodes() argument 1041 nid[0] = le32_to_cpu(ri->i_nid[offset[0] - NODE_DIR1_BLOCK]); in truncate_partial_nodes() 1102 struct f2fs_inode *ri; in f2fs_truncate_inode_blocks() local 1123 ri = F2FS_INODE(page); in f2fs_truncate_inode_blocks() 1133 err = truncate_partial_nodes(&dn, ri, offset, level); in f2fs_truncate_inode_blocks() 1142 err = truncate_partial_nodes(&dn, ri, offset, level); in f2fs_truncate_inode_blocks() 1152 dn.nid = le32_to_cpu(ri->i_nid[offset[0] - NODE_DIR1_BLOCK]); in f2fs_truncate_inode_blocks() 1175 ri->i_nid[offset[0] - NODE_DIR1_BLOCK]) { in f2fs_truncate_inode_blocks() 1179 ri->i_nid[offset[0] - NODE_DIR1_BLOCK] = 0; in f2fs_truncate_inode_blocks() 2668 struct f2fs_inode *ri; in f2fs_recover_inline_xattr() local [all …]
|
/fs/nilfs2/ |
D | recovery.c | 417 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 …]
|
D | the_nilfs.c | 150 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 …]
|
D | segment.h | 246 struct nilfs_recovery_info *ri);
|
/fs/dlm/ |
D | debug_fs.c | 384 struct rsbtbl_iter *ri = iter_ptr; in table_seq_show() local 386 switch (ri->format) { in table_seq_show() 388 print_format1(ri->rsb, seq); in table_seq_show() 391 if (ri->header) { in table_seq_show() 393 ri->header = 0; in table_seq_show() 395 print_format2(ri->rsb, seq); in table_seq_show() 398 if (ri->header) { in table_seq_show() 400 ri->header = 0; in table_seq_show() 402 print_format3(ri->rsb, seq); in table_seq_show() 405 if (ri->header) { in table_seq_show() [all …]
|
/fs/romfs/ |
D | super.c | 154 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/ |
D | repair.c | 680 struct xrep_findroot *ri, in xrep_findroot_block() argument 686 struct xfs_mount *mp = ri->sc->mp; in xrep_findroot_block() 693 daddr = XFS_AGB_TO_DADDR(mp, ri->sc->sa.pag->pag_agno, agbno); in xrep_findroot_block() 702 error = xfs_agfl_walk(mp, ri->agf, ri->agfl_bp, in xrep_findroot_block() 728 error = xfs_trans_read_buf(mp, ri->sc->tp, mp->m_ddev_targp, daddr, in xrep_findroot_block() 822 trace_xrep_findroot_block(mp, ri->sc->sa.pag->pag_agno, agbno, in xrep_findroot_block() 825 xfs_trans_brelse(ri->sc->tp, bp); in xrep_findroot_block() 839 struct xrep_findroot *ri = priv; in xrep_findroot_rmap() local 852 for (fab = ri->btree_info; fab->buf_ops; fab++) { in xrep_findroot_rmap() 855 error = xrep_findroot_block(ri, fab, in xrep_findroot_rmap() [all …]
|
/fs/ceph/ |
D | snap.c | 707 struct ceph_mds_snap_realm *ri; /* encoded */ in ceph_update_snap_trace() local 723 ceph_decode_need(&p, e, sizeof(*ri), bad); in ceph_update_snap_trace() 724 ri = p; in ceph_update_snap_trace() 725 p += sizeof(*ri); in ceph_update_snap_trace() 726 ceph_decode_need(&p, e, sizeof(u64)*(le32_to_cpu(ri->num_snaps) + in ceph_update_snap_trace() 727 le32_to_cpu(ri->num_prior_parent_snaps)), bad); in ceph_update_snap_trace() 729 p += sizeof(u64) * le32_to_cpu(ri->num_snaps); in ceph_update_snap_trace() 731 p += sizeof(u64) * le32_to_cpu(ri->num_prior_parent_snaps); in ceph_update_snap_trace() 733 realm = ceph_lookup_snap_realm(mdsc, le64_to_cpu(ri->ino)); in ceph_update_snap_trace() 735 realm = ceph_create_snap_realm(mdsc, le64_to_cpu(ri->ino)); in ceph_update_snap_trace() [all …]
|
/fs/btrfs/ |
D | tree-checker.c | 1118 struct btrfs_root_item ri = { 0 }; in check_root_item() local 1127 if (unlikely(btrfs_item_size_nr(leaf, slot) != sizeof(ri) && in check_root_item() 1132 btrfs_item_size_nr(leaf, slot), sizeof(ri), in check_root_item() 1142 read_extent_buffer(leaf, &ri, btrfs_item_ptr_offset(leaf, slot), in check_root_item() 1146 if (unlikely(btrfs_root_generation(&ri) > in check_root_item() 1150 btrfs_root_generation(&ri), in check_root_item() 1154 if (unlikely(btrfs_root_generation_v2(&ri) > in check_root_item() 1158 btrfs_root_generation_v2(&ri), in check_root_item() 1162 if (unlikely(btrfs_root_last_snapshot(&ri) > in check_root_item() 1166 btrfs_root_last_snapshot(&ri), in check_root_item() [all …]
|
D | print-tree.c | 204 struct btrfs_root_item *ri; in btrfs_print_leaf() local 249 ri = btrfs_item_ptr(l, i, struct btrfs_root_item); in btrfs_print_leaf() 251 btrfs_disk_root_bytenr(l, ri), in btrfs_print_leaf() 252 btrfs_disk_root_refs(l, ri)); in btrfs_print_leaf()
|
/fs/xfs/libxfs/ |
D | xfs_refcount.c | 1231 struct xfs_refcount_intent *ri; in __xfs_refcount_add() local 1238 ri = kmem_alloc(sizeof(struct xfs_refcount_intent), in __xfs_refcount_add() 1240 INIT_LIST_HEAD(&ri->ri_list); in __xfs_refcount_add() 1241 ri->ri_type = type; in __xfs_refcount_add() 1242 ri->ri_startblock = startblock; in __xfs_refcount_add() 1243 ri->ri_blockcount = blockcount; in __xfs_refcount_add() 1245 xfs_defer_add(tp, XFS_DEFER_OPS_TYPE_REFCOUNT, &ri->ri_list); in __xfs_refcount_add()
|
/fs/gfs2/ |
D | glock.c | 889 struct gfs2_inode_lvb *ri = (void *)gl->gl_lksb.sb_lvbptr; in gfs2_inode_remember_delete() local 891 if (ri->ri_magic == 0) in gfs2_inode_remember_delete() 892 ri->ri_magic = cpu_to_be32(GFS2_MAGIC); in gfs2_inode_remember_delete() 893 if (ri->ri_magic == cpu_to_be32(GFS2_MAGIC)) in gfs2_inode_remember_delete() 894 ri->ri_generation_deleted = cpu_to_be64(generation); in gfs2_inode_remember_delete() 899 struct gfs2_inode_lvb *ri = (void *)gl->gl_lksb.sb_lvbptr; in gfs2_inode_already_deleted() local 901 if (ri->ri_magic != cpu_to_be32(GFS2_MAGIC)) in gfs2_inode_already_deleted() 903 return generation <= be64_to_cpu(ri->ri_generation_deleted); in gfs2_inode_already_deleted()
|