From: Eric Sandeen Date: Tue, 22 Jan 2002 19:03:35 +0000 (+0000) Subject: Reduce XFS_MAX_FILE_OFFSET to something Linux can handle X-Git-Tag: v2.0.0~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f9cea3993eea566a8f4a4909497fdbd20b9a4c4;p=thirdparty%2Fxfsprogs-dev.git Reduce XFS_MAX_FILE_OFFSET to something Linux can handle --- diff --git a/include/xfs_inode.h b/include/xfs_inode.h index 35be1e3ba..40b90568a 100644 --- a/include/xfs_inode.h +++ b/include/xfs_inode.h @@ -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