* Fri Nov 20 2009 Eric Sandeen <sandeen@redhat.com> 3.0.3-3
- Fix up build issues w.r.t. off64_t
This commit is contained in:
parent
e131f8ad55
commit
d95e8e363a
@ -17,6 +17,25 @@ Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
|
|||||||
Reviewed-by: Andi Kleen <andi@firstfloor.org>
|
Reviewed-by: Andi Kleen <andi@firstfloor.org>
|
||||||
---
|
---
|
||||||
|
|
||||||
|
From: Christoph Hellwig <hch@lst.de>
|
||||||
|
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 <hch@lst.de>
|
||||||
|
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
|
||||||
|
---
|
||||||
|
|
||||||
Index: xfsprogs-3.0.3/include/darwin.h
|
Index: xfsprogs-3.0.3/include/darwin.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xfsprogs-3.0.3.orig/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
|
#define HAVE_FID 1
|
||||||
|
|
||||||
+static __inline__ int
|
+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;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
@ -41,7 +60,7 @@ Index: xfsprogs-3.0.3/include/freebsd.h
|
|||||||
}
|
}
|
||||||
|
|
||||||
+static __inline__ int
|
+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;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
@ -56,7 +75,7 @@ Index: xfsprogs-3.0.3/include/irix.h
|
|||||||
}
|
}
|
||||||
|
|
||||||
+static __inline__ int
|
+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;
|
+ return 0;
|
||||||
+}
|
+}
|
||||||
@ -77,9 +96,9 @@ Index: xfsprogs-3.0.3/include/linux.h
|
|||||||
+#endif
|
+#endif
|
||||||
+
|
+
|
||||||
+static __inline__ int
|
+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)
|
+ if (ioctl(fd, BLKDISCARD, &range) < 0)
|
||||||
+ return errno;
|
+ return errno;
|
||||||
@ -102,7 +121,7 @@ Index: xfsprogs-3.0.3/man/man8/mkfs.xfs.8
|
|||||||
]
|
]
|
||||||
.I device
|
.I device
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
@@ -715,6 +717,9 @@ manual entries for additional informatio
|
@@ -714,6 +716,9 @@ manual entries for additional informatio
|
||||||
.B \-N
|
.B \-N
|
||||||
Causes the file system parameters to be printed out without really
|
Causes the file system parameters to be printed out without really
|
||||||
creating the file system.
|
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.orig/mkfs/xfs_mkfs.c
|
||||||
+++ xfsprogs-3.0.3/mkfs/xfs_mkfs.c
|
+++ xfsprogs-3.0.3/mkfs/xfs_mkfs.c
|
||||||
@@ -735,6 +735,20 @@ done:
|
@@ -604,6 +604,20 @@ done:
|
||||||
free(buf);
|
free(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -137,7 +156,7 @@ Index: xfsprogs-3.0.3/mkfs/xfs_mkfs.c
|
|||||||
int
|
int
|
||||||
main(
|
main(
|
||||||
int argc,
|
int argc,
|
||||||
@@ -811,6 +825,7 @@ main(
|
@@ -680,6 +694,7 @@ main(
|
||||||
int nvflag;
|
int nvflag;
|
||||||
int nci;
|
int nci;
|
||||||
int Nflag;
|
int Nflag;
|
||||||
@ -145,7 +164,7 @@ Index: xfsprogs-3.0.3/mkfs/xfs_mkfs.c
|
|||||||
char *p;
|
char *p;
|
||||||
char *protofile;
|
char *protofile;
|
||||||
char *protostring;
|
char *protostring;
|
||||||
@@ -869,7 +884,7 @@ main(
|
@@ -740,7 +755,7 @@ main(
|
||||||
xi.isdirect = LIBXFS_DIRECT;
|
xi.isdirect = LIBXFS_DIRECT;
|
||||||
xi.isreadonly = LIBXFS_EXCLUSIVELY;
|
xi.isreadonly = LIBXFS_EXCLUSIVELY;
|
||||||
|
|
||||||
@ -154,7 +173,7 @@ Index: xfsprogs-3.0.3/mkfs/xfs_mkfs.c
|
|||||||
switch (c) {
|
switch (c) {
|
||||||
case 'C':
|
case 'C':
|
||||||
case 'f':
|
case 'f':
|
||||||
@@ -1385,6 +1400,9 @@ main(
|
@@ -1256,6 +1271,9 @@ main(
|
||||||
case 'N':
|
case 'N':
|
||||||
Nflag = 1;
|
Nflag = 1;
|
||||||
break;
|
break;
|
||||||
@ -164,7 +183,7 @@ Index: xfsprogs-3.0.3/mkfs/xfs_mkfs.c
|
|||||||
case 'p':
|
case 'p':
|
||||||
if (protofile)
|
if (protofile)
|
||||||
respec('p', NULL, 0);
|
respec('p', NULL, 0);
|
||||||
@@ -1772,6 +1790,14 @@ main(
|
@@ -1644,6 +1662,14 @@ main(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Summary: Utilities for managing the XFS filesystem
|
Summary: Utilities for managing the XFS filesystem
|
||||||
Name: xfsprogs
|
Name: xfsprogs
|
||||||
Version: 3.0.3
|
Version: 3.0.3
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
# Licensing based on generic "GNU GENERAL PUBLIC LICENSE"
|
# Licensing based on generic "GNU GENERAL PUBLIC LICENSE"
|
||||||
# in source, with no mention of version.
|
# in source, with no mention of version.
|
||||||
# doc/COPYING file specifies what is GPL and what is LGPL
|
# 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
|
%{_includedir}/xfs/xfs_types.h
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Nov 20 2009 Eric Sandeen <sandeen@redhat.com> 3.0.3-3
|
||||||
|
- Fix up build issues w.r.t. off64_t
|
||||||
|
|
||||||
* Tue Nov 10 2009 Eric Sandeen <sandeen@redhat.com> 3.0.3-2
|
* Tue Nov 10 2009 Eric Sandeen <sandeen@redhat.com> 3.0.3-2
|
||||||
- Add trim/discard & libblkid support
|
- Add trim/discard & libblkid support
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user