Commit 8f282b93 authored by Eric Sandeen's avatar Eric Sandeen Committed by Nathan Scott

[XFS] Merge max file offset fix - use standard Linux macros

SGI Modid: 2.5.x-xfs:slinx:135881a
parent ef101b97
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/major.h> #include <linux/major.h>
#include <linux/pagemap.h>
#include <linux/vfs.h> #include <linux/vfs.h>
#include <asm/page.h> #include <asm/page.h>
......
...@@ -414,11 +414,9 @@ void xfs_ifork_next_set(xfs_inode_t *ip, int w, int n); ...@@ -414,11 +414,9 @@ void xfs_ifork_next_set(xfs_inode_t *ip, int w, int n);
* max file offset is 2^(31+PAGE_SHIFT) - 1 (due to linux page cache) * max file offset is 2^(31+PAGE_SHIFT) - 1 (due to linux page cache)
* *
* NOTE: XFS itself can handle 2^63 - 1 (largest positive value of xfs_fsize_t) * NOTE: XFS itself can handle 2^63 - 1 (largest positive value of xfs_fsize_t)
* but Linux can't go above 2^(31+PAGE_SHIFT)-1: the Linux VM uses a 32 bit * but this is the Linux limit.
* signed variable to index cache data, so 2^31 * PAGE_SIZE is as big as
* you can go.
*/ */
#define XFS_MAX_FILE_OFFSET ((long long)((1ULL<<(31+PAGE_SHIFT))-1ULL)) #define XFS_MAX_FILE_OFFSET MAX_LFS_FILESIZE
#if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_ITOV) #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_ITOV)
struct vnode *xfs_itov(xfs_inode_t *ip); struct vnode *xfs_itov(xfs_inode_t *ip);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment