Whamcloud - gitweb
Branch b1_4
authoradilger <adilger>
Sat, 21 May 2005 08:20:35 +0000 (08:20 +0000)
committeradilger <adilger>
Sat, 21 May 2005 08:20:35 +0000 (08:20 +0000)
Use 64-bit interface for truncate, so that it is possible to ./truncate
files larger than 2GB in UML.

lustre/kernel_patches/patches/uml-patch-2.4.24-1.patch
lustre/kernel_patches/patches/uml-patch-2.4.29-1.patch

index ade809d..9b62f6e 100644 (file)
@@ -13455,7 +13455,7 @@ diff -Naur -X ../exclude-files orig/arch/um/fs/hostfs/hostfs_user.c um/arch/um/f
 +              if(chown(file, -1, attrs->ia_gid)) return(-errno);
 +      }
 +      if(attrs->ia_valid & HOSTFS_ATTR_SIZE){
-+              if(truncate(file, attrs->ia_size)) return(-errno);
++              if(truncate64(file, attrs->ia_size)) return(-errno);
 +      }
 +      ma = HOSTFS_ATTR_ATIME_SET | HOSTFS_ATTR_MTIME_SET;
 +      if((attrs->ia_valid & ma) == ma){
index ec0d8b3..16f449d 100644 (file)
@@ -39282,7 +39282,7 @@ Index: linux-2.4.29/arch/um/os-Linux/file.c
 +{
 +      int err;
 +
-+      err = ftruncate(fd, len);
++      err = ftruncate64(fd, len);
 +      if(err)
 +              return(-errno);
 +      return(0);
@@ -39292,7 +39292,7 @@ Index: linux-2.4.29/arch/um/os-Linux/file.c
 +{
 +      int err;
 +
-+      err = truncate(file, len);
++      err = truncate64(file, len);
 +      if(err)
 +              return(-errno);
 +      return(0);