head	1.1;
access;
symbols
	LKML-branch:1.1.0.2;
locks; strict;
comment	@# @;


1.1
date	2006.10.10.06.27.49;	author jsipek;	state dead;
branches
	1.1.2.1;
next	;

1.1.2.1
date	2006.10.10.06.27.49;	author jsipek;	state Exp;
branches;
next	1.1.2.2;

1.1.2.2
date	2006.10.10.06.32.38;	author jsipek;	state dead;
branches;
next	;


desc
@@


1.1
log
@file overflow-fix was initially added on branch LKML-branch.
@
text
@@


1.1.2.1
log
@Patch to fix >=2GB file copyup
@
text
@a0 43
diff -r 410950c44071 fs/unionfs/commonfops.c
--- a/fs/unionfs/commonfops.c	Mon Oct 09 19:38:41 2006 -0400
+++ b/fs/unionfs/commonfops.c	Tue Oct 10 01:09:47 2006 -0400
@@@@ -176,7 +176,7 @@@@ static int do_delayed_copyup(struct file
 {
 	int bindex, bstart, bend, err = 0;
 	struct inode *parent_inode = dentry->d_parent->d_inode;
-	size_t inode_size = file->f_dentry->d_inode->i_size;
+	loff_t inode_size = file->f_dentry->d_inode->i_size;
 
 	bstart = fbstart(file);
 	bend = fbend(file);
diff -r 410950c44071 fs/unionfs/copyup.c
--- a/fs/unionfs/copyup.c	Mon Oct 09 19:38:41 2006 -0400
+++ b/fs/unionfs/copyup.c	Tue Oct 10 02:22:17 2006 -0400
@@@@ -194,14 +194,16 @@@@ static inline int __copyup_reg_data(stru
 	mm_segment_t old_fs;
 	char *buf = NULL;
 	ssize_t read_bytes, write_bytes;
-	ssize_t size;
+	loff_t size;
 	int err = 0;
+
+	int open_flags = force_o_largefile() ? O_LARGEFILE : 0;
 
 	/* open old file */
 	mntget(dtohm_index(dentry, old_bindex));
 	branchget(sb, old_bindex);
 	input_file = dentry_open(old_hidden_dentry,
-			dtohm_index(dentry, old_bindex), O_RDONLY);
+			dtohm_index(dentry, old_bindex), O_RDONLY | open_flags);
 	if (IS_ERR(input_file)) {
 		dput(old_hidden_dentry);
 		err = PTR_ERR(input_file);
@@@@ -217,7 +219,7 @@@@ static inline int __copyup_reg_data(stru
 	mntget(dtohm_index(dentry, new_bindex));
 	branchget(sb, new_bindex);
 	output_file = dentry_open(new_hidden_dentry,
-			dtohm_index(dentry, new_bindex), O_WRONLY);
+			dtohm_index(dentry, new_bindex), O_WRONLY | open_flags);
 	if (IS_ERR(output_file)) {
 		err = PTR_ERR(output_file);
 		goto out_close_in2;
@


1.1.2.2
log
@Collapsed fix into unionfs-proper
@
text
@@


