MCPcopy Create free account
hub / github.com/bobranten/Ext4Fsd / Ext2DecodeInode

Function Ext2DecodeInode

Ext4Fsd/ext3/generic.c:449–474  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

447}
448
449void Ext2DecodeInode(struct inode *dst, struct ext4_inode *src)
450{
451 dst->i_mode = src->i_mode;
452 dst->i_flags = src->i_flags;
453 dst->i_uid = src->i_uid;
454 dst->i_gid = src->i_gid;
455 dst->i_nlink = src->i_links_count;
456 dst->i_generation = src->i_generation;
457 dst->i_size = src->i_size_lo;
458 if (S_ISREG(src->i_mode)) {
459 dst->i_size |= (loff_t)src->i_size_high << 32;
460 }
461 dst->i_file_acl = src->i_file_acl_lo;
462 dst->i_file_acl |= (ext4_fsblk_t)src->osd2.linux2.l_i_file_acl_high << 32;
463 dst->i_atime = src->i_atime;
464 dst->i_ctime = src->i_ctime;
465 dst->i_mtime = src->i_mtime;
466 dst->i_dtime = src->i_dtime;
467 dst->i_blocks = ext3_inode_blocks(src, dst);
468 memcpy(&dst->i_block[0], &src->i_block[0], sizeof(__u32) * 15);
469 if (EXT4_HAS_RO_COMPAT_FEATURE(dst->i_sb,
470 EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE))
471 dst->i_extra_isize = src->i_extra_isize;
472 else
473 dst->i_extra_isize = 0;
474}
475
476void Ext2EncodeInode(struct ext4_inode *dst, struct inode *src)
477{

Callers 1

Ext2LoadInodeFunction · 0.85

Calls 1

ext3_inode_blocksFunction · 0.85

Tested by

no test coverage detected