linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv2 xfsprogs 04/14] replace [fl]stat64 by equivalent [fl]stat
  2016-08-13 17:04 [PATCHv2 xfsprogs 00/14] Convert from off64_t to off_t Felix Janda
@ 2016-08-06 10:45 ` Felix Janda
  2016-08-18 17:38   ` Christoph Hellwig
  2016-08-06 10:45 ` [PATCHv2 xfsprogs 05/14] replace ftruncate64 by equivalent ftruncate Felix Janda
                   ` (14 subsequent siblings)
  15 siblings, 1 reply; 37+ messages in thread
From: Felix Janda @ 2016-08-06 10:45 UTC (permalink / raw)
  To: xfs

[-- Attachment #1: Type: text/plain, Size: 22103 bytes --]

Signed-off-by: Felix Janda <felix.janda@posteo.de>
---
 copy/xfs_copy.c           |  8 ++++----
 fsr/xfs_fsr.c             | 34 +++++++++++++++++-----------------
 include/darwin.h          |  5 +----
 include/freebsd.h         |  2 --
 io/copy_file_range.c      |  6 +++---
 io/open.c                 | 18 +++++++++---------
 io/sendfile.c             |  6 +++---
 libxcmd/paths.c           |  4 ++--
 libxfs/darwin.c           |  8 ++++----
 libxfs/freebsd.c          |  8 ++++----
 libxfs/init.c             | 12 ++++++------
 libxfs/init.h             |  6 +++---
 libxfs/irix.c             |  8 ++++----
 libxfs/linux.c            | 20 ++++++++++----------
 mdrestore/xfs_mdrestore.c |  6 +++---
 mkfs/proto.c              |  4 ++--
 mkfs/xfs_mkfs.c           |  4 ++--
 po/de.po                  |  8 ++++----
 po/pl.po                  |  8 ++++----
 repair/xfs_repair.c       |  4 ++--
 rtcp/xfs_rtcp.c           | 18 +++++++++---------
 21 files changed, 96 insertions(+), 101 deletions(-)

diff --git a/copy/xfs_copy.c b/copy/xfs_copy.c
index 3c8998c..55a9e2c 100644
--- a/copy/xfs_copy.c
+++ b/copy/xfs_copy.c
@@ -28,7 +28,7 @@
 #define	rounddown(x, y)	(((x)/(y))*(y))
 #define uuid_equal(s,d) (platform_uuid_compare((s),(d)) == 0)
 
-extern int	platform_check_ismounted(char *, char *, struct stat64 *, int);
+extern int	platform_check_ismounted(char *, char *, struct stat *, int);
 
 int		logfd;
 char 		*logfile_name;
@@ -560,7 +560,7 @@ main(int argc, char **argv)
 	extern int	optind;
 	libxfs_init_t	xargs;
 	thread_args	*tcarg;
-	struct stat64	statbuf;
+	struct stat	statbuf;
 
 	progname = basename(argv[0]);
 
@@ -641,7 +641,7 @@ main(int argc, char **argv)
 		die_perror();
 	}
 
