diff mbox

[PATCHv2,xfsprogs,13/14] xfs.h: require transparent LFS for all users

Message ID 663326cb534467d534360d23acb02dc535caa909.1471107858.git.felix.janda@posteo.de (mailing list archive)
State Accepted
Headers show

Commit Message

Felix Janda Aug. 13, 2016, 4:03 p.m. UTC
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(+)

Comments

Christoph Hellwig Aug. 18, 2016, 5:45 p.m. UTC | #1
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>
diff mbox

Patch

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