From adcf2496871eb950f8ea053371d69b054dc73c27 Mon Sep 17 00:00:00 2001 From: adilger Date: Sat, 21 May 2005 08:20:35 +0000 Subject: [PATCH] Branch b1_4 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 | 2 +- lustre/kernel_patches/patches/uml-patch-2.4.29-1.patch | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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); -- 1.8.3.1