From d95e8e363a1f44a454f1eee6fd6edc7f3ff4de57 Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Fri, 20 Nov 2009 21:28:45 +0000 Subject: [PATCH] * Fri Nov 20 2009 Eric Sandeen 3.0.3-3 - Fix up build issues w.r.t. off64_t --- xfsprogs-3.0.3-trim.patch | 41 ++++++++++++++++++++++++++++----------- xfsprogs.spec | 5 ++++- 2 files changed, 34 insertions(+), 12 deletions(-) diff --git a/xfsprogs-3.0.3-trim.patch b/xfsprogs-3.0.3-trim.patch index 8ba97a0..e02356a 100644 --- a/xfsprogs-3.0.3-trim.patch +++ b/xfsprogs-3.0.3-trim.patch @@ -17,6 +17,25 @@ Reviewed-by: Eric Sandeen Reviewed-by: Andi Kleen --- +From: Christoph Hellwig +Date: Fri, 20 Nov 2009 09:55:15 +0000 (+0100) +Subject: xfsprogs: stop using off64_t in platform headers +X-Git-Url: http://git.kernel.org/?p=fs%2Fxfs%2Fxfsprogs-dev.git;a=commitdiff_plain;h=f96aff0c250ae8c70f50d5becb592723eb064f5d + +xfsprogs: stop using off64_t in platform headers + +Using off64_t may require special headers or compiler flags that aren't +always available, e.g. in the configure check in xfstests. Rever to a plain +uint64_t to make apps compile as before. + +While we're at it also rename the second argument of platform_discard_blocks +from end to len as that's what the BLKDISCARD ioctl excepts - we currently +always discard the whole device so it doesn't matter in practice. + +Signed-off-by: Christoph Hellwig +Reviewed-by: Eric Sandeen +--- + Index: xfsprogs-3.0.3/include/darwin.h =================================================================== --- xfsprogs-3.0.3.orig/include/darwin.h @@ -26,7 +45,7 @@ Index: xfsprogs-3.0.3/include/darwin.h #define HAVE_FID 1 +static __inline__ int -+platform_discard_blocks(int fd, off64_t start, off64_t end) ++platform_discard_blocks(int fd, uint64_t start, uint64_t len) +{ + return 0; +} @@ -41,7 +60,7 @@ Index: xfsprogs-3.0.3/include/freebsd.h } +static __inline__ int -+platform_discard_blocks(int fd, off64_t start, off64_t end) ++platform_discard_blocks(int fd, uint64_t start, uint64_t len) +{ + return 0; +} @@ -56,7 +75,7 @@ Index: xfsprogs-3.0.3/include/irix.h } +static __inline__ int -+platform_discard_blocks(int fd, off64_t start, off64_t end) ++platform_discard_blocks(int fd, uint64_t start, uint64_t len) +{ + return 0; +} @@ -77,9 +96,9 @@ Index: xfsprogs-3.0.3/include/linux.h +#endif + +static __inline__ int -+platform_discard_blocks(int fd, off64_t start, off64_t end) ++platform_discard_blocks(int fd, uint64_t start, uint64_t len) +{ -+ __uint64_t range[2] = { start, end }; ++ __uint64_t range[2] = { start, len }; + + if (ioctl(fd, BLKDISCARD, &range) < 0) + return errno; @@ -102,7 +121,7 @@ Index: xfsprogs-3.0.3/man/man8/mkfs.xfs.8 ] .I device .SH DESCRIPTION -@@ -715,6 +717,9 @@ manual entries for additional informatio +@@ -714,6 +716,9 @@ manual entries for additional informatio .B \-N Causes the file system parameters to be printed out without really creating the file system. @@ -116,7 +135,7 @@ Index: xfsprogs-3.0.3/mkfs/xfs_mkfs.c =================================================================== --- xfsprogs-3.0.3.orig/mkfs/xfs_mkfs.c +++ xfsprogs-3.0.3/mkfs/xfs_mkfs.c -@@ -735,6 +735,20 @@ done: +@@ -604,6 +604,20 @@ done: free(buf); } @@ -137,7 +156,7 @@ Index: xfsprogs-3.0.3/mkfs/xfs_mkfs.c int main( int argc, -@@ -811,6 +825,7 @@ main( +@@ -680,6 +694,7 @@ main( int nvflag; int nci; int Nflag; @@ -145,7 +164,7 @@ Index: xfsprogs-3.0.3/mkfs/xfs_mkfs.c char *p; char *protofile; char *protostring; -@@ -869,7 +884,7 @@ main( +@@ -740,7 +755,7 @@ main( xi.isdirect = LIBXFS_DIRECT; xi.isreadonly = LIBXFS_EXCLUSIVELY; @@ -154,7 +173,7 @@ Index: xfsprogs-3.0.3/mkfs/xfs_mkfs.c switch (c) { case 'C': case 'f': -@@ -1385,6 +1400,9 @@ main( +@@ -1256,6 +1271,9 @@ main( case 'N': Nflag = 1; break; @@ -164,7 +183,7 @@ Index: xfsprogs-3.0.3/mkfs/xfs_mkfs.c case 'p': if (protofile) respec('p', NULL, 0); -@@ -1772,6 +1790,14 @@ main( +@@ -1644,6 +1662,14 @@ main( } } diff --git a/xfsprogs.spec b/xfsprogs.spec index c0df91c..bdc8f56 100644 --- a/xfsprogs.spec +++ b/xfsprogs.spec @@ -1,7 +1,7 @@ Summary: Utilities for managing the XFS filesystem Name: xfsprogs Version: 3.0.3 -Release: 2%{?dist} +Release: 3%{?dist} # Licensing based on generic "GNU GENERAL PUBLIC LICENSE" # in source, with no mention of version. # doc/COPYING file specifies what is GPL and what is LGPL @@ -197,6 +197,9 @@ rm -rf $RPM_BUILD_ROOT %{_includedir}/xfs/xfs_types.h %changelog +* Fri Nov 20 2009 Eric Sandeen 3.0.3-3 +- Fix up build issues w.r.t. off64_t + * Tue Nov 10 2009 Eric Sandeen 3.0.3-2 - Add trim/discard & libblkid support