[OpenAFS] Unable transferring files larger than 2147483647 bytes with up on i386

Christian Biamont christianbiamont@gmail.com
Wed, 20 Mar 2013 12:36:23 +0100


Hi,

I'm using Ubuntu 11.04 on an i386. The OpenAFS packages are of version
1.4.14+dfsg-1+ubuntu1. I noticed that it was not possible to transfer
files larger than 2147483647 bytes with "up" (it's called "afs-up" on
Ubuntu). The program fails with: "Can't find xyz.iso".

I tried building your code from git://git.openafs.org/openafs.git, and
got the same results.

Looking thru the code it seems lstat() returns -1 and exits. I tried
adding a perror and got the following answer: "Value too large for
defined data type".

--- a/src/venus/up.c
+++ b/src/venus/up.c
@@ -207,6 +207,7 @@ Copy(char *file1, char *file2, short recursive, int level)

     code = lstat(file1, &s1);
     if (code < 0) {
+       perror("perror");
        fprintf(stderr, "Can't find %s\n", file1);
        return 1;
     }

The solution to this was to configure openafs with ./configure CC="gcc
-D_FILE_OFFSET_BITS=64".

Is this the desired behaviour and the proper solution to make it
possible to transfer large files with "up"?

Christian Biamont