xfs
[Top] [All Lists]

maximum file size on ia64

To: linux-xfs@xxxxxxxxxxx
Subject: maximum file size on ia64
From: ASANO Masahiro <masano@xxxxxxxxxxxxxx>
Date: Fri, 26 Jul 2002 12:04:17 +0900 (JST)
Sender: owner-linux-xfs@xxxxxxxxxxx
Hi,

Linux-XFS file size is currently restricted to 2^(31+PAGE_SHIFT)-1
bytes.

On 64bit linux, I expect we are 9000PB ready for the size of sparse
file, because the data type of page cache indices is "unsigned long"
and it has 64bits. What do you think about it?

8<------8<------8<------8<------8<------8<------8<------
--- linux/fs/xfs/xfs_inode.h    12 Jul 2002 16:42:01 -0000      1.164
+++ linux/fs/xfs/xfs_inode.h    26 Jul 2002 02:41:40 -0000
@@ -442,7 +442,11 @@
  * signed variable to index cache data, so 2^31 * PAGE_SIZE is as big as
  * you can go.
  */
+#if BITS_PER_LONG == 64
+#define XFS_MAX_FILE_OFFSET    ((long long)((1ULL<<63)-1ULL))
+#else
 #define XFS_MAX_FILE_OFFSET    ((long long)((1ULL<<(31+PAGE_SHIFT))-1ULL))
+#endif
 
 #if XFS_WANT_FUNCS || (XFS_WANT_SPACE && XFSSO_XFS_ITOV)
 struct vnode *xfs_itov(xfs_inode_t *ip);
8<------8<------8<------8<------8<------8<------8<------


BTW xfs_repair removes a file whose length is 2^63-n (0<n<=4096).
We should not remove it, I think.
Though it is unrealistic. :-)

8<------8<------8<------8<------8<------8<------8<------
--- cmd/xfsprogs/repair/dinode.c        4 Jun 2002 23:07:56 -0000       1.9
+++ cmd/xfsprogs/repair/dinode.c        26 Jul 2002 01:40:30 -0000
@@ -599,7 +599,7 @@
                                        ino, s, s + c - 1, o);
                                return(1);
                        }
-                       if (o >= fs_max_file_offset)  {
+                       if (o > fs_max_file_offset)  {
                                do_warn(
 "inode %llu - extent offset too large - start %llu, count %llu, offset %llu\n",
                                        ino, s, c, o);
8<------8<------8<------8<------8<------8<------8<------

--
Masano


<Prev in Thread] Current Thread [Next in Thread>
  • maximum file size on ia64, ASANO Masahiro <=