From: adilger Date: Sat, 21 May 2005 08:20:35 +0000 (+0000) Subject: Branch b1_4 X-Git-Tag: v1_7_100~1^25~8^2~102 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=adcf2496871eb950f8ea053371d69b054dc73c27;p=fs%2Flustre-release.git Branch b1_4 Use 64-bit interface for truncate, so that it is possible to ./truncate files larger than 2GB in UML. --- diff --git a/lustre/kernel_patches/patches/uml-patch-2.4.24-1.patch b/lustre/kernel_patches/patches/uml-patch-2.4.24-1.patch index ade809d..9b62f6e 100644 --- a/lustre/kernel_patches/patches/uml-patch-2.4.24-1.patch +++ b/lustre/kernel_patches/patches/uml-patch-2.4.24-1.patch @@ -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){ diff --git a/lustre/kernel_patches/patches/uml-patch-2.4.29-1.patch b/lustre/kernel_patches/patches/uml-patch-2.4.29-1.patch index ec0d8b3..16f449d 100644 --- a/lustre/kernel_patches/patches/uml-patch-2.4.29-1.patch +++ b/lustre/kernel_patches/patches/uml-patch-2.4.29-1.patch @@ -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);