]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
Reduce XFS_MAX_FILE_OFFSET to something Linux can handle
authorEric Sandeen <sandeen@sgi.com>
Tue, 22 Jan 2002 19:03:35 +0000 (19:03 +0000)
committerEric Sandeen <sandeen@sgi.com>
Tue, 22 Jan 2002 19:03:35 +0000 (19:03 +0000)
include/xfs_inode.h

index 35be1e3ba4c7e35986134b471625b835a4c902ac..40b90568af0d1041eaae4865cd29fe8dfe700d78 100644 (file)
@@ -457,15 +457,18 @@ void xfs_ifork_next_set(xfs_inode_t *ip, int w, int n);
 #define        XFS_ITRUNC_MAYBE        0x2
 
 /*
- * Maximum file size.
- * if XFS_BIG_FILES 2^63 - 1 (largest positive value of xfs_fsize_t)
+ * if XFS_BIG_FILES, 2^(32+PAGE_SHIFT) - 1 (due to linux page cache),
  * else 2^40 - 1 (40=31+9) (might be an int holding a block #)
- * Note, we allow seeks to this offset, although you can't read or write.
  * For the not XFS_BIG_FILES case, the value could be 1 higher but we don't
  * do that, for symmetry.
+ *
+ * NOTE: XFS itself can handle 2^63 - 1 (largest positive value of xfs_fsize_t)
+ * but Linux can't go above 2^(32+PAGE_SHIFT)-1: the Linux VM uses a 32 bit
+ * page number index to index cache data, so 2^32 * PAGE_SIZE is as big as 
+ * you can go.
  */
 #if XFS_BIG_FILES
-#define XFS_MAX_FILE_OFFSET    ((long long)((1ULL<<63)-1ULL))
+#define XFS_MAX_FILE_OFFSET    ((long long)((1ULL<<(32+PAGE_SHIFT))-1ULL))
 #else
 #define        XFS_MAX_FILE_OFFSET     ((1LL<<40)-1LL)
 #endif