-	if (fstat64(source_fd, &statbuf) < 0)  {
+	if (fstat(source_fd, &statbuf) < 0)  {
 		do_log(_("%s:  couldn't stat source \"%s\"\n"),
 			progname, source_name);
 		die_perror();
@@ -792,7 +792,7 @@ main(int argc, char **argv)
 	for (i = 0; i < num_targets; i++)  {
 		int	write_last_block = 0;
 
-		if (stat64(target[i].name, &statbuf) < 0)  {
+		if (stat(target[i].name, &statbuf) < 0)  {
 			/* ok, assume it's a file and create it */
 
 			do_out(_("Creating file %s\n"), target[i].name);
diff --git a/fsr/xfs_fsr.c b/fsr/xfs_fsr.c
index d75990a..36e0705 100644
--- a/fsr/xfs_fsr.c
+++ b/fsr/xfs_fsr.c
@@ -174,12 +174,12 @@ aborter(int unused)
  * of that.
  */
 static char *
-find_mountpoint_check(struct stat64 *sb, struct mntent *t)
+find_mountpoint_check(struct stat *sb, struct mntent *t)
 {
-	struct stat64 ms;
+	struct stat ms;
 
 	if (S_ISDIR(sb->st_mode)) {		/* mount point */
-		if (stat64(t->mnt_dir, &ms) < 0)
+		if (stat(t->mnt_dir, &ms) < 0)
 			return NULL;
 		if (sb->st_ino != ms.st_ino)
 			return NULL;
@@ -188,7 +188,7 @@ find_mountpoint_check(struct stat64 *sb, struct mntent *t)
 		if (strcmp(t->mnt_type, MNTTYPE_XFS) != 0)
 			return NULL;
 	} else {				/* device */
-		if (stat64(t->mnt_fsname, &ms) < 0)
+		if (stat(t->mnt_fsname, &ms) < 0)
 			return NULL;
 		if (sb->st_rdev != ms.st_rdev)
 			return NULL;
@@ -198,7 +198,7 @@ find_mountpoint_check(struct stat64 *sb, struct mntent *t)
 		 * Make sure the mountpoint given by mtab is accessible
 		 * before using it.
 		 */
-		if (stat64(t->mnt_dir, &ms) < 0)
+		if (stat(t->mnt_dir, &ms) < 0)
 			return NULL;
 	}
 
@@ -206,7 +206,7 @@ find_mountpoint_check(struct stat64 *sb, struct mntent *t)
 }
 
 static char *
-find_mountpoint(char *mtab, char *argname, struct stat64 *sb)
+find_mountpoint(char *mtab, char *argname, struct stat *sb)
 {
 	struct mntent_cursor cursor;
 	struct mntent *t = NULL;
@@ -230,7 +230,7 @@ find_mountpoint(char *mtab, char *argname, struct stat64 *sb)
 int
 main(int argc, char **argv)
 {
-	struct stat64 sb;
+	struct stat sb;
 	char *argname;
 	int c;
 	char *mntp;
@@ -327,7 +327,7 @@ main(int argc, char **argv)
 		for (; optind < argc; optind++) {
 			argname = argv[optind];
 
-			if (lstat64(argname, &sb) < 0) {
+			if (lstat(argname, &sb) < 0) {
 				fprintf(stderr,
 					_("%s: could not stat: %s: %s\n"),
 					progname, argname, strerror(errno));
@@ -335,9 +335,9 @@ main(int argc, char **argv)
 			}
 
 			if (S_ISLNK(sb.st_mode)) {
-				struct stat64 sb2;
+				struct stat sb2;
 
-				if (stat64(argname, &sb2) == 0 &&
+				if (stat(argname, &sb2) == 0 &&
 				    (S_ISBLK(sb2.st_mode) ||
 				     S_ISCHR(sb2.st_mode)))
 				sb = sb2;
@@ -405,7 +405,7 @@ initallfs(char *mtab)
 	struct mntent *mnt= NULL;
 	int mi;
 	char *cp;
-	struct stat64 sb;
+	struct stat sb;
 
 	/* malloc a number of descriptors, increased later if needed */
 	if (!(fsbase = (fsdesc_t *)malloc(fsbufsize * sizeof(fsdesc_t)))) {
@@ -427,7 +427,7 @@ initallfs(char *mtab)
 		int rw = 0;
 
 		if (strcmp(mnt->mnt_type, MNTTYPE_XFS ) != 0 ||
-		    stat64(mnt->mnt_fsname, &sb) == -1 ||
+		    stat(mnt->mnt_fsname, &sb) == -1 ||
 		    !S_ISBLK(sb.st_mode))
 			continue;
 
@@ -502,7 +502,7 @@ fsrallfs(char *mtab, int howlong, char *leftofffile)
 	char *ptr;
 	xfs_ino_t startino = 0;
 	fsdesc_t *fsp;
-	struct stat64 sb, sb2;
+	struct stat sb, sb2;
 
 	fsrprintf("xfs_fsr -m %s -t %d -f %s ...\n", mtab, howlong, leftofffile);
 
@@ -510,11 +510,11 @@ fsrallfs(char *mtab, int howlong, char *leftofffile)
 	fs = fsbase;
 
 	/* where'd we leave off last time? */
-	if (lstat64(leftofffile, &sb) == 0) {
+	if (lstat(leftofffile, &sb) == 0) {
 		if ( (fd = open(leftofffile, O_RDONLY)) == -1 ) {
 			fsrprintf(_("%s: open failed\n"), leftofffile);
 		}
-		else if ( fstat64(fd, &sb2) == 0) {
+		else if ( fstat(fd, &sb2) == 0) {
 			/*
 			 * Verify that lstat & fstat point to the
 			 * same regular file (no links/no quick spoofs)
@@ -1027,7 +1027,7 @@ fsr_setup_attr_fork(
 	xfs_bstat_t	*bstatp)
 {
 #ifdef HAVE_FSETXATTR
-	struct stat64	tstatbuf;
+	struct stat	tstatbuf;
 	int		i;
 	int		diff = 0;
 	int		last_forkoff = 0;
@@ -1054,7 +1054,7 @@ fsr_setup_attr_fork(
 
 	/* attr2 w/ fork offsets */
 
-	if (fstat64(tfd, &tstatbuf) < 0) {
+	if (fstat(tfd, &tstatbuf) < 0) {
 		fsrprintf(_("unable to stat temp file: %s\n"),
 					strerror(errno));
 		return -1;
diff --git a/include/darwin.h b/include/darwin.h
index 45e0c03..8708324 100644
--- a/include/darwin.h
+++ b/include/darwin.h
@@ -141,8 +141,6 @@ typedef u_int64_t	xfs_ino_t;
 typedef u_int32_t	xfs_dev_t;
 typedef int64_t		xfs_daddr_t;
 
-#define stat64		stat
-#define fstat64		fstat
 #define lseek64		lseek
 #define pread64		pread
 #define pwrite64	pwrite
@@ -222,8 +220,7 @@ static inline int timer_gettime (timer_t timerid, struct itimerspec *value)
 #  include <sys/param.h>
 #include <sys/ucred.h>
 #include <errno.h>
-#define statvfs64 statfs
-#define lstat64 lstat
+#define statvfs64	statfs
 #define		_PATH_MOUNTED   "/etc/mtab"
 
 struct mntent
diff --git a/include/freebsd.h b/include/freebsd.h
index 6e77427..f7ab8fa 100644
--- a/include/freebsd.h
+++ b/include/freebsd.h
@@ -34,10 +34,8 @@
 #define __LITTLE_ENDIAN	LITTLE_ENDIAN
 
 /* FreeBSD file API is 64-bit aware */
-#define fstat64		fstat
 #define ftruncate64	ftruncate
 #define lseek64		lseek
-#define stat64		stat
 #define pwrite64	pwrite
 #define pread64		pread
 #define fdatasync	fsync
diff --git a/io/copy_file_range.c b/io/copy_file_range.c
index eddc634..7ba42b6 100644
--- a/io/copy_file_range.c
+++ b/io/copy_file_range.c
@@ -60,10 +60,10 @@ copy_file_range(int fd, loff_t *src, loff_t *dst, size_t len)
 static off64_t
 copy_src_filesize(int fd)
 {
-	struct stat64 st;
+	struct stat st;
 
-	if (fstat64(fd, &st) < 0) {
-		perror("fstat64");
+	if (fstat(fd, &st) < 0) {
+		perror("fstat");
 		return -1;
 	};
 	return st.st_size;
diff --git a/io/open.c b/io/open.c
index 2303527..d4ec13c 100644
--- a/io/open.c
+++ b/io/open.c
@@ -52,10 +52,10 @@ static long extsize;
 off64_t
 filesize(void)
 {
-	struct stat64	st;
+	struct stat	st;
 
-	if (fstat64(file->fd, &st) < 0) {
-		perror("fstat64");
+	if (fstat(file->fd, &st) < 0) {
+		perror("fstat");
 		return -1;
 	}
 	return st.st_size;
@@ -90,7 +90,7 @@ stat_f(
 {
 	struct dioattr	dio;
 	struct fsxattr	fsx, fsxa;
-	struct stat64	st;
+	struct stat	st;
 	int		verbose = (argc == 2 && !strcmp(argv[1], "-v"));
 
 	printf(_("fd.path = \"%s\"\n"), file->name);
@@ -102,8 +102,8 @@ stat_f(
 		file->flags & IO_APPEND ? _(",append-only") : "",
 		file->flags & IO_NONBLOCK ? _(",non-block") : "",
 		file->flags & IO_TMPFILE ? _(",tmpfile") : "");
-	if (fstat64(file->fd, &st) < 0) {
-		perror("fstat64");
+	if (fstat(file->fd, &st) < 0) {
+		perror("fstat");
 	} else {
 		printf(_("stat.ino = %lld\n"), (long long)st.st_ino);
 		printf(_("stat.type = %s\n"), filetype(st.st_mode));
@@ -574,10 +574,10 @@ static int
 set_extsize(const char *path, int fd, long extsz)
 {
 	struct fsxattr	fsx;
-	struct stat64	stat;
+	struct stat	stat;
 
-	if (fstat64(fd, &stat) < 0) {
-		perror("fstat64");
+	if (fstat(fd, &stat) < 0) {
+		perror("fstat");
 		return 0;
 	}
 	if ((xfsctl(path, fd, FS_IOC_FSGETXATTR, &fsx)) < 0) {
diff --git a/io/sendfile.c b/io/sendfile.c
index 21ab444..c082acf 100644
--- a/io/sendfile.c
+++ b/io/sendfile.c
@@ -133,10 +133,10 @@ sendfile_f(
 			goto done;
 		}
 	} else {
-		struct stat64	stat;
+		struct stat	stat;
 
-		if (fstat64(fd, &stat) < 0) {
-			perror("fstat64");
+		if (fstat(fd, &stat) < 0) {
+			perror("fstat");
 			goto done;
 		}
 		count = stat.st_size;
diff --git a/libxcmd/paths.c b/libxcmd/paths.c
index 71af25f..bd91ae0 100644
--- a/libxcmd/paths.c
+++ b/libxcmd/paths.c
@@ -43,9 +43,9 @@ fs_device_number(
 	const char	*name,
 	dev_t		*devnum)
 {
-	struct stat64	sbuf;
+	struct stat	sbuf;
 
-	if (stat64(name, &sbuf) < 0)
+	if (stat(name, &sbuf) < 0)
 		return errno;
 	/*
 	 * We want to match st_rdev if the path provided is a device
diff --git a/libxfs/darwin.c b/libxfs/darwin.c
index 017e190..bc552ba 100644
--- a/libxfs/darwin.c
+++ b/libxfs/darwin.c
@@ -27,13 +27,13 @@ int platform_has_uuid = 1;
 extern char *progname;
 
 int
-platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose)
+platform_check_ismounted(char *name, char *block, struct stat *s, int verbose)
 {
 	return 0;
 }
 
 int
-platform_check_iswritable(char *name, char *block, struct stat64 *s, int fatal)
+platform_check_iswritable(char *name, char *block, struct stat *s, int fatal)
 {
 	int	fd, writable;
 
@@ -69,9 +69,9 @@ void
 platform_findsizes(char *path, int fd, long long *sz, int *bsz)
 {
 	__uint64_t	size;
-	struct stat64	st;
+	struct stat	st;
 
-	if (fstat64(fd, &st) < 0) {
+	if (fstat(fd, &st) < 0) {
 		fprintf(stderr,
 			_("%s: cannot stat the device file \"%s\": %s\n"),
 			progname, path, strerror(errno));
diff --git a/libxfs/freebsd.c b/libxfs/freebsd.c
index 6c9f089..1f1b5b9 100644
--- a/libxfs/freebsd.c
+++ b/libxfs/freebsd.c
@@ -27,14 +27,14 @@ int platform_has_uuid = 1;
 extern char *progname;
 
 int
-platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose)
+platform_check_ismounted(char *name, char *block, struct stat *s, int verbose)
 {
-	struct stat64	st;
+	struct stat	st;
         int cnt, i;
         struct statfs *fsinfo;
 
 	if (!s) {
-		if (stat64(block, &st) < 0)
+		if (stat(block, &st) < 0)
 			return 0;
 		s = &st;
 	}
@@ -66,7 +66,7 @@ platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose)
 }
 
 int
-platform_check_iswritable(char *name, char *block, struct stat64 *s, int fatal)
+platform_check_iswritable(char *name, char *block, struct stat *s, int fatal)
 {
         int cnt, i;
         struct statfs *fsinfo;
diff --git a/libxfs/init.c b/libxfs/init.c
index e04b6e0..2057320 100644
--- a/libxfs/init.c
+++ b/libxfs/init.c
@@ -65,9 +65,9 @@ static struct dev_to_fd {
 static int
 check_isactive(char *name, char *block, int fatal)
 {
-	struct stat64	st;
+	struct stat	st;
 
-	if (stat64(block, &st) < 0)
+	if (stat(block, &st) < 0)
 		return 0;
 	if ((st.st_mode & S_IFMT) != S_IFBLK)
 		return 0;
@@ -104,7 +104,7 @@ libxfs_device_open(char *path, int creat, int xflags, int setblksize)
 	dev_t		dev;
 	int		fd, d, flags;
 	int		readonly, dio, excl;
-	struct stat64	statb;
+	struct stat	statb;
 
 	readonly = (xflags & LIBXFS_ISREADONLY);
 	excl = (xflags & LIBXFS_EXCLUSIVELY) && !creat;
@@ -124,7 +124,7 @@ retry:
 		exit(1);
 	}
 
-	if (fstat64(fd, &statb) < 0) {
+	if (fstat(fd, &statb) < 0) {
 		fprintf(stderr, _("%s: cannot stat %s: %s\n"),
 			progname, path, strerror(errno));
 		exit(1);
@@ -199,9 +199,9 @@ check_open(char *path, int flags, char **rawfile, char **blockfile)
 	int readonly = (flags & LIBXFS_ISREADONLY);
 	int inactive = (flags & LIBXFS_ISINACTIVE);
 	int dangerously = (flags & LIBXFS_DANGEROUSLY);
-	struct stat64	stbuf;
+	struct stat	stbuf;
 
-	if (stat64(path, &stbuf) < 0) {
+	if (stat(path, &stbuf) < 0) {
 		perror(path);
 		return 0;
 	}
diff --git a/libxfs/init.h b/libxfs/init.h
index 112febb..baf2f68 100644
--- a/libxfs/init.h
+++ b/libxfs/init.h
@@ -18,12 +18,12 @@
 #ifndef LIBXFS_INIT_H
 #define LIBXFS_INIT_H
 
-struct stat64;
+struct stat;
 
 extern int platform_check_ismounted (char *path, char *block,
-					struct stat64 *sptr, int verbose);
+					struct stat *sptr, int verbose);
 extern int platform_check_iswritable (char *path, char *block,
-					struct stat64 *sptr, int fatal);
+					struct stat *sptr, int fatal);
 extern int platform_set_blocksize (int fd, char *path, dev_t device, int bsz, int fatal);
 extern void platform_flush_device (int fd, dev_t device);
 extern char *platform_findrawpath(char *path);
diff --git a/libxfs/irix.c b/libxfs/irix.c
index 65aaa7e..a3bd832 100644
--- a/libxfs/irix.c
+++ b/libxfs/irix.c
@@ -25,13 +25,13 @@ extern char *progname;
 extern __int64_t findsize(char *);
 
 int
-platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose)
+platform_check_ismounted(char *name, char *block, struct stat *s, int verbose)
 {
 	return 0;
 }
 
 int
-platform_check_iswritable(char *name, char *block, struct stat64 *s, int fatal)
+platform_check_iswritable(char *name, char *block, struct stat *s, int fatal)
 {
 	return 1;
 }
@@ -51,9 +51,9 @@ platform_flush_device(int fd, dev_t device)
 void
 platform_findsizes(char *path, int fd, long long *sz, int *bsz)
 {
-	struct stat64		st;
+	struct stat		st;
 
-	if (fstat64(fd, &st) < 0) {
+	if (fstat(fd, &st) < 0) {
 		fprintf(stderr,
 			_("%s: cannot stat the device file \"%s\": %s\n"),
 			progname, path, strerror(errno));
diff --git a/libxfs/linux.c b/libxfs/linux.c
index c9f2baf..7da6dd6 100644
--- a/libxfs/linux.c
+++ b/libxfs/linux.c
@@ -49,14 +49,14 @@ static int max_block_alignment;
 #define PROC_MOUNTED	"/proc/mounts"
 
 int
-platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose)
+platform_check_ismounted(char *name, char *block, struct stat *s, int verbose)
 {
 	/* Pad ust; pre-2.6.28 linux copies out too much in 32bit compat mode */
 	struct ustat	ust[2];
-	struct stat64	st;
+	struct stat	st;
 
 	if (!s) {
-		if (stat64(block, &st) < 0)
+		if (stat(block, &st) < 0)
 			return 0;
 		if ((st.st_mode & S_IFMT) != S_IFBLK)
 			return 0;
@@ -74,11 +74,11 @@ platform_check_ismounted(char *name, char *block, struct stat64 *s, int verbose)
 }
 
 int
-platform_check_iswritable(char *name, char *block, struct stat64 *s, int fatal)
+platform_check_iswritable(char *name, char *block, struct stat *s, int fatal)
 {
 	int		sts = 0;
 	FILE		*f;
-	struct stat64	mst;
+	struct stat	mst;
 	struct mntent	*mnt;
 	char		mounts[MAXPATHLEN];
 
@@ -89,7 +89,7 @@ platform_check_iswritable(char *name, char *block, struct stat64 *s, int fatal)
 			return fatal;
 	}
 	while ((mnt = getmntent(f)) != NULL) {
-		if (stat64(mnt->mnt_fsname, &mst) < 0)
+		if (stat(mnt->mnt_fsname, &mst) < 0)
 			continue;
 		if ((mst.st_mode & S_IFMT) != S_IFBLK)
 			continue;
@@ -125,11 +125,11 @@ platform_set_blocksize(int fd, char *path, dev_t device, int blocksize, int fata
 void
 platform_flush_device(int fd, dev_t device)
 {
-	struct stat64	st;
+	struct stat	st;
 	if (major(device) == RAMDISK_MAJOR)
 		return;
 
-	if (fstat64(fd, &st) < 0)
+	if (fstat(fd, &st) < 0)
 		return;
 
 	if (S_ISREG(st.st_mode))
@@ -141,11 +141,11 @@ platform_flush_device(int fd, dev_t device)
 void
 platform_findsizes(char *path, int fd, long long *sz, int *bsz)
 {
-	struct stat64	st;
+	struct stat	st;
 	__uint64_t	size;
 	int		error;
 
-	if (fstat64(fd, &st) < 0) {
+	if (fstat(fd, &st) < 0) {
 		fprintf(stderr, _("%s: "
 			"cannot stat the device file \"%s\": %s\n"),
 			progname, path, strerror(errno));
diff --git a/mdrestore/xfs_mdrestore.c b/mdrestore/xfs_mdrestore.c
index a22efc2..26d61eb 100644
--- a/mdrestore/xfs_mdrestore.c
+++ b/mdrestore/xfs_mdrestore.c
@@ -197,7 +197,7 @@ usage(void)
 	exit(1);
 }
 
-extern int	platform_check_ismounted(char *, char *, struct stat64 *, int);
+extern int	platform_check_ismounted(char *, char *, struct stat *, int);
 
 int
 main(
@@ -208,7 +208,7 @@ main(
 	int		dst_fd;
 	int		c;
 	int		open_flags;
-	struct stat64	statbuf;
+	struct stat	statbuf;
 	int		is_target_file;
 
 	progname = basename(argv[0]);
@@ -244,7 +244,7 @@ main(
 	/* check and open target */
 	open_flags = O_RDWR;
 	is_target_file = 0;
-	if (stat64(argv[optind], &statbuf) < 0)  {
+	if (stat(argv[optind], &statbuf) < 0)  {
 		/* ok, assume it's a file and create it */
 		open_flags |= O_CREAT;
 		is_target_file = 1;
diff --git a/mkfs/proto.c b/mkfs/proto.c
index 5f7f0b4..7de0a99 100644
--- a/mkfs/proto.c
+++ b/mkfs/proto.c
@@ -782,9 +782,9 @@ static long
 filesize(
 	int		fd)
 {
-	struct stat64	stb;
+	struct stat	stb;
 
-	if (fstat64(fd, &stb) < 0)
+	if (fstat(fd, &stb) < 0)
 		return -1;
 	return (long)stb.st_size;
 }
diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
index 8b02983..8b98a8a 100644
--- a/mkfs/xfs_mkfs.c
+++ b/mkfs/xfs_mkfs.c
@@ -794,7 +794,7 @@ check_device_type(
 	bool		force_overwrite,
 	const char	*optname)
 {
-	struct stat64 statbuf;
+	struct stat statbuf;
 
 	if (*isfile && (no_size || no_name)) {
 		fprintf(stderr,
@@ -808,7 +808,7 @@ check_device_type(
 		usage();
 	}
 
-	if (stat64(name, &statbuf)) {
+	if (stat(name, &statbuf)) {
 		if (errno == ENOENT && *isfile) {
 			if (create)
 				*create = 1;
diff --git a/po/de.po b/po/de.po
index fc62525..61a60f3 100644
--- a/po/de.po
+++ b/po/de.po
@@ -13873,8 +13873,8 @@ msgstr "%s: Dateien zum Kopieren müssen angegeben werden\n"
 
 #: .././rtcp/xfs_rtcp.c:86
 #, c-format
-msgid "%s: stat64 of %s failed\n"
-msgstr "%s: stat64 von %s fehlgeschlagen\n"
+msgid "%s: stat of %s failed\n"
+msgstr "%s: stat von %s fehlgeschlagen\n"
 
 #: .././rtcp/xfs_rtcp.c:93
 #, c-format
@@ -13883,8 +13883,8 @@ msgstr "%s: letztes Argument ist kein Verzeichnis\n"
 
 #: .././rtcp/xfs_rtcp.c:140
 #, c-format
-msgid "%s: failed stat64 on %s: %s\n"
-msgstr "%s: stat64 auf %s fehlgeschlagen: %s\n"
+msgid "%s: failed stat on %s: %s\n"
+msgstr "%s: stat auf %s fehlgeschlagen: %s\n"
 
 #: .././rtcp/xfs_rtcp.c:161
 #, c-format
diff --git a/po/pl.po b/po/pl.po
index a950f77..9d5128f 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -13005,8 +13005,8 @@ msgstr "%s: trzeba podać pliki do skopiowania\n"
 
 #: .././rtcp/xfs_rtcp.c:84
 #, c-format
-msgid "%s: stat64 of %s failed\n"
-msgstr "%s: stat64 na %s nie powiodło się\n"
+msgid "%s: stat of %s failed\n"
+msgstr "%s: stat na %s nie powiodło się\n"
 
 #: .././rtcp/xfs_rtcp.c:91
 #, c-format
@@ -13015,8 +13015,8 @@ msgstr "%s: ostatni argument nie jest katalogiem\n"
 
 #: .././rtcp/xfs_rtcp.c:138
 #, c-format
-msgid "%s: failed stat64 on %s: %s\n"
-msgstr "%s: nie udało się wykonać stat64 na %s: %s\n"
+msgid "%s: failed stat on %s: %s\n"
+msgstr "%s: nie udało się wykonać stat na %s: %s\n"
 
 #: .././rtcp/xfs_rtcp.c:159
 #, c-format
diff --git a/repair/xfs_repair.c b/repair/xfs_repair.c
index 50a1ac9..361bace 100644
--- a/repair/xfs_repair.c
+++ b/repair/xfs_repair.c
@@ -668,9 +668,9 @@ main(int argc, char **argv)
 	/* -f forces this, but let's be nice and autodetect it, as well. */
 	if (!isa_file) {
 		int		fd = libxfs_device_to_fd(x.ddev);
-		struct stat64	statbuf;
+		struct stat	statbuf;
 
-		if (fstat64(fd, &statbuf) < 0)
+		if (fstat(fd, &statbuf) < 0)
 			do_warn(_("%s: couldn't stat \"%s\"\n"),
 				progname, fs_name);
 		else if (S_ISREG(statbuf.st_mode))
diff --git a/rtcp/xfs_rtcp.c b/rtcp/xfs_rtcp.c
index 3044350..705e958 100644
--- a/rtcp/xfs_rtcp.c
+++ b/rtcp/xfs_rtcp.c
@@ -35,7 +35,7 @@ int
 main(int argc, char **argv)
 {
 	int	c, i, r, errflg = 0;
-	struct stat64	s2;
+	struct stat	s2;
 	int		extsize = - 1;
 
 	progname = basename(argv[0]);
@@ -80,8 +80,8 @@ main(int argc, char **argv)
 	 * which really exists.
 	 */
 	if (argc > 2) {
-		if (stat64(argv[argc-1], &s2) < 0) {
-			fprintf(stderr, _("%s: stat64 of %s failed\n"),
+		if (stat(argv[argc-1], &s2) < 0) {
+			fprintf(stderr, _("%s: stat of %s failed\n"),
 				progname, argv[argc-1]);
 			exit(2);
 		}
@@ -115,7 +115,7 @@ rtcp( char *source, char *target, int fextsize)
 	int		remove = 0, rtextsize;
 	char		*sp, *fbuf, *ptr;
 	char		tbuf[ PATH_MAX ];
-	struct stat64	s1, s2;
+	struct stat	s1, s2;
 	struct fsxattr	fsxattr;
 	struct dioattr	dioattr;
 
@@ -134,8 +134,8 @@ rtcp( char *source, char *target, int fextsize)
 			*sp = '\0';
 	}
 
-	if ( stat64(source, &s1) ) {
-		fprintf(stderr, _("%s: failed stat64 on %s: %s\n"),
+	if ( stat(source, &s1) ) {
+		fprintf(stderr, _("%s: failed stat on %s: %s\n"),
 			progname, source, strerror(errno));
 		return( -1);
 	}
@@ -144,7 +144,7 @@ rtcp( char *source, char *target, int fextsize)
 	 * check for a realtime partition
 	 */
 	snprintf(tbuf, sizeof(tbuf), "%s", target);
-	if ( stat64(target, &s2) ) {
+	if ( stat(target, &s2) ) {
 		if (!S_ISDIR(s2.st_mode)) {
 			/* take out target file name */
 			if ((ptr = strrchr(tbuf, '/')) != NULL)
@@ -165,14 +165,14 @@ rtcp( char *source, char *target, int fextsize)
 	 * check if target is a directory
 	 */
 	snprintf(tbuf, sizeof(tbuf), "%s", target);
-	if ( !stat64(target, &s2) ) {
+	if ( !stat(target, &s2) ) {
 		if (S_ISDIR(s2.st_mode)) {
 			snprintf(tbuf, sizeof(tbuf), "%s/%s", target,
 				basename(source));
 		}
 	}
 
-	if ( stat64(tbuf, &s2) ) {
+	if ( stat(tbuf, &s2) ) {
 		/*
 		 * create the file if it does not exist
 		 */
-- 
2.7.3


[-- Attachment #2: Type: text/plain, Size: 121 bytes --]

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCHv2 xfsprogs 05/14] replace ftruncate64 by equivalent ftruncate
  2016-08-13 17:04 [PATCHv2 xfsprogs 00/14] Convert from off64_t to off_t Felix Janda
  2016-08-06 10:45 ` [PATCHv2 xfsprogs 04/14] replace [fl]stat64 by equivalent [fl]stat Felix Janda
@ 2016-08-06 10:45 ` Felix Janda
  2016-08-18 17:38   ` Christoph Hellwig
  2016-08-06 10:45 ` [PATCHv2 xfsprogs 06/14] replace lseek64 by equivalent lseek Felix Janda
                   ` (13 subsequent siblings)
  15 siblings, 1 reply; 37+ messages in thread
From: Felix Janda @ 2016-08-06 10:45 UTC (permalink / raw)
  To: xfs

Signed-off-by: Felix Janda <felix.janda@posteo.de>
---
 copy/xfs_copy.c           | 2 +-
 fsr/xfs_fsr.c             | 2 +-
 include/darwin.h          | 1 -
 include/freebsd.h         | 1 -
 io/copy_file_range.c      | 4 ++--
 io/truncate.c             | 2 +-
 mdrestore/xfs_mdrestore.c | 2 +-
 mkfs/xfs_mkfs.c           | 2 +-
 8 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/copy/xfs_copy.c b/copy/xfs_copy.c
index 55a9e2c..f038c2e 100644
--- a/copy/xfs_copy.c
+++ b/copy/xfs_copy.c
@@ -832,7 +832,7 @@ main(int argc, char **argv)
 		if (write_last_block)  {
 			/* ensure regular files are correctly sized */
 
-			if (ftruncate64(target[i].fd, mp->m_sb.sb_dblocks *
+			if (ftruncate(target[i].fd, mp->m_sb.sb_dblocks *
 						source_blocksize))  {
 				do_log(_("%s:  cannot grow data section.\n"),
 					progname);
diff --git a/fsr/xfs_fsr.c b/fsr/xfs_fsr.c
index 36e0705..d87d020 100644
--- a/fsr/xfs_fsr.c
+++ b/fsr/xfs_fsr.c
@@ -1451,7 +1451,7 @@ packfile(char *fname, char *tname, int fd,
 			}
 		}
 	}
-	if (ftruncate64(tfd, statp->bs_size) < 0) {
+	if (ftruncate(tfd, statp->bs_size) < 0) {
 		fsrprintf(_("could not truncate tmpfile: %s : %s\n"),
 				fname, strerror(errno));
 		goto out;
diff --git a/include/darwin.h b/include/darwin.h
index 8708324..5c149a0 100644
--- a/include/darwin.h
+++ b/include/darwin.h
@@ -144,7 +144,6 @@ typedef int64_t		xfs_daddr_t;
 #define lseek64		lseek
 #define pread64		pread
 #define pwrite64	pwrite
-#define ftruncate64	ftruncate
 #define fdatasync	fsync
 #define memalign(a,sz)	valloc(sz)
 
diff --git a/include/freebsd.h b/include/freebsd.h
index f7ab8fa..f5e7fa9 100644
--- a/include/freebsd.h
+++ b/include/freebsd.h
@@ -34,7 +34,6 @@
 #define __LITTLE_ENDIAN	LITTLE_ENDIAN
 
 /* FreeBSD file API is 64-bit aware */
-#define ftruncate64	ftruncate
 #define lseek64		lseek
 #define pwrite64	pwrite
 #define pread64		pread
diff --git a/io/copy_file_range.c b/io/copy_file_range.c
index 7ba42b6..88203e9 100644
--- a/io/copy_file_range.c
+++ b/io/copy_file_range.c
@@ -72,9 +72,9 @@ copy_src_filesize(int fd)
 static int
 copy_dst_truncate(void)
 {
-	int ret = ftruncate64(file->fd, 0);
+	int ret = ftruncate(file->fd, 0);
 	if (ret < 0)
-		perror("ftruncate64");
+		perror("ftruncate");
 	return ret;
 }
 
diff --git a/io/truncate.c b/io/truncate.c
index f2df168..20bada8 100644
--- a/io/truncate.c
+++ b/io/truncate.c
@@ -38,7 +38,7 @@ truncate_f(
 		return 0;
 	}
 
-	if (ftruncate64(file->fd, offset) < 0) {
+	if (ftruncate(file->fd, offset) < 0) {
 		perror("ftruncate");
 		return 0;
 	}
diff --git a/mdrestore/xfs_mdrestore.c b/mdrestore/xfs_mdrestore.c
index 26d61eb..1540dcd 100644
--- a/mdrestore/xfs_mdrestore.c
+++ b/mdrestore/xfs_mdrestore.c
@@ -124,7 +124,7 @@ perform_restore(
 	if (is_target_file)  {
 		/* ensure regular files are correctly sized */
 
-		if (ftruncate64(dst_fd, sb.sb_dblocks * sb.sb_blocksize))
+		if (ftruncate(dst_fd, sb.sb_dblocks * sb.sb_blocksize))
 			fatal("cannot set filesystem image size: %s\n",
 				strerror(errno));
 	} else  {
diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
index 8b98a8a..5d5fcb7 100644
--- a/mkfs/xfs_mkfs.c
+++ b/mkfs/xfs_mkfs.c
@@ -2815,7 +2815,7 @@ _("size %s specified for log subvolume is too large, maximum is %lld blocks\n"),
 	 * code will succeed.
 	 */
 	if (xi.disfile && xi.dsize * xi.dbsize < dblocks * blocksize) {
-		if (ftruncate64(xi.dfd, dblocks * blocksize) < 0) {
+		if (ftruncate(xi.dfd, dblocks * blocksize) < 0) {
 			fprintf(stderr,
 				_("%s: Growing the data section failed\n"),
 				progname);
-- 
2.7.3

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCHv2 xfsprogs 06/14] replace lseek64 by equivalent lseek
  2016-08-13 17:04 [PATCHv2 xfsprogs 00/14] Convert from off64_t to off_t Felix Janda
  2016-08-06 10:45 ` [PATCHv2 xfsprogs 04/14] replace [fl]stat64 by equivalent [fl]stat Felix Janda
  2016-08-06 10:45 ` [PATCHv2 xfsprogs 05/14] replace ftruncate64 by equivalent ftruncate Felix Janda
@ 2016-08-06 10:45 ` Felix Janda
  2016-08-18 17:38   ` Christoph Hellwig
  2016-08-06 10:45 ` [PATCHv2 xfsprogs 07/14] replace pread64/pwrite64 by equivalent pread/pwrite Felix Janda
                   ` (12 subsequent siblings)
  15 siblings, 1 reply; 37+ messages in thread
From: Felix Janda @ 2016-08-06 10:45 UTC (permalink / raw)
  To: xfs

[-- Attachment #1: Type: text/plain, Size: 11252 bytes --]

Signed-off-by: Felix Janda <felix.janda@posteo.de>
---
 copy/xfs_copy.c     | 10 +++++-----
 fsr/xfs_fsr.c       | 10 +++++-----
 include/darwin.h    |  1 -
 include/freebsd.h   |  1 -
 io/pread.c          |  6 +++---
 io/seek.c           |  6 +++---
 libxfs/rdwr.c       |  2 +-
 logprint/log_misc.c |  4 ++--
 logprint/logprint.c |  2 +-
 po/de.po            | 16 ++++++++--------
 po/pl.po            | 16 ++++++++--------
 repair/sb.c         |  6 +++---
 12 files changed, 39 insertions(+), 41 deletions(-)

diff --git a/copy/xfs_copy.c b/copy/xfs_copy.c
index f038c2e..cc5207d 100644
--- a/copy/xfs_copy.c
+++ b/copy/xfs_copy.c
@@ -162,7 +162,7 @@ check_errors(void)
 			if (target[i].err_type == 0)
 				do_log(_("write error"));
 			else
-				do_log(_("lseek64 error"));
+				do_log(_("lseek error"));
 			do_log(_(" at offset %lld\n"), target[i].position);
 		}
 	}
@@ -192,7 +192,7 @@ do_write(
 		buf = &w_buf;
 
 	if (target[args->id].position != buf->position)  {
-		if (lseek64(args->fd, buf->position, SEEK_SET) < 0)  {
+		if (lseek(args->fd, buf->position, SEEK_SET) < 0)  {
 			error = target[args->id].err_type = 1;
 		} else  {
 			target[args->id].position = buf->position;
@@ -263,7 +263,7 @@ handler(int sig)
 						target[i].position);
 				} else  {
 					do_warn(
-		_("%s:  lseek64 error on target %d \"%s\" at offset %lld\n"),
+		_("%s:  lseek error on target %d \"%s\" at offset %lld\n"),
 						progname, i, target[i].name,
 						target[i].position);
 				}
@@ -388,9 +388,9 @@ read_wbuf(int fd, wbuf *buf, xfs_mount_t *mp)
 	}
 
 	if (source_position != buf->position)  {
-		lres = lseek64(fd, buf->position, SEEK_SET);
+		lres = lseek(fd, buf->position, SEEK_SET);
 		if (lres < 0LL)  {
-			do_warn(_("%s:  lseek64 failure at offset %lld\n"),
+			do_warn(_("%s:  lseek failure at offset %lld\n"),
 				progname, source_position);
 			die_perror();
 		}
diff --git a/fsr/xfs_fsr.c b/fsr/xfs_fsr.c
index d87d020..98390e7 100644
--- a/fsr/xfs_fsr.c
+++ b/fsr/xfs_fsr.c
@@ -1318,7 +1318,7 @@ packfile(char *fname, char *tname, int fd,
 				fsrprintf(_("could not trunc tmp %s\n"),
 					   tname);
 			}
-			if (lseek64(tfd, outmap[extent].bmv_length, SEEK_CUR) < 0) {
+			if (lseek(tfd, outmap[extent].bmv_length, SEEK_CUR) < 0) {
 				fsrprintf(_("could not lseek in tmpfile: %s : %s\n"),
 				   tname, strerror(errno));
 				goto out;
@@ -1338,7 +1338,7 @@ packfile(char *fname, char *tname, int fd,
 					" %s\n"), tname);
 				goto out;
 			}
-			if (lseek64(tfd, outmap[extent].bmv_length, SEEK_CUR) < 0) {
+			if (lseek(tfd, outmap[extent].bmv_length, SEEK_CUR) < 0) {
 				fsrprintf(_("could not lseek in tmpfile: %s : %s\n"),
 				   tname, strerror(errno));
 				goto out;
@@ -1346,7 +1346,7 @@ packfile(char *fname, char *tname, int fd,
 		}
 	} /* end of space allocation loop */
 
-	if (lseek64(tfd, 0, SEEK_SET)) {
+	if (lseek(tfd, 0, SEEK_SET)) {
 		fsrprintf(_("Couldn't rewind on temporary file\n"));
 		goto out;
 	}
@@ -1366,12 +1366,12 @@ packfile(char *fname, char *tname, int fd,
 	for (extent = 0; extent < nextents; extent++) {
 		pos = outmap[extent].bmv_offset;
 		if (outmap[extent].bmv_block == -1) {
-			if (lseek64(tfd, outmap[extent].bmv_length, SEEK_CUR) < 0) {
+			if (lseek(tfd, outmap[extent].bmv_length, SEEK_CUR) < 0) {
 				fsrprintf(_("could not lseek in tmpfile: %s : %s\n"),
 				   tname, strerror(errno));
 				goto out;
 			}
-			if (lseek64(fd, outmap[extent].bmv_length, SEEK_CUR) < 0) {
+			if (lseek(fd, outmap[extent].bmv_length, SEEK_CUR) < 0) {
 				fsrprintf(_("could not lseek in file: %s : %s\n"),
 				   fname, strerror(errno));
 				goto out;
diff --git a/include/darwin.h b/include/darwin.h
index 5c149a0..850d733 100644
--- a/include/darwin.h
+++ b/include/darwin.h
@@ -141,7 +141,6 @@ typedef u_int64_t	xfs_ino_t;
 typedef u_int32_t	xfs_dev_t;
 typedef int64_t		xfs_daddr_t;
 
-#define lseek64		lseek
 #define pread64		pread
 #define pwrite64	pwrite
 #define fdatasync	fsync
diff --git a/include/freebsd.h b/include/freebsd.h
index f5e7fa9..784e287 100644
--- a/include/freebsd.h
+++ b/include/freebsd.h
@@ -34,7 +34,6 @@
 #define __LITTLE_ENDIAN	LITTLE_ENDIAN
 
 /* FreeBSD file API is 64-bit aware */
-#define lseek64		lseek
 #define pwrite64	pwrite
 #define pread64		pread
 #define fdatasync	fsync
diff --git a/io/pread.c b/io/pread.c
index b98355f..cafead0 100644
--- a/io/pread.c
+++ b/io/pread.c
@@ -233,7 +233,7 @@ read_random(
 	int		ops = 0;
 
 	srandom(seed);
-	end = lseek64(fd, 0, SEEK_END);
+	end = lseek(fd, 0, SEEK_END);
 	offset = (eof || offset > end) ? end : offset;
 	if ((bytes = (offset % buffersize)))
 		offset -= bytes;
@@ -279,8 +279,8 @@ read_backward(
 	long long	cnt = *count;
 	int		ops = 0;
 
-	end = lseek64(fd, 0, SEEK_END);
-	off = eof ? end : min(end, lseek64(fd, off, SEEK_SET));
+	end = lseek(fd, 0, SEEK_END);
+	off = eof ? end : min(end, lseek(fd, off, SEEK_SET));
 	if ((end = off - cnt) < 0) {
 		cnt += end;	/* subtraction, end is negative */
 		end = 0;
diff --git a/io/seek.c b/io/seek.c
index 35a369e..d06375d 100644
--- a/io/seek.c
+++ b/io/seek.c
@@ -147,7 +147,7 @@ seek_f(
 	 * decide if we want to display that type of entry.
 	 */
 	if (flag & SEEK_HFLAG) {
-		offset = lseek64(file->fd, start, SEEK_HOLE);
+		offset = lseek(file->fd, start, SEEK_HOLE);
 		if ((start == offset) || !(flag & SEEK_DFLAG)) {
 			/*
 			 * this offset is a hole or are only displaying holes.
@@ -162,7 +162,7 @@ seek_f(
 
 	/* The offset is not a hole, or we are looking just for data */
 	current = DATA;
-	offset = lseek64(file->fd, start, SEEK_DATA);
+	offset = lseek(file->fd, start, SEEK_DATA);
 
 found_hole:
 	/*
@@ -202,7 +202,7 @@ found_hole:
 
 		current ^= 1;		/* alternate between data and hole */
 		start = offset;
-		offset = lseek64(file->fd, start, seekinfo[current].seektype);
+		offset = lseek(file->fd, start, seekinfo[current].seektype);
 	}
 	return 0;
 }
diff --git a/libxfs/rdwr.c b/libxfs/rdwr.c
index 0ec38c5..cb74b3c 100644
--- a/libxfs/rdwr.c
+++ b/libxfs/rdwr.c
@@ -88,7 +88,7 @@ libxfs_device_zero(struct xfs_buftarg *btp, xfs_daddr_t start, uint len)
 	fd = libxfs_device_to_fd(btp->dev);
 	start_offset = LIBXFS_BBTOOFF64(start);
 
-	if ((lseek64(fd, start_offset, SEEK_SET)) < 0) {
+	if ((lseek(fd, start_offset, SEEK_SET)) < 0) {
 		fprintf(stderr, _("%s: %s seek to offset %llu failed: %s\n"),
 			progname, __FUNCTION__,
 			(unsigned long long)start_offset, strerror(errno));
diff --git a/logprint/log_misc.c b/logprint/log_misc.c
index e6ee832..8a687d5 100644
--- a/logprint/log_misc.c
+++ b/logprint/log_misc.c
@@ -887,8 +887,8 @@ xlog_print_lseek(struct xlog *log, int fd, xfs_daddr_t blkno, int whence)
 		offset = BBTOOFF64(blkno+log->l_logBBstart);
 	else
 		offset = BBTOOFF64(blkno);
-	if (lseek64(fd, offset, whence) < 0) {
-		fprintf(stderr, _("%s: lseek64 to %lld failed: %s\n"),
+	if (lseek(fd, offset, whence) < 0) {
+		fprintf(stderr, _("%s: lseek to %lld failed: %s\n"),
 			progname, (long long)offset, strerror(errno));
 		exit(1);
 	}
diff --git a/logprint/logprint.c b/logprint/logprint.c
index a5c9b32..37b8cb9 100644
--- a/logprint/logprint.c
+++ b/logprint/logprint.c
@@ -80,7 +80,7 @@ logstat(xfs_mount_t *mp)
 			x.dname, strerror(errno));
 		exit(1);
 	}
-	lseek64(fd, 0, SEEK_SET);
+	lseek(fd, 0, SEEK_SET);
 	if (read(fd, buf, sizeof(buf)) != sizeof(buf)) {
 		fprintf(stderr, _("    read of XFS superblock failed\n"));
 		exit(1);
diff --git a/po/de.po b/po/de.po
index 61a60f3..ff1930e 100644
--- a/po/de.po
+++ b/po/de.po
@@ -45,8 +45,8 @@ msgid "write error"
 msgstr "Schreibfehler"
 
 #: .././copy/xfs_copy.c:146
-msgid "lseek64 error"
-msgstr "lseek64-Fehler"
+msgid "lseek error"
+msgstr "lseek-Fehler"
 
 #: .././copy/xfs_copy.c:147
 #, c-format
@@ -70,8 +70,8 @@ msgstr "%s: Schreibfehler auf Ziel %d »%s« bei Versatz %lld\n"
 
 #: .././copy/xfs_copy.c:260
 #, c-format
-msgid "%s:  lseek64 error on target %d \"%s\" at offset %lld\n"
-msgstr "%s: lseek64-Fehler auf Ziel %d »%s« bei Versatz %lld\n"
+msgid "%s:  lseek error on target %d \"%s\" at offset %lld\n"
+msgstr "%s: lseek-Fehler auf Ziel %d »%s« bei Versatz %lld\n"
 
 #: .././copy/xfs_copy.c:266
 #, c-format
@@ -104,8 +104,8 @@ msgstr "Aufruf: %s [-bd] [-L Protokolldatei] Quelle Ziel [Ziel ...]\n"
 
 #: .././copy/xfs_copy.c:386
 #, c-format
-msgid "%s:  lseek64 failure at offset %lld\n"
-msgstr "%s:  lseek64-Fehlschlag bei Versatz %lld\n"
+msgid "%s:  lseek failure at offset %lld\n"
+msgstr "%s:  lseek-Fehlschlag bei Versatz %lld\n"
 
 #: .././copy/xfs_copy.c:401
 #, c-format
@@ -6472,8 +6472,8 @@ msgstr "DQUOT: Magische 0x%hx Markierungen 0%ho\n"
 
 #: .././logprint/log_misc.c:821
 #, c-format
-msgid "%s: lseek64 to %lld failed: %s\n"
-msgstr "%s: lseek64 auf %lld fehlgeschlagen: %s\n"
+msgid "%s: lseek to %lld failed: %s\n"
+msgstr "%s: lseek auf %lld fehlgeschlagen: %s\n"
 
 #: .././logprint/log_misc.c:864
 #, c-format
diff --git a/po/pl.po b/po/pl.po
index 9d5128f..33a9d81 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -44,8 +44,8 @@ msgid "write error"
 msgstr "błąd zapisu"
 
 #: .././copy/xfs_copy.c:146
-msgid "lseek64 error"
-msgstr "błąd lseek64"
+msgid "lseek error"
+msgstr "błąd lseek"
 
 #: .././copy/xfs_copy.c:147
 #, c-format
@@ -69,8 +69,8 @@ msgstr "%s: błąd zapisu przy celu %d \"%s\" pod offsetem %lld\n"
 
 #: .././copy/xfs_copy.c:241
 #, c-format
-msgid "%s:  lseek64 error on target %d \"%s\" at offset %lld\n"
-msgstr "%s: błąd lseek64 przy celu %d \"%s\" pod offsetem %lld\n"
+msgid "%s:  lseek error on target %d \"%s\" at offset %lld\n"
+msgstr "%s: błąd lseek przy celu %d \"%s\" pod offsetem %lld\n"
 
 #: .././copy/xfs_copy.c:247
 #, c-format
@@ -103,8 +103,8 @@ msgstr "Składnia: %s [-bdV] [-L plik_logu] źródło cel [cel ...]\n"
 
 #: .././copy/xfs_copy.c:367
 #, c-format
-msgid "%s:  lseek64 failure at offset %lld\n"
-msgstr "%s: niepowodzenie lseek64 pod offsetem %lld\n"
+msgid "%s:  lseek failure at offset %lld\n"
+msgstr "%s: niepowodzenie lseek pod offsetem %lld\n"
 
 #: .././copy/xfs_copy.c:382
 #, c-format
@@ -6394,8 +6394,8 @@ msgstr ""
 
 #: .././logprint/log_misc.c:863
 #, c-format
-msgid "%s: lseek64 to %lld failed: %s\n"
-msgstr "%s: lseek64 na %lld nie powiodło się: %s\n"
+msgid "%s: lseek to %lld failed: %s\n"
+msgstr "%s: lseek na %lld nie powiodło się: %s\n"
 
 #: .././logprint/log_misc.c:909
 #, c-format
diff --git a/repair/sb.c b/repair/sb.c
index a8170ba..ad1a29f 100644
--- a/repair/sb.c
+++ b/repair/sb.c
@@ -138,7 +138,7 @@ __find_secondary_sb(
 		/*
 		 * read disk 1 MByte at a time.
 		 */
-		if (lseek64(x.dfd, off, SEEK_SET) != off)  {
+		if (lseek(x.dfd, off, SEEK_SET) != off)  {
 			done = 1;
 		}
 
@@ -512,7 +512,7 @@ write_primary_sb(xfs_sb_t *sbp, int size)
 	}
 	memset(buf, 0, size);
 
-	if (lseek64(x.dfd, 0LL, SEEK_SET) != 0LL) {
+	if (lseek(x.dfd, 0LL, SEEK_SET) != 0LL) {
 		free(buf);
 		do_error(_("couldn't seek to offset 0 in filesystem\n"));
 	}
@@ -551,7 +551,7 @@ get_sb(xfs_sb_t *sbp, xfs_off_t off, int size, xfs_agnumber_t agno)
 
 	/* try and read it first */
 
-	if (lseek64(x.dfd, off, SEEK_SET) != off)  {
+	if (lseek(x.dfd, off, SEEK_SET) != off)  {
 		do_warn(
 	_("error reading superblock %u -- seek to offset %" PRId64 " failed\n"),
 			agno, off);
-- 
2.7.3


[-- Attachment #2: Type: text/plain, Size: 121 bytes --]

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCHv2 xfsprogs 07/14] replace pread64/pwrite64 by equivalent pread/pwrite
  2016-08-13 17:04 [PATCHv2 xfsprogs 00/14] Convert from off64_t to off_t Felix Janda
                   ` (2 preceding siblings ...)
  2016-08-06 10:45 ` [PATCHv2 xfsprogs 06/14] replace lseek64 by equivalent lseek Felix Janda
@ 2016-08-06 10:45 ` Felix Janda
  2016-08-18 17:39   ` Christoph Hellwig
  2016-08-06 11:03 ` [PATCHv2 xfsprogs 08/14] replace sendfile64 by equivalent sendfile Felix Janda
                   ` (11 subsequent siblings)
  15 siblings, 1 reply; 37+ messages in thread
From: Felix Janda @ 2016-08-06 10:45 UTC (permalink / raw)
  To: xfs

[-- Attachment #1: Type: text/plain, Size: 7488 bytes --]

Signed-off-by: Felix Janda <felix.janda@posteo.de>
---
 copy/xfs_copy.c           |  2 +-
 include/darwin.h          |  2 --
 include/freebsd.h         |  2 --
 io/pread.c                | 10 +++++-----
 io/pwrite.c               | 10 +++++-----
 libxfs/rdwr.c             |  8 ++++----
 mdrestore/xfs_mdrestore.c |  4 ++--
 mkfs/xfs_mkfs.c           |  2 +-
 po/de.po                  |  4 ++--
 po/pl.po                  |  8 ++++----
 repair/prefetch.c         |  2 +-
 11 files changed, 25 insertions(+), 29 deletions(-)

diff --git a/copy/xfs_copy.c b/copy/xfs_copy.c
index cc5207d..816ab29 100644
--- a/copy/xfs_copy.c
+++ b/copy/xfs_copy.c
@@ -860,7 +860,7 @@ main(int argc, char **argv)
 
 			off = mp->m_sb.sb_dblocks * source_blocksize;
 			off -= sizeof(lb);
-			if (pwrite64(target[i].fd, lb, sizeof(lb), off) < 0)  {
+			if (pwrite(target[i].fd, lb, sizeof(lb), off) < 0)  {
 				do_log(_("%s:  failed to write last block\n"),
 					progname);
 				do_log(_("\tIs target \"%s\" too small?\n"),
diff --git a/include/darwin.h b/include/darwin.h
index 850d733..fb13915 100644
--- a/include/darwin.h
+++ b/include/darwin.h
@@ -141,8 +141,6 @@ typedef u_int64_t	xfs_ino_t;
 typedef u_int32_t	xfs_dev_t;
 typedef int64_t		xfs_daddr_t;
 
-#define pread64		pread
-#define pwrite64	pwrite
 #define fdatasync	fsync
 #define memalign(a,sz)	valloc(sz)
 
diff --git a/include/freebsd.h b/include/freebsd.h
index 784e287..df924ef 100644
--- a/include/freebsd.h
+++ b/include/freebsd.h
@@ -34,8 +34,6 @@
 #define __LITTLE_ENDIAN	LITTLE_ENDIAN
 
 /* FreeBSD file API is 64-bit aware */
-#define pwrite64	pwrite
-#define pread64		pread
 #define fdatasync	fsync
 #define memalign(a,sz)	valloc(sz)
 
diff --git a/io/pread.c b/io/pread.c
index cafead0..3395503 100644
--- a/io/pread.c
+++ b/io/pread.c
@@ -214,7 +214,7 @@ do_pread(
 	ssize_t		buffer_size)
 {
 	if (!vectors)
-		return pread64(fd, buffer, min(count, buffer_size), offset);
+		return pread(fd, buffer, min(count, buffer_size), offset);
 
 	return do_preadv(fd, offset, count, buffer_size);
 }
@@ -254,7 +254,7 @@ read_random(
 		if (bytes == 0)
 			break;
 		if (bytes < 0) {
-			perror("pread64");
+			perror("pread");
 			return -1;
 		}
 		ops++;
@@ -296,7 +296,7 @@ read_backward(
 		if (bytes == 0)
 			return ops;
 		if (bytes < 0) {
-			perror("pread64");
+			perror("pread");
 			return -1;
 		}
 		ops++;
@@ -314,7 +314,7 @@ read_backward(
 		if (bytes == 0)
 			break;
 		if (bytes < 0) {
-			perror("pread64");
+			perror("pread");
 			return -1;
 		}
 		ops++;
@@ -345,7 +345,7 @@ read_forward(
 		if (bytes == 0)
 			break;
 		if (bytes < 0) {
-			perror("pread64");
+			perror("pread");
 			return -1;
 		}
 		ops++;
diff --git a/io/pwrite.c b/io/pwrite.c
index 67631ce..7c0bb7f 100644
--- a/io/pwrite.c
+++ b/io/pwrite.c
@@ -101,7 +101,7 @@ do_pwrite(
 	ssize_t		buffer_size)
 {
 	if (!vectors)
-		return pwrite64(fd, buffer, min(count, buffer_size), offset);
+		return pwrite(fd, buffer, min(count, buffer_size), offset);
 
 	return do_pwritev(fd, offset, count, buffer_size);
 }
@@ -137,7 +137,7 @@ write_random(
 		if (bytes == 0)
 			break;
 		if (bytes < 0) {
-			perror("pwrite64");
+			perror("pwrite");
 			return -1;
 		}
 		ops++;
@@ -175,7 +175,7 @@ write_backward(
 		if (bytes == 0)
 			return ops;
 		if (bytes < 0) {
-			perror("pwrite64");
+			perror("pwrite");
 			return -1;
 		}
 		ops++;
@@ -193,7 +193,7 @@ write_backward(
 		if (bytes == 0)
 			break;
 		if (bytes < 0) {
-			perror("pwrite64");
+			perror("pwrite");
 			return -1;
 		}
 		ops++;
@@ -228,7 +228,7 @@ write_buffer(
 		if (bytes == 0)
 			break;
 		if (bytes < 0) {
-			perror("pwrite64");
+			perror("pwrite");
 			return -1;
 		}
 		ops++;
diff --git a/libxfs/rdwr.c b/libxfs/rdwr.c
index cb74b3c..8e9d86a 100644
--- a/libxfs/rdwr.c
+++ b/libxfs/rdwr.c
@@ -915,7 +915,7 @@ __read_buf(int fd, void *buf, int len, off64_t offset, int flags)
 {
 	int	sts;
 
-	sts = pread64(fd, buf, len, offset);
+	sts = pread(fd, buf, len, offset);
 	if (sts < 0) {
 		int error = errno;
 		fprintf(stderr, _("%s: read failed: %s\n"),
@@ -1083,16 +1083,16 @@ __write_buf(int fd, void *buf, int len, off64_t offset, int flags)
 {
 	int	sts;
 
-	sts = pwrite64(fd, buf, len, offset);
+	sts = pwrite(fd, buf, len, offset);
 	if (sts < 0) {
 		int error = errno;
-		fprintf(stderr, _("%s: pwrite64 failed: %s\n"),
+		fprintf(stderr, _("%s: pwrite failed: %s\n"),
 			progname, strerror(error));
 		if (flags & LIBXFS_B_EXIT)
 			exit(1);
 		return -error;
 	} else if (sts != len) {
-		fprintf(stderr, _("%s: error - pwrite64 only %d of %d bytes\n"),
+		fprintf(stderr, _("%s: error - pwrite only %d of %d bytes\n"),
 			progname, sts, len);
 		if (flags & LIBXFS_B_EXIT)
 			exit(1);
diff --git a/mdrestore/xfs_mdrestore.c b/mdrestore/xfs_mdrestore.c
index 1540dcd..0d399f1 100644
--- a/mdrestore/xfs_mdrestore.c
+++ b/mdrestore/xfs_mdrestore.c
@@ -134,7 +134,7 @@ perform_restore(
 		off64_t		off;
 
 		off = sb.sb_dblocks * sb.sb_blocksize - sizeof(lb);
-		if (pwrite64(dst_fd, lb, sizeof(lb), off) < 0)
+		if (pwrite(dst_fd, lb, sizeof(lb), off) < 0)
 			fatal("failed to write last block, is target too "
 				"small? (error: %s)\n", strerror(errno));
 	}
@@ -146,7 +146,7 @@ perform_restore(
 			print_progress("%lld MB read", bytes_read >> 20);
 
 		for (cur_index = 0; cur_index < mb_count; cur_index++) {
-			if (pwrite64(dst_fd, &block_buffer[cur_index <<
+			if (pwrite(dst_fd, &block_buffer[cur_index <<
 					tmb.mb_blocklog], block_size,
 					be64_to_cpu(block_index[cur_index]) <<
 						BBSHIFT) < 0)
diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
index 5d5fcb7..e038d48 100644
--- a/mkfs/xfs_mkfs.c
+++ b/mkfs/xfs_mkfs.c
@@ -1111,7 +1111,7 @@ zero_old_xfs_structures(
 	off = 0;
 	for (i = 1; i < sb.sb_agcount; i++)  {
 		off += sb.sb_agblocks;
-		if (pwrite64(xi->dfd, buf, new_sb->sb_sectsize,
+		if (pwrite(xi->dfd, buf, new_sb->sb_sectsize,
 					off << sb.sb_blocklog) == -1)
 			break;
 	}
diff --git a/po/de.po b/po/de.po
index ff1930e..fab2667 100644
--- a/po/de.po
+++ b/po/de.po
@@ -5893,8 +5893,8 @@ msgstr "%s: lesen fehlgeschlagen: %s\n"
 
 #: .././libxfs/rdwr.c:502
 #, c-format
-msgid "%s: pwrite64 failed: %s\n"
-msgstr "%s: pwrite64 fehlgeschlagen: %s\n"
+msgid "%s: pwrite failed: %s\n"
+msgstr "%s: pwrite fehlgeschlagen: %s\n"
 
 #: .././libxfs/rdwr.c:509
 #, c-format
diff --git a/po/pl.po b/po/pl.po
index 33a9d81..49209f3 100644
--- a/po/pl.po
+++ b/po/pl.po
@@ -5940,13 +5940,13 @@ msgstr "%s: błąd - odczytano tylko %d z %d bajtów\n"
 
 #: .././libxfs/rdwr.c:878
 #, c-format
-msgid "%s: pwrite64 failed: %s\n"
-msgstr "%s: pwrite64 nie powiodło się: %s\n"
+msgid "%s: pwrite failed: %s\n"
+msgstr "%s: pwrite nie powiodło się: %s\n"
 
 #: .././libxfs/rdwr.c:884
 #, c-format
-msgid "%s: error - pwrite64 only %d of %d bytes\n"
-msgstr "%s: błąd - wykonano pwrite64 tylko %d z %d bajtów\n"
+msgid "%s: error - pwrite only %d of %d bytes\n"
+msgstr "%s: błąd - wykonano pwrite tylko %d z %d bajtów\n"
 
 #: .././libxfs/rdwr.c:920
 #, c-format
diff --git a/repair/prefetch.c b/repair/prefetch.c
index b4f20d9..175594c 100644
--- a/repair/prefetch.c
+++ b/repair/prefetch.c
@@ -565,7 +565,7 @@ pf_batch_read(
 		/*
 		 * now read the data and put into the xfs_but_t's
 		 */
-		len = pread64(mp_fd, buf, (int)(last_off - first_off), first_off);
+		len = pread(mp_fd, buf, (int)(last_off - first_off), first_off);
 
 		/*
 		 * Check the last buffer on the list to see if we need to
-- 
2.7.3


[-- Attachment #2: Type: text/plain, Size: 121 bytes --]

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCHv2 xfsprogs 08/14] replace sendfile64 by equivalent sendfile
  2016-08-13 17:04 [PATCHv2 xfsprogs 00/14] Convert from off64_t to off_t Felix Janda
                   ` (3 preceding siblings ...)
  2016-08-06 10:45 ` [PATCHv2 xfsprogs 07/14] replace pread64/pwrite64 by equivalent pread/pwrite Felix Janda
@ 2016-08-06 11:03 ` Felix Janda
  2016-08-18 17:39   ` Christoph Hellwig
  2016-08-07  5:21 ` [PATCHv2 xfsprogs 01/14] configure: use AC_SYS_LARGEFILE Felix Janda
                   ` (10 subsequent siblings)
  15 siblings, 1 reply; 37+ messages in thread
From: Felix Janda @ 2016-08-06 11:03 UTC (permalink / raw)
  To: xfs

Signed-off-by: Felix Janda <felix.janda@posteo.de>
---
 io/sendfile.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/io/sendfile.c b/io/sendfile.c
index c082acf..edd31c9 100644
--- a/io/sendfile.c
+++ b/io/sendfile.c
@@ -56,11 +56,11 @@ send_buffer(
 
 	*total = 0;
 	while (count > 0) {
-		bytes = sendfile64(file->fd, fd, &off, bytes_remaining);
+		bytes = sendfile(file->fd, fd, &off, bytes_remaining);
 		if (bytes == 0)
 			break;
 		if (bytes < 0) {
-			perror("sendfile64");
+			perror("sendfile");
 			return -1;
 		}
 		ops++;
-- 
2.7.3

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCHv2 xfsprogs 01/14] configure: use AC_SYS_LARGEFILE
  2016-08-13 17:04 [PATCHv2 xfsprogs 00/14] Convert from off64_t to off_t Felix Janda
                   ` (4 preceding siblings ...)
  2016-08-06 11:03 ` [PATCHv2 xfsprogs 08/14] replace sendfile64 by equivalent sendfile Felix Janda
@ 2016-08-07  5:21 ` Felix Janda
  2016-08-18 17:37   ` Christoph Hellwig
  2016-08-07  5:28 ` [PATCHv2 xfsprogs 03/14] remove unecessary definitions of _FILE_OFFSET_BITS Felix Janda
                   ` (9 subsequent siblings)
  15 siblings, 1 reply; 37+ messages in thread
From: Felix Janda @ 2016-08-07  5:21 UTC (permalink / raw)
  To: xfs

The autoconf macro AC_SYS_LARGEFILE defines _FILE_OFFSET_BITS=64
where necessary to ensure that off_t and all interfaces using off_t
are 64bit, even on 32bit systems.

Signed-off-by: Felix Janda <felix.janda@posteo.de>
---
 configure.ac | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configure.ac b/configure.ac
index 1bb5fef..8fa96a5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -107,6 +107,8 @@ AC_PACKAGE_UTILITIES(xfsprogs)
 AC_MULTILIB($enable_lib64)
 AC_RT($enable_librt)
 
+AC_SYS_LARGEFILE
+
 AC_PACKAGE_NEED_UUID_H
 AC_PACKAGE_NEED_UUIDCOMPARE
 
-- 
2.7.3

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCHv2 xfsprogs 03/14] remove unecessary definitions of _FILE_OFFSET_BITS
  2016-08-13 17:04 [PATCHv2 xfsprogs 00/14] Convert from off64_t to off_t Felix Janda
                   ` (5 preceding siblings ...)
  2016-08-07  5:21 ` [PATCHv2 xfsprogs 01/14] configure: use AC_SYS_LARGEFILE Felix Janda
@ 2016-08-07  5:28 ` Felix Janda
  2016-08-18 17:38   ` Christoph Hellwig
  2016-08-07  5:52 ` [PATCHv2 xfsprogs 14/14] platform: remove use of off64_t Felix Janda
                   ` (8 subsequent siblings)
  15 siblings, 1 reply; 37+ messages in thread
From: Felix Janda @ 2016-08-07  5:28 UTC (permalink / raw)
  To: xfs

now that we use AC_SYS_LARGEFILE, there is no need to explicitly
define _FILE_OFFSET_BITS.

Signed-off-by: Felix Janda <felix.janda@posteo.de>
---
 include/builddefs.in  | 2 +-
 m4/package_libcdev.m4 | 9 ---------
 2 files changed, 1 insertion(+), 10 deletions(-)

diff --git a/include/builddefs.in b/include/builddefs.in
index 7153d7a..d406615 100644
--- a/include/builddefs.in
+++ b/include/builddefs.in
@@ -114,7 +114,7 @@ GCCFLAGS = -funsigned-char -fno-strict-aliasing -Wall
 #	   -Wbitwise -Wno-transparent-union -Wno-old-initializer -Wno-decl
 
 ifeq ($(PKG_PLATFORM),linux)
-PCFLAGS = -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $(GCCFLAGS)
+PCFLAGS = -D_GNU_SOURCE $(GCCFLAGS)
 ifeq ($(HAVE_UMODE_T),yes)
 PCFLAGS += -DHAVE_UMODE_T
 endif
diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4
index 6c94475..0999c8b 100644
--- a/m4/package_libcdev.m4
+++ b/m4/package_libcdev.m4
@@ -5,7 +5,6 @@ AC_DEFUN([AC_HAVE_FADVISE],
   [ AC_MSG_CHECKING([for fadvise ])
     AC_TRY_COMPILE([
 #define _GNU_SOURCE
-#define _FILE_OFFSET_BITS 64
 #include <fcntl.h>
     ], [
 	posix_fadvise(0, 1, 0, POSIX_FADV_NORMAL);
@@ -22,7 +21,6 @@ AC_DEFUN([AC_HAVE_MADVISE],
   [ AC_MSG_CHECKING([for madvise ])
     AC_TRY_COMPILE([
 #define _GNU_SOURCE
-#define _FILE_OFFSET_BITS 64
 #include <sys/mman.h>
     ], [
 	posix_madvise(0, 0, MADV_NORMAL);
@@ -39,7 +37,6 @@ AC_DEFUN([AC_HAVE_MINCORE],
   [ AC_MSG_CHECKING([for mincore ])
     AC_TRY_COMPILE([
 #define _GNU_SOURCE
-#define _FILE_OFFSET_BITS 64
 #include <sys/mman.h>
     ], [
 	mincore(0, 0, 0);
@@ -56,7 +53,6 @@ AC_DEFUN([AC_HAVE_SENDFILE],
   [ AC_MSG_CHECKING([for sendfile ])
     AC_TRY_COMPILE([
 #define _GNU_SOURCE
-#define _FILE_OFFSET_BITS 64
 #include <sys/sendfile.h>
     ], [
          sendfile(0, 0, 0, 0);
@@ -106,7 +102,6 @@ AC_DEFUN([AC_HAVE_FALLOCATE],
   [ AC_MSG_CHECKING([for fallocate])
     AC_TRY_LINK([
 #define _GNU_SOURCE
-#define _FILE_OFFSET_BITS 64
 #include <fcntl.h>
 #include <linux/falloc.h>
     ], [
@@ -124,7 +119,6 @@ AC_DEFUN([AC_HAVE_FIEMAP],
   [ AC_MSG_CHECKING([for fiemap])
     AC_TRY_LINK([
 #define _GNU_SOURCE
-#define _FILE_OFFSET_BITS 64
 #include <linux/fs.h>
 #include <linux/fiemap.h>
     ], [
@@ -142,7 +136,6 @@ AC_DEFUN([AC_HAVE_FIEMAP],
 AC_DEFUN([AC_HAVE_PREADV],
   [ AC_MSG_CHECKING([for preadv])
     AC_TRY_LINK([
-#define _FILE_OFFSET_BITS 64
 #define _BSD_SOURCE
 #include <sys/uio.h>
     ], [
@@ -177,7 +170,6 @@ AC_DEFUN([AC_HAVE_SYNC_FILE_RANGE],
   [ AC_MSG_CHECKING([for sync_file_range])
     AC_TRY_LINK([
 #define _GNU_SOURCE
-#define _FILE_OFFSET_BITS 64
 #include <fcntl.h>
     ], [
          sync_file_range(0, 0, 0, 0);
@@ -194,7 +186,6 @@ AC_DEFUN([AC_HAVE_SYNCFS],
   [ AC_MSG_CHECKING([for syncfs])
     AC_TRY_LINK([
 #define _GNU_SOURCE
-#define _FILE_OFFSET_BITS 64
 #include <unistd.h>
     ], [
          syncfs(0);
-- 
2.7.3

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCHv2 xfsprogs 14/14] platform: remove use of off64_t
  2016-08-13 17:04 [PATCHv2 xfsprogs 00/14] Convert from off64_t to off_t Felix Janda
                   ` (6 preceding siblings ...)
  2016-08-07  5:28 ` [PATCHv2 xfsprogs 03/14] remove unecessary definitions of _FILE_OFFSET_BITS Felix Janda
@ 2016-08-07  5:52 ` Felix Janda
  2016-08-18 17:45   ` Christoph Hellwig
  2016-08-13 16:03 ` [PATCHv2 xfsprogs 13/14] xfs.h: require transparent LFS for all users Felix Janda
                   ` (7 subsequent siblings)
  15 siblings, 1 reply; 37+ messages in thread
From: Felix Janda @ 2016-08-07  5:52 UTC (permalink / raw)
  To: xfs

Since we force transparent LFS it can be replaced by off_t.

Signed-off-by: Felix Janda <felix.janda@posteo.de>
---
 include/darwin.h  | 1 -
 include/freebsd.h | 1 -
 include/irix.h    | 2 +-
 include/linux.h   | 2 +-
 4 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/include/darwin.h b/include/darwin.h
index 495b44b..418d90a 100644
--- a/include/darwin.h
+++ b/include/darwin.h
@@ -134,7 +134,6 @@ typedef signed long long int	__s64;
 #define __uint16_t	u_int16_t
 #define __uint32_t	u_int32_t
 #define __uint64_t	u_int64_t
-#define off64_t		off_t
 
 typedef off_t		xfs_off_t;
 typedef u_int64_t	xfs_ino_t;
diff --git a/include/freebsd.h b/include/freebsd.h
index df924ef..93a9204 100644
--- a/include/freebsd.h
+++ b/include/freebsd.h
@@ -41,7 +41,6 @@
 #define EFSBADCRC	991	/* Bad CRC detected */
 
 typedef off_t		xfs_off_t;
-typedef off_t		off64_t;
 typedef __uint64_t	xfs_ino_t;
 typedef __uint32_t	xfs_dev_t;
 typedef __int64_t	xfs_daddr_t;
diff --git a/include/irix.h b/include/irix.h
index b92e01b..a212505 100644
--- a/include/irix.h
+++ b/include/irix.h
@@ -43,7 +43,7 @@
 #define __int16_t	short
 #define __uint8_t	unsigned char
 #define __uint16_t	unsigned short
-typedef off64_t		xfs_off_t;
+typedef off_t		xfs_off_t;
 typedef __int64_t	xfs_ino_t;
 typedef __int32_t	xfs_dev_t;
 typedef __int64_t	xfs_daddr_t;
diff --git a/include/linux.h b/include/linux.h
index 5614719..ed388ea 100644
--- a/include/linux.h
+++ b/include/linux.h
@@ -137,7 +137,7 @@ platform_discard_blocks(int fd, uint64_t start, uint64_t len)
 #define EFSCORRUPTED	EUCLEAN	/* Filesystem is corrupted */
 #define EFSBADCRC	EBADMSG	/* Bad CRC detected */
 
-typedef off64_t		xfs_off_t;
+typedef off_t		xfs_off_t;
 typedef __uint64_t	xfs_ino_t;
 typedef __uint32_t	xfs_dev_t;
 typedef __int64_t	xfs_daddr_t;
-- 
2.7.3

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCHv2 xfsprogs 09/14] fadvise.c: replace posix_fadvise64 by equivalent posix_fadvise
  2016-08-13 17:04 [PATCHv2 xfsprogs 00/14] Convert from off64_t to off_t Felix Janda
                   ` (8 preceding siblings ...)
  2016-08-13 16:03 ` [PATCHv2 xfsprogs 13/14] xfs.h: require transparent LFS for all users Felix Janda
@ 2016-08-13 16:03 ` Felix Janda
  2016-08-18 17:42   ` Christoph Hellwig
  2016-08-13 16:17 ` [PATCHv2 xfsprogs 10/14] Makefile: disable fsr for Mac OS X Felix Janda
                   ` (5 subsequent siblings)
  15 siblings, 1 reply; 37+ messages in thread
From: Felix Janda @ 2016-08-13 16:03 UTC (permalink / raw)
  To: xfs

also fixes a compile failure on FreeBSD

Signed-off-by: Felix Janda <felix.janda@posteo.de>
---
 io/fadvise.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/io/fadvise.c b/io/fadvise.c
index d59d1ff..46174f3 100644
--- a/io/fadvise.c
+++ b/io/fadvise.c
@@ -103,7 +103,7 @@ fadvise_f(
 		return command_usage(&fadvise_cmd);
 	}
 
-	if (posix_fadvise64(file->fd, offset, length, advise) < 0) {
+	if (posix_fadvise(file->fd, offset, length, advise) < 0) {
 		perror("fadvise");
 		return 0;
 	}
-- 
2.7.3

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCHv2 xfsprogs 13/14] xfs.h: require transparent LFS for all users
  2016-08-13 17:04 [PATCHv2 xfsprogs 00/14] Convert from off64_t to off_t Felix Janda
                   ` (7 preceding siblings ...)
  2016-08-07  5:52 ` [PATCHv2 xfsprogs 14/14] platform: remove use of off64_t Felix Janda
@ 2016-08-13 16:03 ` Felix Janda
  2016-08-18 17:45   ` Christoph Hellwig
  2016-08-13 16:03 ` [PATCHv2 xfsprogs 09/14] fadvise.c: replace posix_fadvise64 by equivalent posix_fadvise Felix Janda
                   ` (6 subsequent siblings)
  15 siblings, 1 reply; 37+ messages in thread
From: Felix Janda @ 2016-08-13 16:03 UTC (permalink / raw)
  To: xfs

Since our interfaces depend on the consistent use of a 64bit offset
type, force downstreams to use transparent LFS (_FILE_OFFSET_BITS=64),
so that it becomes impossible for them to use 32bit interfaces.

Signed-off-by: Felix Janda <felix.janda@posteo.de>
---
 include/xfs.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/xfs.h b/include/xfs.h
index 7bed957..0a294f0 100644
--- a/include/xfs.h
+++ b/include/xfs.h
@@ -48,6 +48,11 @@
 #endif
 
 /*
+ * make sure that any user of the xfs headers has a 64bit off_t type
+ */
+extern int xfs_assert_largefile[sizeof(off_t)-8];
+
+/*
  * sparse kernel source annotations
  */
 #ifndef __user
-- 
2.7.3

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCHv2 xfsprogs 10/14] Makefile: disable fsr for Mac OS X
  2016-08-13 17:04 [PATCHv2 xfsprogs 00/14] Convert from off64_t to off_t Felix Janda
                   ` (9 preceding siblings ...)
  2016-08-13 16:03 ` [PATCHv2 xfsprogs 09/14] fadvise.c: replace posix_fadvise64 by equivalent posix_fadvise Felix Janda
@ 2016-08-13 16:17 ` Felix Janda
  2016-08-18 17:43   ` Christoph Hellwig
  2016-08-13 16:20 ` [PATCHv2 xfsprogs 11/14] fsr: remove workaround for statvfs on " Felix Janda
                   ` (4 subsequent siblings)
  15 siblings, 1 reply; 37+ messages in thread
From: Felix Janda @ 2016-08-13 16:17 UTC (permalink / raw)
  To: xfs

Since its kernel does not support XFS anyway this utility is not
useful, and with its removal the portability framework can be
simplified.

Signed-off-by: Felix Janda <felix.janda@posteo.de>
---
 Makefile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 7bdc670..84dc62c 100644
--- a/Makefile
+++ b/Makefile
@@ -45,9 +45,13 @@ HDR_SUBDIRS = include libxfs
 
 DLIB_SUBDIRS = libxlog libxcmd libhandle
 LIB_SUBDIRS = libxfs $(DLIB_SUBDIRS)
-TOOL_SUBDIRS = copy db estimate fsck fsr growfs io logprint mkfs quota \
+TOOL_SUBDIRS = copy db estimate fsck growfs io logprint mkfs quota \
 		mdrestore repair rtcp m4 man doc debian
 
+ifneq ("$(PKG_PLATFORM)","darwin")
+TOOL_SUBDIRS += fsr
+endif
+
 ifneq ("$(XGETTEXT)","")
 TOOL_SUBDIRS += po
 endif
-- 
2.7.3

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCHv2 xfsprogs 11/14] fsr: remove workaround for statvfs on Mac OS X
  2016-08-13 17:04 [PATCHv2 xfsprogs 00/14] Convert from off64_t to off_t Felix Janda
                   ` (10 preceding siblings ...)
  2016-08-13 16:17 ` [PATCHv2 xfsprogs 10/14] Makefile: disable fsr for Mac OS X Felix Janda
@ 2016-08-13 16:20 ` Felix Janda
  2016-08-18 17:44   ` Christoph Hellwig
  2016-08-13 16:22 ` [PATCHv2 xfsprogs 12/14] replace statvfs64 by equivalent statvfs Felix Janda
                   ` (3 subsequent siblings)
  15 siblings, 1 reply; 37+ messages in thread
From: Felix Janda @ 2016-08-13 16:20 UTC (permalink / raw)
  To: xfs

It can be removed since fsr is no longer built on Mac OS X.

Signed-off-by: Felix Janda <felix.janda@posteo.de>
---
 fsr/xfs_fsr.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/fsr/xfs_fsr.c b/fsr/xfs_fsr.c
index 98390e7..9cffa1b 100644
--- a/fsr/xfs_fsr.c
+++ b/fsr/xfs_fsr.c
@@ -945,11 +945,7 @@ fsrfile_common(
 			fname, strerror(errno));
 		return -1;
 	}
-#ifndef statvfs64
 	bsize = vfss.f_frsize ? vfss.f_frsize : vfss.f_bsize;
-#else
-	bsize = vfss.f_bsize;
-#endif
 	if (statp->bs_blksize * statp->bs_blocks >
 	    vfss.f_bfree * bsize - minimumfree) {
 		fsrprintf(_("insufficient freespace for: %s: "
@@ -1717,11 +1713,7 @@ xfs_getrt(int fd, struct statvfs64 *sfbp)
 		close(fd);
 		return -1;
 	}
-#ifndef statvfs64
 	bsize = (sfbp->f_frsize ? sfbp->f_frsize : sfbp->f_bsize);
-#else
-	bsize = sfbp->f_bsize;
-#endif
 	factor = fsgeom.blocksize / bsize;         /* currently this is == 1 */
 	sfbp->f_bfree = (cnt.freertx * fsgeom.rtextsize) * factor;
 	return 0;
-- 
2.7.3

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCHv2 xfsprogs 12/14] replace statvfs64 by equivalent statvfs
  2016-08-13 17:04 [PATCHv2 xfsprogs 00/14] Convert from off64_t to off_t Felix Janda
                   ` (11 preceding siblings ...)
  2016-08-13 16:20 ` [PATCHv2 xfsprogs 11/14] fsr: remove workaround for statvfs on " Felix Janda
@ 2016-08-13 16:22 ` Felix Janda
  2016-08-18 17:44   ` Christoph Hellwig
  2016-08-13 16:50 ` [PATCHv2 xfsprogs 02/14] configure: error out when LFS does not work Felix Janda
                   ` (2 subsequent siblings)
  15 siblings, 1 reply; 37+ messages in thread
From: Felix Janda @ 2016-08-13 16:22 UTC (permalink / raw)
  To: xfs

Signed-off-by: Felix Janda <felix.janda@posteo.de>
---
 fsr/xfs_fsr.c    | 8 ++++----
 include/darwin.h | 1 -
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/fsr/xfs_fsr.c b/fsr/xfs_fsr.c
index 9cffa1b..517b75f 100644
--- a/fsr/xfs_fsr.c
+++ b/fsr/xfs_fsr.c
@@ -89,7 +89,7 @@ static void fsrallfs(char *mtab, int howlong, char *leftofffile);
 static void fsrall_cleanup(int timeout);
 static int  getnextents(int);
 int xfsrtextsize(int fd);
-int xfs_getrt(int fd, struct statvfs64 *sfbp);
+int xfs_getrt(int fd, struct statvfs *sfbp);
 char * gettmpname(char *fname);
 char * getparent(char *fname);
 int fsrprintf(const char *fmt, ...);
@@ -888,7 +888,7 @@ fsrfile_common(
 	xfs_bstat_t	*statp)
 {
 	int		error;
-	struct statvfs64 vfss;
+	struct statvfs  vfss;
 	struct fsxattr	fsx;
 	unsigned long	bsize;
 
@@ -940,7 +940,7 @@ fsrfile_common(
 	 * Note that xfs_bstat.bs_blksize returns the filesystem blocksize,
 	 * not the optimal I/O size as struct stat.
 	 */
-	if (statvfs64(fsname ? fsname : fname, &vfss) < 0) {
+	if (statvfs(fsname ? fsname : fname, &vfss) < 0) {
 		fsrprintf(_("unable to get fs stat on %s: %s\n"),
 			fname, strerror(errno));
 		return -1;
@@ -1700,7 +1700,7 @@ xfs_getgeom(int fd, xfs_fsop_geom_v1_t * fsgeom)
  * Get xfs realtime space information
  */
 int
-xfs_getrt(int fd, struct statvfs64 *sfbp)
+xfs_getrt(int fd, struct statvfs *sfbp)
 {
 	unsigned long	bsize;
 	unsigned long	factor;
diff --git a/include/darwin.h b/include/darwin.h
index fb13915..495b44b 100644
--- a/include/darwin.h
+++ b/include/darwin.h
@@ -216,7 +216,6 @@ static inline int timer_gettime (timer_t timerid, struct itimerspec *value)
 #  include <sys/param.h>
 #include <sys/ucred.h>
 #include <errno.h>
-#define statvfs64	statfs
 #define		_PATH_MOUNTED   "/etc/mtab"
 
 struct mntent
-- 
2.7.3

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCHv2 xfsprogs 02/14] configure: error out when LFS does not work
  2016-08-13 17:04 [PATCHv2 xfsprogs 00/14] Convert from off64_t to off_t Felix Janda
                   ` (12 preceding siblings ...)
  2016-08-13 16:22 ` [PATCHv2 xfsprogs 12/14] replace statvfs64 by equivalent statvfs Felix Janda
@ 2016-08-13 16:50 ` Felix Janda
  2016-08-18 17:37   ` Christoph Hellwig
  2016-08-22  3:09 ` [PATCHv2 xfsprogs 00/14] Convert from off64_t to off_t Dave Chinner
  2016-08-24  1:19 ` Dave Chinner
  15 siblings, 1 reply; 37+ messages in thread
From: Felix Janda @ 2016-08-13 16:50 UTC (permalink / raw)
  To: xfs

Signed-off-by: Felix Janda <felix.janda@posteo.de>
---
 configure.ac          |  1 +
 m4/package_libcdev.m4 | 16 ++++++++++++++++
 2 files changed, 17 insertions(+)

diff --git a/configure.ac b/configure.ac
index 8fa96a5..ed75d62 100644
--- a/configure.ac
+++ b/configure.ac
@@ -108,6 +108,7 @@ AC_MULTILIB($enable_lib64)
 AC_RT($enable_librt)
 
 AC_SYS_LARGEFILE
+AC_NEED_LFS
 
 AC_PACKAGE_NEED_UUID_H
 AC_PACKAGE_NEED_UUIDCOMPARE
diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4
index 7a847e9..6c94475 100644
--- a/m4/package_libcdev.m4
+++ b/m4/package_libcdev.m4
@@ -265,3 +265,19 @@ AC_DEFUN([AC_HAVE_MREMAP],
        )
     AC_SUBST(have_mremap)
   ])
+
+#
+# Check if transparent LFS is enabled
+#
+AC_DEFUN([AC_NEED_LFS],
+  [ AC_MSG_CHECKING([whether large file support works])
+    AC_TRY_COMPILE([
+#include <unistd.h>
+    ], [
+         int i[sizeof(off_t)-8];
+    ], AC_MSG_RESULT(yes),
+       [AC_MSG_RESULT(no)
+       echo
+       echo 'FATAL ERROR: C library does not support transparent LFS.'
+       exit 1])
+  ])
-- 
2.7.3

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply related	[flat|nested] 37+ messages in thread

* [PATCHv2 xfsprogs 00/14] Convert from off64_t to off_t
@ 2016-08-13 17:04 Felix Janda
  2016-08-06 10:45 ` [PATCHv2 xfsprogs 04/14] replace [fl]stat64 by equivalent [fl]stat Felix Janda
                   ` (15 more replies)
  0 siblings, 16 replies; 37+ messages in thread
From: Felix Janda @ 2016-08-13 17:04 UTC (permalink / raw)
  To: xfs

This patch series does several things related to large file support.

Patches 1-3 enable transparent LFS in the build system and make it
mandatory.

Patches 4-9 and 12 replace *64 function and structure aliases.

Patches 10 and 11 disable fsr on Mac OS X and do cleanup to enable
Patch 12. Further cleanup of the portability code is possible later.

Patch 13 makes tranparent LFS also mandatory for all users of libxfs.

Patch 14 finally replaces off64_t by off_t.


In comparison to v1:

Patches 1, 3 and 14 are identical to previous patches. Patches 4-8 are
identical to previous patches, except that some of them are merged.
Patch 9 was previously send separately from the patch series. Patch
13 is identical to a previous patch except for the commit message. The
other patches are new, grown out of review by Christoph Hellwig.

Felix Janda (14):
  configure: use AC_SYS_LARGEFILE
  configure: error out when LFS does not work
  remove unecessary definitions of _FILE_OFFSET_BITS
  replace [fl]stat64 by equivalent [fl]stat
  replace ftruncate64 by equivalent ftruncate
  replace lseek64 by equivalent lseek
  replace pread64/pwrite64 by equivalent pread/pwrite
  replace sendfile64 by equivalent sendfile
  fadvise.c: replace posix_fadvise64 by equivalent posix_fadvise
  Makefile: disable fsr for Mac OS X
  fsr: remove workaround for statvfs on Mac OS X
  replace statvfs64 by equivalent statvfs
  xfs.h: require transparent LFS for all users
  platform: remove use of off64_t

 Makefile                  |  6 ++++-
 configure.ac              |  3 +++
 copy/xfs_copy.c           | 22 ++++++++---------
 fsr/xfs_fsr.c             | 62 +++++++++++++++++++++--------------------------
 include/builddefs.in      |  2 +-
 include/darwin.h          |  9 -------
 include/freebsd.h         |  7 ------
 include/irix.h            |  2 +-
 include/linux.h           |  2 +-
 include/xfs.h             |  5 ++++
 io/copy_file_range.c      | 10 ++++----
 io/fadvise.c              |  2 +-
 io/open.c                 | 18 +++++++-------
 io/pread.c                | 16 ++++++------
 io/pwrite.c               | 10 ++++----
 io/seek.c                 |  6 ++---
 io/sendfile.c             | 10 ++++----
 io/truncate.c             |  2 +-
 libxcmd/paths.c           |  4 +--
 libxfs/darwin.c           |  8 +++---
 libxfs/freebsd.c          |  8 +++---
 libxfs/init.c             | 12 ++++-----
 libxfs/init.h             |  6 ++---
 libxfs/irix.c             |  8 +++---
 libxfs/linux.c            | 20 +++++++--------
 libxfs/rdwr.c             | 10 ++++----
 logprint/log_misc.c       |  4 +--
 logprint/logprint.c       |  2 +-
 m4/package_libcdev.m4     | 25 ++++++++++++-------
 mdrestore/xfs_mdrestore.c | 12 ++++-----
 mkfs/proto.c              |  4 +--
 mkfs/xfs_mkfs.c           |  8 +++---
 po/de.po                  | 28 ++++++++++-----------
 po/pl.po                  | 32 ++++++++++++------------
 repair/prefetch.c         |  2 +-
 repair/sb.c               |  6 ++---
 repair/xfs_repair.c       |  4 +--
 rtcp/xfs_rtcp.c           | 18 +++++++-------
 38 files changed, 205 insertions(+), 210 deletions(-)

-- 
2.7.3

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCHv2 xfsprogs 01/14] configure: use AC_SYS_LARGEFILE
  2016-08-07  5:21 ` [PATCHv2 xfsprogs 01/14] configure: use AC_SYS_LARGEFILE Felix Janda
@ 2016-08-18 17:37   ` Christoph Hellwig
  0 siblings, 0 replies; 37+ messages in thread
From: Christoph Hellwig @ 2016-08-18 17:37 UTC (permalink / raw)
  To: Felix Janda; +Cc: xfs

On Sun, Aug 07, 2016 at 07:21:20AM +0200, Felix Janda wrote:
> The autoconf macro AC_SYS_LARGEFILE defines _FILE_OFFSET_BITS=64
> where necessary to ensure that off_t and all interfaces using off_t
> are 64bit, even on 32bit systems.
> 
> Signed-off-by: Felix Janda <felix.janda@posteo.de>

Thanks, this looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCHv2 xfsprogs 02/14] configure: error out when LFS does not work
  2016-08-13 16:50 ` [PATCHv2 xfsprogs 02/14] configure: error out when LFS does not work Felix Janda
@ 2016-08-18 17:37   ` Christoph Hellwig
  0 siblings, 0 replies; 37+ messages in thread
From: Christoph Hellwig @ 2016-08-18 17:37 UTC (permalink / raw)
  To: Felix Janda; +Cc: xfs

On Sat, Aug 13, 2016 at 06:50:28PM +0200, Felix Janda wrote:
> Signed-off-by: Felix Janda <felix.janda@posteo.de>

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCHv2 xfsprogs 03/14] remove unecessary definitions of _FILE_OFFSET_BITS
  2016-08-07  5:28 ` [PATCHv2 xfsprogs 03/14] remove unecessary definitions of _FILE_OFFSET_BITS Felix Janda
@ 2016-08-18 17:38   ` Christoph Hellwig
  0 siblings, 0 replies; 37+ messages in thread
From: Christoph Hellwig @ 2016-08-18 17:38 UTC (permalink / raw)
  To: Felix Janda; +Cc: xfs

On Sun, Aug 07, 2016 at 07:28:16AM +0200, Felix Janda wrote:
> now that we use AC_SYS_LARGEFILE, there is no need to explicitly
> define _FILE_OFFSET_BITS.

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCHv2 xfsprogs 04/14] replace [fl]stat64 by equivalent [fl]stat
  2016-08-06 10:45 ` [PATCHv2 xfsprogs 04/14] replace [fl]stat64 by equivalent [fl]stat Felix Janda
@ 2016-08-18 17:38   ` Christoph Hellwig
  0 siblings, 0 replies; 37+ messages in thread
From: Christoph Hellwig @ 2016-08-18 17:38 UTC (permalink / raw)
  To: Felix Janda; +Cc: xfs

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCHv2 xfsprogs 05/14] replace ftruncate64 by equivalent ftruncate
  2016-08-06 10:45 ` [PATCHv2 xfsprogs 05/14] replace ftruncate64 by equivalent ftruncate Felix Janda
@ 2016-08-18 17:38   ` Christoph Hellwig
  0 siblings, 0 replies; 37+ messages in thread
From: Christoph Hellwig @ 2016-08-18 17:38 UTC (permalink / raw)
  To: Felix Janda; +Cc: xfs

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCHv2 xfsprogs 06/14] replace lseek64 by equivalent lseek
  2016-08-06 10:45 ` [PATCHv2 xfsprogs 06/14] replace lseek64 by equivalent lseek Felix Janda
@ 2016-08-18 17:38   ` Christoph Hellwig
  0 siblings, 0 replies; 37+ messages in thread
From: Christoph Hellwig @ 2016-08-18 17:38 UTC (permalink / raw)
  To: Felix Janda; +Cc: xfs

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCHv2 xfsprogs 07/14] replace pread64/pwrite64 by equivalent pread/pwrite
  2016-08-06 10:45 ` [PATCHv2 xfsprogs 07/14] replace pread64/pwrite64 by equivalent pread/pwrite Felix Janda
@ 2016-08-18 17:39   ` Christoph Hellwig
  0 siblings, 0 replies; 37+ messages in thread
From: Christoph Hellwig @ 2016-08-18 17:39 UTC (permalink / raw)
  To: Felix Janda; +Cc: xfs

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCHv2 xfsprogs 08/14] replace sendfile64 by equivalent sendfile
  2016-08-06 11:03 ` [PATCHv2 xfsprogs 08/14] replace sendfile64 by equivalent sendfile Felix Janda
@ 2016-08-18 17:39   ` Christoph Hellwig
  0 siblings, 0 replies; 37+ messages in thread
From: Christoph Hellwig @ 2016-08-18 17:39 UTC (permalink / raw)
  To: Felix Janda; +Cc: xfs

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCHv2 xfsprogs 09/14] fadvise.c: replace posix_fadvise64 by equivalent posix_fadvise
  2016-08-13 16:03 ` [PATCHv2 xfsprogs 09/14] fadvise.c: replace posix_fadvise64 by equivalent posix_fadvise Felix Janda
@ 2016-08-18 17:42   ` Christoph Hellwig
  0 siblings, 0 replies; 37+ messages in thread
From: Christoph Hellwig @ 2016-08-18 17:42 UTC (permalink / raw)
  To: Felix Janda; +Cc: xfs

On Sat, Aug 13, 2016 at 06:03:16PM +0200, Felix Janda wrote:
> also fixes a compile failure on FreeBSD
> 
> Signed-off-by: Felix Janda <felix.janda@posteo.de>

Looks fine,

Reviewed-by: Christoph Hellwig <hch@lst.de>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCHv2 xfsprogs 10/14] Makefile: disable fsr for Mac OS X
  2016-08-13 16:17 ` [PATCHv2 xfsprogs 10/14] Makefile: disable fsr for Mac OS X Felix Janda
@ 2016-08-18 17:43   ` Christoph Hellwig
  0 siblings, 0 replies; 37+ messages in thread
From: Christoph Hellwig @ 2016-08-18 17:43 UTC (permalink / raw)
  To: Felix Janda; +Cc: xfs

On Sat, Aug 13, 2016 at 06:17:41PM +0200, Felix Janda wrote:
> Since its kernel does not support XFS anyway this utility is not
> useful, and with its removal the portability framework can be
> simplified.
> 
> Signed-off-by: Felix Janda <felix.janda@posteo.de>

Looks fine,

Reviewed-by: Christoph Hellwig <hch@lst.de>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCHv2 xfsprogs 11/14] fsr: remove workaround for statvfs on Mac OS X
  2016-08-13 16:20 ` [PATCHv2 xfsprogs 11/14] fsr: remove workaround for statvfs on " Felix Janda
@ 2016-08-18 17:44   ` Christoph Hellwig
  0 siblings, 0 replies; 37+ messages in thread
From: Christoph Hellwig @ 2016-08-18 17:44 UTC (permalink / raw)
  To: Felix Janda; +Cc: xfs

On Sat, Aug 13, 2016 at 06:20:47PM +0200, Felix Janda wrote:
> It can be removed since fsr is no longer built on Mac OS X.
> 
> Signed-off-by: Felix Janda <felix.janda@posteo.de>

Looks fine,

Reviewed-by: Christoph Hellwig <hch@lst.de>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCHv2 xfsprogs 12/14] replace statvfs64 by equivalent statvfs
  2016-08-13 16:22 ` [PATCHv2 xfsprogs 12/14] replace statvfs64 by equivalent statvfs Felix Janda
@ 2016-08-18 17:44   ` Christoph Hellwig
  0 siblings, 0 replies; 37+ messages in thread
From: Christoph Hellwig @ 2016-08-18 17:44 UTC (permalink / raw)
  To: Felix Janda; +Cc: xfs

Looks fine,

Reviewed-by: Christoph Hellwig <hch@lst.de>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCHv2 xfsprogs 13/14] xfs.h: require transparent LFS for all users
  2016-08-13 16:03 ` [PATCHv2 xfsprogs 13/14] xfs.h: require transparent LFS for all users Felix Janda
@ 2016-08-18 17:45   ` Christoph Hellwig
  0 siblings, 0 replies; 37+ messages in thread
From: Christoph Hellwig @ 2016-08-18 17:45 UTC (permalink / raw)
  To: Felix Janda; +Cc: xfs

On Sat, Aug 13, 2016 at 06:03:16PM +0200, Felix Janda wrote:
> Since our interfaces depend on the consistent use of a 64bit offset
> type, force downstreams to use transparent LFS (_FILE_OFFSET_BITS=64),
> so that it becomes impossible for them to use 32bit interfaces.
> 
> Signed-off-by: Felix Janda <felix.janda@posteo.de>

Looks fine,

Reviewed-by: Christoph Hellwig <hch@lst.de>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCHv2 xfsprogs 14/14] platform: remove use of off64_t
  2016-08-07  5:52 ` [PATCHv2 xfsprogs 14/14] platform: remove use of off64_t Felix Janda
@ 2016-08-18 17:45   ` Christoph Hellwig
  0 siblings, 0 replies; 37+ messages in thread
From: Christoph Hellwig @ 2016-08-18 17:45 UTC (permalink / raw)
  To: Felix Janda; +Cc: xfs

Looks fine,

Reviewed-by: Christoph Hellwig <hch@lst.de>

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCHv2 xfsprogs 00/14] Convert from off64_t to off_t
  2016-08-13 17:04 [PATCHv2 xfsprogs 00/14] Convert from off64_t to off_t Felix Janda
                   ` (13 preceding siblings ...)
  2016-08-13 16:50 ` [PATCHv2 xfsprogs 02/14] configure: error out when LFS does not work Felix Janda
@ 2016-08-22  3:09 ` Dave Chinner
  2016-08-22  7:06   ` Felix Janda
  2016-08-24  1:19 ` Dave Chinner
  15 siblings, 1 reply; 37+ messages in thread
From: Dave Chinner @ 2016-08-22  3:09 UTC (permalink / raw)
  To: Felix Janda; +Cc: xfs

On Sat, Aug 13, 2016 at 07:04:18PM +0200, Felix Janda wrote:
> This patch series does several things related to large file support.
> 
> Patches 1-3 enable transparent LFS in the build system and make it
> mandatory.
> 
> Patches 4-9 and 12 replace *64 function and structure aliases.
> 
> Patches 10 and 11 disable fsr on Mac OS X and do cleanup to enable
> Patch 12. Further cleanup of the portability code is possible later.
> 
> Patch 13 makes tranparent LFS also mandatory for all users of libxfs.
> 
> Patch 14 finally replaces off64_t by off_t.

Felix, can you check how you are sending these patches? The last two
sets of patches you've sent have not threaded in the correct order
(they thread in a random order) which means I have to manually
reorder the patch set to get it to apply in the correct order via
git am....

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCHv2 xfsprogs 00/14] Convert from off64_t to off_t
  2016-08-22  3:09 ` [PATCHv2 xfsprogs 00/14] Convert from off64_t to off_t Dave Chinner
@ 2016-08-22  7:06   ` Felix Janda
  2016-08-22 11:51     ` Dave Chinner
  0 siblings, 1 reply; 37+ messages in thread
From: Felix Janda @ 2016-08-22  7:06 UTC (permalink / raw)
  To: Dave Chinner; +Cc: xfs

Dave Chinner wrote:
> On Sat, Aug 13, 2016 at 07:04:18PM +0200, Felix Janda wrote:
> > This patch series does several things related to large file support.
> > 
> > Patches 1-3 enable transparent LFS in the build system and make it
> > mandatory.
> > 
> > Patches 4-9 and 12 replace *64 function and structure aliases.
> > 
> > Patches 10 and 11 disable fsr on Mac OS X and do cleanup to enable
> > Patch 12. Further cleanup of the portability code is possible later.
> > 
> > Patch 13 makes tranparent LFS also mandatory for all users of libxfs.
> > 
> > Patch 14 finally replaces off64_t by off_t.
> 
> Felix, can you check how you are sending these patches? The last two
> sets of patches you've sent have not threaded in the correct order
> (they thread in a random order) which means I have to manually
> reorder the patch set to get it to apply in the correct order via
> git am....

I am sorry for that. Should I resend the patch series?

Cheers,
Felix

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCHv2 xfsprogs 00/14] Convert from off64_t to off_t
  2016-08-22  7:06   ` Felix Janda
@ 2016-08-22 11:51     ` Dave Chinner
  2016-08-22 19:16       ` Felix Janda
  0 siblings, 1 reply; 37+ messages in thread
From: Dave Chinner @ 2016-08-22 11:51 UTC (permalink / raw)
  To: Felix Janda; +Cc: xfs

On Mon, Aug 22, 2016 at 09:06:01AM +0200, Felix Janda wrote:
> Dave Chinner wrote:
> > On Sat, Aug 13, 2016 at 07:04:18PM +0200, Felix Janda wrote:
> > > This patch series does several things related to large file support.
> > > 
> > > Patches 1-3 enable transparent LFS in the build system and make it
> > > mandatory.
> > > 
> > > Patches 4-9 and 12 replace *64 function and structure aliases.
> > > 
> > > Patches 10 and 11 disable fsr on Mac OS X and do cleanup to enable
> > > Patch 12. Further cleanup of the portability code is possible later.
> > > 
> > > Patch 13 makes tranparent LFS also mandatory for all users of libxfs.
> > > 
> > > Patch 14 finally replaces off64_t by off_t.
> > 
> > Felix, can you check how you are sending these patches? The last two
> > sets of patches you've sent have not threaded in the correct order
> > (they thread in a random order) which means I have to manually
> > reorder the patch set to get it to apply in the correct order via
> > git am....
> 
> I am sorry for that. Should I resend the patch series?

No, I've re-ordered it appropriately.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCHv2 xfsprogs 00/14] Convert from off64_t to off_t
  2016-08-22 11:51     ` Dave Chinner
@ 2016-08-22 19:16       ` Felix Janda
  0 siblings, 0 replies; 37+ messages in thread
From: Felix Janda @ 2016-08-22 19:16 UTC (permalink / raw)
  To: Dave Chinner; +Cc: xfs

Dave Chinner wrote:
> On Mon, Aug 22, 2016 at 09:06:01AM +0200, Felix Janda wrote:
> > Dave Chinner wrote:
> > > Felix, can you check how you are sending these patches? The last two
> > > sets of patches you've sent have not threaded in the correct order
> > > (they thread in a random order) which means I have to manually
> > > reorder the patch set to get it to apply in the correct order via
> > > git am....
> > 
> > I am sorry for that. Should I resend the patch series?
> 
> No, I've re-ordered it appropriately.

Ok. Anyway thanks for drawing my attention to the ordering issues. (I
was not quite aware that git am does not take the patch numbers in the
subject into account.)

Felix

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCHv2 xfsprogs 00/14] Convert from off64_t to off_t
  2016-08-13 17:04 [PATCHv2 xfsprogs 00/14] Convert from off64_t to off_t Felix Janda
                   ` (14 preceding siblings ...)
  2016-08-22  3:09 ` [PATCHv2 xfsprogs 00/14] Convert from off64_t to off_t Dave Chinner
@ 2016-08-24  1:19 ` Dave Chinner
  2016-08-24 20:47   ` Felix Janda
  15 siblings, 1 reply; 37+ messages in thread
From: Dave Chinner @ 2016-08-24  1:19 UTC (permalink / raw)
  To: Felix Janda; +Cc: xfs

On Sat, Aug 13, 2016 at 07:04:18PM +0200, Felix Janda wrote:
> This patch series does several things related to large file support.
> 
> Patches 1-3 enable transparent LFS in the build system and make it
> mandatory.
> 
> Patches 4-9 and 12 replace *64 function and structure aliases.
> 
> Patches 10 and 11 disable fsr on Mac OS X and do cleanup to enable
> Patch 12. Further cleanup of the portability code is possible later.
> 
> Patch 13 makes tranparent LFS also mandatory for all users of libxfs.
> 
> Patch 14 finally replaces off64_t by off_t.
> 
> 
> In comparison to v1:
> 
> Patches 1, 3 and 14 are identical to previous patches. Patches 4-8 are
> identical to previous patches, except that some of them are merged.
> Patch 9 was previously send separately from the patch series. Patch
> 13 is identical to a previous patch except for the commit message. The
> other patches are new, grown out of review by Christoph Hellwig.
> 
> Felix Janda (14):
>   configure: use AC_SYS_LARGEFILE
>   configure: error out when LFS does not work
>   remove unecessary definitions of _FILE_OFFSET_BITS
>   replace [fl]stat64 by equivalent [fl]stat
>   replace ftruncate64 by equivalent ftruncate
>   replace lseek64 by equivalent lseek
>   replace pread64/pwrite64 by equivalent pread/pwrite
>   replace sendfile64 by equivalent sendfile
>   fadvise.c: replace posix_fadvise64 by equivalent posix_fadvise
>   Makefile: disable fsr for Mac OS X
>   fsr: remove workaround for statvfs on Mac OS X
>   replace statvfs64 by equivalent statvfs
>   xfs.h: require transparent LFS for all users
>   platform: remove use of off64_t

So, the patches are fine, and everything works. Problem is, it
screws up xfstests because it changes all the error messages
that are output to stderr and captured by the test harness.
There are quite a few tests that this causes failures for,
and because it's stderr, it's not as simple as just adding a new
filter to do 'sed -e "s/^\(.*\)64\(: .*$\)/\1\2/"' on stderr.

Further, errors returned change, which further screws up xfstests.
e.g. old code gives EFBIG when we try to use offsets beyond the
supported range, this patchset returns EINVAL.  That further
complicates any sort of error filtering we'll need to do.

I don't have the time or patience to fix up xfstests for every
change that people want to make and this series is a non-critical
cleanup, so I'm dropping this until the fixups for xfstests are
worked out. I'm not going to get to this for weeks at the current
rate patches are being thrown at me for inclusion, so I'm not
breaking xfstests for everyone while I'm bottlenecked on other,
higher priority changes.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCHv2 xfsprogs 00/14] Convert from off64_t to off_t
  2016-08-24  1:19 ` Dave Chinner
@ 2016-08-24 20:47   ` Felix Janda
  2016-08-25  8:04     ` Christoph Hellwig
  2016-08-25 22:01     ` Dave Chinner
  0 siblings, 2 replies; 37+ messages in thread
From: Felix Janda @ 2016-08-24 20:47 UTC (permalink / raw)
  To: Dave Chinner; +Cc: xfs

Dave Chinner wrote:
> On Sat, Aug 13, 2016 at 07:04:18PM +0200, Felix Janda wrote:
> > This patch series does several things related to large file support.
> > 
> > Patches 1-3 enable transparent LFS in the build system and make it
> > mandatory.
> > 
> > Patches 4-9 and 12 replace *64 function and structure aliases.
> > 
> > Patches 10 and 11 disable fsr on Mac OS X and do cleanup to enable
> > Patch 12. Further cleanup of the portability code is possible later.
> > 
> > Patch 13 makes tranparent LFS also mandatory for all users of libxfs.
> > 
> > Patch 14 finally replaces off64_t by off_t.
> > 
> > 
> > In comparison to v1:
> > 
> > Patches 1, 3 and 14 are identical to previous patches. Patches 4-8 are
> > identical to previous patches, except that some of them are merged.
> > Patch 9 was previously send separately from the patch series. Patch
> > 13 is identical to a previous patch except for the commit message. The
> > other patches are new, grown out of review by Christoph Hellwig.
> > 
> > Felix Janda (14):
> >   configure: use AC_SYS_LARGEFILE
> >   configure: error out when LFS does not work
> >   remove unecessary definitions of _FILE_OFFSET_BITS
> >   replace [fl]stat64 by equivalent [fl]stat
> >   replace ftruncate64 by equivalent ftruncate
> >   replace lseek64 by equivalent lseek
> >   replace pread64/pwrite64 by equivalent pread/pwrite
> >   replace sendfile64 by equivalent sendfile
> >   fadvise.c: replace posix_fadvise64 by equivalent posix_fadvise
> >   Makefile: disable fsr for Mac OS X
> >   fsr: remove workaround for statvfs on Mac OS X
> >   replace statvfs64 by equivalent statvfs
> >   xfs.h: require transparent LFS for all users
> >   platform: remove use of off64_t
> 
> So, the patches are fine, and everything works. Problem is, it
> screws up xfstests because it changes all the error messages
> that are output to stderr and captured by the test harness.
> There are quite a few tests that this causes failures for,
> and because it's stderr, it's not as simple as just adding a new
> filter to do 'sed -e "s/^\(.*\)64\(: .*$\)/\1\2/"' on stderr.

Thanks for testing!

I can rework the patches to leave stderr unchanged. I guess that this
is preferable as opposed to updating the output expected by xfstests
since xfstests should be usable with both old and new xfsprogs.

> Further, errors returned change, which further screws up xfstests.
> e.g. old code gives EFBIG when we try to use offsets beyond the
> supported range, this patchset returns EINVAL.  That further
> complicates any sort of error filtering we'll need to do.

I am very surprised that something apart from the error messages has
changed. I would be interested to know on what architecture and for
which test(s) (where) this happened, if you still remember.

> I don't have the time or patience to fix up xfstests for every
> change that people want to make and this series is a non-critical
> cleanup, so I'm dropping this until the fixups for xfstests are
> worked out. I'm not going to get to this for weeks at the current
> rate patches are being thrown at me for inclusion, so I'm not
> breaking xfstests for everyone while I'm bottlenecked on other,
> higher priority changes.

That make sense.

--Felix

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCHv2 xfsprogs 00/14] Convert from off64_t to off_t
  2016-08-24 20:47   ` Felix Janda
@ 2016-08-25  8:04     ` Christoph Hellwig
  2016-08-25 22:01     ` Dave Chinner
  1 sibling, 0 replies; 37+ messages in thread
From: Christoph Hellwig @ 2016-08-25  8:04 UTC (permalink / raw)
  To: Felix Janda; +Cc: xfs

On Wed, Aug 24, 2016 at 10:47:46PM +0200, Felix Janda wrote:
> > screws up xfstests because it changes all the error messages
> > that are output to stderr and captured by the test harness.
> > There are quite a few tests that this causes failures for,
> > and because it's stderr, it's not as simple as just adding a new
> > filter to do 'sed -e "s/^\(.*\)64\(: .*$\)/\1\2/"' on stderr.
> 
> Thanks for testing!
> 
> I can rework the patches to leave stderr unchanged. I guess that this
> is preferable as opposed to updating the output expected by xfstests
> since xfstests should be usable with both old and new xfsprogs.

I would prefer to change the output if we can find a good way to
filter it.  I suspect the issues are things like perror lines
which would look odd if we leave the 64 back in.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 37+ messages in thread

* Re: [PATCHv2 xfsprogs 00/14] Convert from off64_t to off_t
  2016-08-24 20:47   ` Felix Janda
  2016-08-25  8:04     ` Christoph Hellwig
@ 2016-08-25 22:01     ` Dave Chinner
  1 sibling, 0 replies; 37+ messages in thread
From: Dave Chinner @ 2016-08-25 22:01 UTC (permalink / raw)
  To: Felix Janda, Christoph Hellwig; +Cc: xfs

On Wed, Aug 24, 2016 at 10:47:46PM +0200, Felix Janda wrote:
> Dave Chinner wrote:
> > So, the patches are fine, and everything works. Problem is, it
> > screws up xfstests because it changes all the error messages
> > that are output to stderr and captured by the test harness.
> > There are quite a few tests that this causes failures for,
> > and because it's stderr, it's not as simple as just adding a new
> > filter to do 'sed -e "s/^\(.*\)64\(: .*$\)/\1\2/"' on stderr.
> 
> Thanks for testing!
> 
> I can rework the patches to leave stderr unchanged. I guess that this
> is preferable as opposed to updating the output expected by xfstests
> since xfstests should be usable with both old and new xfsprogs.

Well, normally the thing that needs to change is xfstests. We have
to handle all sorts of issues like this (core-utils people seem to
change error messge format at least once a year). it just more
complex for xfs_io because we've got to filter both stdout and
stderr separately and not cross the streams.

> > Further, errors returned change, which further screws up xfstests.
> > e.g. old code gives EFBIG when we try to use offsets beyond the
> > supported range, this patchset returns EINVAL.  That further
> > complicates any sort of error filtering we'll need to do.
> 
> I am very surprised that something apart from the error messages has
> changed. I would be interested to know on what architecture and for
> which test(s) (where) this happened, if you still remember.

Turns out this was a false detection - the test captures EINVAL
error message and turns it into a EFBIG error message, probably
because at one stage it was EFBIG. So the errno didn't change, just
the error filter didn't match and convert....

On Thu, Aug 25, 2016 at 01:04:02AM -0700, Christoph Hellwig wrote:
> On Wed, Aug 24, 2016 at 10:47:46PM +0200, Felix Janda wrote:
> > > screws up xfstests because it changes all the error messages
> > > that are output to stderr and captured by the test harness.
> > > There are quite a few tests that this causes failures for,
> > > and because it's stderr, it's not as simple as just adding a new
> > > filter to do 'sed -e "s/^\(.*\)64\(: .*$\)/\1\2/"' on stderr.
> > 
> > Thanks for testing!
> > 
> > I can rework the patches to leave stderr unchanged. I guess that this
> > is preferable as opposed to updating the output expected by xfstests
> > since xfstests should be usable with both old and new xfsprogs.
> 
> I would prefer to change the output if we can find a good way to
> filter it.  I suspect the issues are things like perror lines
> which would look odd if we leave the 64 back in.

right, it's pwrite64 -> pwrite that is the main issue. And yes, I
would prefer to filter it, too.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2016-08-25 22:02 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-13 17:04 [PATCHv2 xfsprogs 00/14] Convert from off64_t to off_t Felix Janda
2016-08-06 10:45 ` [PATCHv2 xfsprogs 04/14] replace [fl]stat64 by equivalent [fl]stat Felix Janda
2016-08-18 17:38   ` Christoph Hellwig
2016-08-06 10:45 ` [PATCHv2 xfsprogs 05/14] replace ftruncate64 by equivalent ftruncate Felix Janda
2016-08-18 17:38   ` Christoph Hellwig
2016-08-06 10:45 ` [PATCHv2 xfsprogs 06/14] replace lseek64 by equivalent lseek Felix Janda
2016-08-18 17:38   ` Christoph Hellwig
2016-08-06 10:45 ` [PATCHv2 xfsprogs 07/14] replace pread64/pwrite64 by equivalent pread/pwrite Felix Janda
2016-08-18 17:39   ` Christoph Hellwig
2016-08-06 11:03 ` [PATCHv2 xfsprogs 08/14] replace sendfile64 by equivalent sendfile Felix Janda
2016-08-18 17:39   ` Christoph Hellwig
2016-08-07  5:21 ` [PATCHv2 xfsprogs 01/14] configure: use AC_SYS_LARGEFILE Felix Janda
2016-08-18 17:37   ` Christoph Hellwig
2016-08-07  5:28 ` [PATCHv2 xfsprogs 03/14] remove unecessary definitions of _FILE_OFFSET_BITS Felix Janda
2016-08-18 17:38   ` Christoph Hellwig
2016-08-07  5:52 ` [PATCHv2 xfsprogs 14/14] platform: remove use of off64_t Felix Janda
2016-08-18 17:45   ` Christoph Hellwig
2016-08-13 16:03 ` [PATCHv2 xfsprogs 13/14] xfs.h: require transparent LFS for all users Felix Janda
2016-08-18 17:45   ` Christoph Hellwig
2016-08-13 16:03 ` [PATCHv2 xfsprogs 09/14] fadvise.c: replace posix_fadvise64 by equivalent posix_fadvise Felix Janda
2016-08-18 17:42   ` Christoph Hellwig
2016-08-13 16:17 ` [PATCHv2 xfsprogs 10/14] Makefile: disable fsr for Mac OS X Felix Janda
2016-08-18 17:43   ` Christoph Hellwig
2016-08-13 16:20 ` [PATCHv2 xfsprogs 11/14] fsr: remove workaround for statvfs on " Felix Janda
2016-08-18 17:44   ` Christoph Hellwig
2016-08-13 16:22 ` [PATCHv2 xfsprogs 12/14] replace statvfs64 by equivalent statvfs Felix Janda
2016-08-18 17:44   ` Christoph Hellwig
2016-08-13 16:50 ` [PATCHv2 xfsprogs 02/14] configure: error out when LFS does not work Felix Janda
2016-08-18 17:37   ` Christoph Hellwig
2016-08-22  3:09 ` [PATCHv2 xfsprogs 00/14] Convert from off64_t to off_t Dave Chinner
2016-08-22  7:06   ` Felix Janda
2016-08-22 11:51     ` Dave Chinner
2016-08-22 19:16       ` Felix Janda
2016-08-24  1:19 ` Dave Chinner
2016-08-24 20:47   ` Felix Janda
2016-08-25  8:04     ` Christoph Hellwig
2016-08-25 22:01     ` Dave Chinner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).