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

Function ext3_inode_blocks

Ext4Fsd/ext3/generic.c:2362–2383  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2360}
2361
2362blkcnt_t ext3_inode_blocks(struct ext4_inode *raw_inode,
2363 struct inode *inode)
2364{
2365 blkcnt_t i_blocks ;
2366 struct super_block *sb = inode->i_sb;
2367 PEXT2_VCB Vcb = (PEXT2_VCB)sb->s_priv;
2368
2369 if (EXT4_HAS_RO_COMPAT_FEATURE(sb,
2370 EXT4_FEATURE_RO_COMPAT_HUGE_FILE)) {
2371 /* we are using combined 48 bit field */
2372 i_blocks = ((u64)le16_to_cpu(raw_inode->i_blocks_high)) << 32 |
2373 le32_to_cpu(raw_inode->i_blocks_lo);
2374 if (inode->i_flags & EXT4_HUGE_FILE_FL) {
2375 /* i_blocks represent file system block size */
2376 return i_blocks << (BLOCK_BITS - 9);
2377 } else {
2378 return i_blocks;
2379 }
2380 } else {
2381 return le32_to_cpu(raw_inode->i_blocks_lo);
2382 }
2383}
2384
2385int ext3_inode_blocks_set(struct ext4_inode *raw_inode,
2386 struct inode * inode)

Callers 1

Ext2DecodeInodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected