Zhu Yanhai
2008-Apr-28 06:03 UTC
[Btrfs-devel] [PATCH] Fix btrfs-convert's large file support.
Hello, 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. Regards, Zhu Yanhai ---- diff -r 1c218a5b9784 convert.c --- a/convert.c Fri Apr 25 16:55:21 2008 -0400 +++ b/convert.c Mon Apr 28 13:01:58 2008 +0800 @@ -928,6 +928,10 @@ static int copy_inode_item(struct btrfs_ 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]) {
Yan Zheng
2008-Apr-28 15:04 UTC
[Btrfs-devel] [PATCH] Fix btrfs-convert's large file support.
2008/4/28 Zhu Yanhai <piggestpig at gmail.com>:> Hello, > 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. >Thanks YZ
Chris Mason
2008-Apr-28 15:09 UTC
[Btrfs-devel] [PATCH] Fix btrfs-convert's large file support.
On Monday 28 April 2008, Zhu Yanhai wrote:> Hello, > 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.Great, I'll pull this in today. -chris