linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix btrfs-convert's large file support.
@ 2008-04-28  6:03 Zhu Yanhai
  2008-04-28 15:04 ` Yan Zheng
  2008-04-28 15:09 ` Chris Mason
  0 siblings, 2 replies; 3+ messages in thread
From: Zhu Yanhai @ 2008-04-28  6:03 UTC (permalink / raw)
  To: btrfs-devel, linux-btrfs

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]) {

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix btrfs-convert's large file support.
  2008-04-28  6:03 [PATCH] Fix btrfs-convert's large file support Zhu Yanhai
@ 2008-04-28 15:04 ` Yan Zheng
  2008-04-28 15:09 ` Chris Mason
  1 sibling, 0 replies; 3+ messages in thread
From: Yan Zheng @ 2008-04-28 15:04 UTC (permalink / raw)
  To: Zhu Yanhai; +Cc: btrfs-devel, linux-btrfs

2008/4/28 Zhu Yanhai <piggestpig@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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Fix btrfs-convert's large file support.
  2008-04-28  6:03 [PATCH] Fix btrfs-convert's large file support Zhu Yanhai
  2008-04-28 15:04 ` Yan Zheng
@ 2008-04-28 15:09 ` Chris Mason
  1 sibling, 0 replies; 3+ messages in thread
From: Chris Mason @ 2008-04-28 15:09 UTC (permalink / raw)
  To: Zhu Yanhai; +Cc: btrfs-devel, linux-btrfs

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-04-28 15:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-28  6:03 [PATCH] Fix btrfs-convert's large file support Zhu Yanhai
2008-04-28 15:04 ` Yan Zheng
2008-04-28 15:09 ` Chris Mason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).