• Home
  • Raw
  • Download

Lines Matching refs:ri

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()
77 vecs[0].iov_base = ri; in jffs2_write_dnode()
78 vecs[0].iov_len = sizeof(*ri); in jffs2_write_dnode()
82 if (je32_to_cpu(ri->totlen) != sizeof(*ri) + datalen) { in jffs2_write_dnode()
84 __func__, je32_to_cpu(ri->totlen), in jffs2_write_dnode()
85 sizeof(*ri), datalen); in jffs2_write_dnode()
100 if ((alloc_mode!=ALLOC_GC) && (je32_to_cpu(ri->version) < f->highest_version)) { in jffs2_write_dnode()
104 je32_to_cpu(ri->version), f->highest_version); in jffs2_write_dnode()
105 ri->version = cpu_to_je32(++f->highest_version); in jffs2_write_dnode()
106 ri->node_crc = cpu_to_je32(crc32(0, ri, sizeof(*ri)-8)); in jffs2_write_dnode()
112 if (ret || (retlen != sizeof(*ri) + datalen)) { in jffs2_write_dnode()
114 sizeof(*ri) + datalen, flash_ofs, ret, retlen); in jffs2_write_dnode()
123 jffs2_add_physical_node_ref(c, flash_ofs | REF_OBSOLETE, PAD(sizeof(*ri)+datalen), NULL); in jffs2_write_dnode()
141 ret = jffs2_reserve_space_gc(c, sizeof(*ri) + datalen, &dummy, in jffs2_write_dnode()
148 ret = jffs2_reserve_space(c, sizeof(*ri) + datalen, &dummy, in jffs2_write_dnode()
175 if ((je32_to_cpu(ri->dsize) >= PAGE_SIZE) || in jffs2_write_dnode()
176 ( ((je32_to_cpu(ri->offset)&(PAGE_SIZE-1))==0) && in jffs2_write_dnode()
177 (je32_to_cpu(ri->dsize)+je32_to_cpu(ri->offset) == je32_to_cpu(ri->isize)))) { in jffs2_write_dnode()
182 fn->raw = jffs2_add_physical_node_ref(c, flash_ofs, PAD(sizeof(*ri)+datalen), f->inocache); in jffs2_write_dnode()
189 fn->ofs = je32_to_cpu(ri->offset); in jffs2_write_dnode()
190 fn->size = je32_to_cpu(ri->dsize); in jffs2_write_dnode()
194 flash_ofs & ~3, flash_ofs & 3, je32_to_cpu(ri->dsize), in jffs2_write_dnode()
195 je32_to_cpu(ri->csize), je32_to_cpu(ri->node_crc), in jffs2_write_dnode()
196 je32_to_cpu(ri->data_crc), je32_to_cpu(ri->totlen)); in jffs2_write_dnode()
341 struct jffs2_raw_inode *ri, unsigned char *buf, in jffs2_write_inode_range() argument
362 ret = jffs2_reserve_space(c, sizeof(*ri) + JFFS2_MIN_DATA_LEN, in jffs2_write_inode_range()
371 cdatalen = min_t(uint32_t, alloclen - sizeof(*ri), datalen); in jffs2_write_inode_range()
375 ri->magic = cpu_to_je16(JFFS2_MAGIC_BITMASK); in jffs2_write_inode_range()
376 ri->nodetype = cpu_to_je16(JFFS2_NODETYPE_INODE); in jffs2_write_inode_range()
377 ri->totlen = cpu_to_je32(sizeof(*ri) + cdatalen); in jffs2_write_inode_range()
378 ri->hdr_crc = cpu_to_je32(crc32(0, ri, sizeof(struct jffs2_unknown_node)-4)); in jffs2_write_inode_range()
380 ri->ino = cpu_to_je32(f->inocache->ino); in jffs2_write_inode_range()
381 ri->version = cpu_to_je32(++f->highest_version); in jffs2_write_inode_range()
382 ri->isize = cpu_to_je32(max(je32_to_cpu(ri->isize), offset + datalen)); in jffs2_write_inode_range()
383 ri->offset = cpu_to_je32(offset); in jffs2_write_inode_range()
384 ri->csize = cpu_to_je32(cdatalen); in jffs2_write_inode_range()
385 ri->dsize = cpu_to_je32(datalen); in jffs2_write_inode_range()
386 ri->compr = comprtype & 0xff; in jffs2_write_inode_range()
387 ri->usercompr = (comprtype >> 8 ) & 0xff; in jffs2_write_inode_range()
388 ri->node_crc = cpu_to_je32(crc32(0, ri, sizeof(*ri)-8)); in jffs2_write_inode_range()
389 ri->data_crc = cpu_to_je32(crc32(0, comprbuf, cdatalen)); in jffs2_write_inode_range()
391 fn = jffs2_write_dnode(c, f, ri, comprbuf, cdatalen, ALLOC_NORETRY); in jffs2_write_inode_range()
442 struct jffs2_inode_info *f, struct jffs2_raw_inode *ri, in jffs2_do_create() argument
454 ret = jffs2_reserve_space(c, sizeof(*ri), &alloclen, ALLOC_NORMAL, in jffs2_do_create()
462 ri->data_crc = cpu_to_je32(0); in jffs2_do_create()
463 ri->node_crc = cpu_to_je32(crc32(0, ri, sizeof(*ri)-8)); in jffs2_do_create()
465 fn = jffs2_write_dnode(c, f, ri, NULL, 0, ALLOC_NORMAL); in jffs2_do_create()
468 jemode_to_cpu(ri->mode)); in jffs2_do_create()
517 rd->ino = ri->ino; in jffs2_do_create()
518 rd->mctime = ri->ctime; in jffs2_do_create()