diff options
author | Zhu <piggestpig@gmail.com> | 2008-04-28 16:45:11 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2008-04-28 16:45:11 -0400 |
commit | fb0a5d3766ac007dc316dd3a9cf737192f80d91f (patch) | |
tree | 4556e501840f66c8c0a04adab6c535ed1b6b718f /convert.c | |
parent | b327761ead72a42f253bb45b6b03fefdb15edec4 (diff) |
Fix btrfs-convert's large file support.
This patch add ext2_inode.i_size_high into account when calculating regular
file's size in btrfs-convert, which makes it deal with large files bigger than
4GB properly.
Diffstat (limited to 'convert.c')
-rw-r--r-- | convert.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -928,6 +928,10 @@ static int copy_inode_item(struct btrfs_inode_item *dst, btrfs_set_stack_inode_size(dst, 0); btrfs_set_stack_inode_nlink(dst, 1); } + if (S_ISREG(src->i_mode)) { + btrfs_set_stack_inode_size(dst, (u64)src->i_size_high << 32 | + (u64)src->i_size); + } if (!S_ISREG(src->i_mode) && !S_ISDIR(src->i_mode) && !S_ISLNK(src->i_mode)) { if (src->i_block[0]) { |