diff mbox

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

Message ID 20160809180320.GB4476@nyan (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Felix Janda Aug. 9, 2016, 6: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>
---
Christoph Hellwig wrote:
> > +extern int xfs_assert_largefile[sizeof(off_t)-8];
> 
> Please add a comment on why we have this declaration, otherwise this
> looks fine to me:
> 
> Reviewed-by: Christoph Hellwig <hch@lst.de>

A simple comment is added.
---
 include/xfs.h | 5 ++
 1 file changed, 5 insertions(+)

Comments

Christoph Hellwig Aug. 12, 2016, 2:56 a.m. UTC | #1
Looks fine,

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

Patch

diff --git a/include/xfs.h b/include/xfs.h
index 7bed957..37c95fe 100644
--- a/include/xfs.h
+++ b/include/xfs.h
@@ -47,6 +47,11 @@ 
 # error unknown platform... have fun porting!
 #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
  */