| 2360 | } |
| 2361 | |
| 2362 | blkcnt_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 | |
| 2385 | int ext3_inode_blocks_set(struct ext4_inode *raw_inode, |
| 2386 | struct inode * inode) |