summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorJan Andres <jandres@gmx.net>2010-08-05 00:52:46 +0400
committerAl Viro <viro@zeniv.linux.org.uk>2010-08-11 08:29:47 +0400
commit66a362a2aa8ffa72670259fa15e2a77a01cc2217 (patch)
treedc41e40bb9e0e8c9f1a5947c23670da9e8ba9b49 /fs
parent532490f0a5350fd92d838b7430a4c846bc8eac3f (diff)
downloadlinux-66a362a2aa8ffa72670259fa15e2a77a01cc2217.tar.xz
isofs: Fix lseek() to position beyond 4 GB
isofs supports files larger than 4 GB by using multi-extent files. However an lseek() to a position beyond 4 GB in such a file will fail with EINVAL, because s_maxbytes in the isofs superblock is initialized to 2^32-1, and generic_file_llseek() checks against that value. I therefore suggest increasing the value of s_maxbytes to have full support for large files in isofs. With multi-extent files, file size is only limited by the maximum size of the file system (8 TB), so this seems a reasonable value for s_maxbytes. Signed-off-by: Jan Andres <jandres@gmx.net> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/isofs/inode.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c
index 6b4dcd4f2943..5a44811b5027 100644
--- a/fs/isofs/inode.c
+++ b/fs/isofs/inode.c
@@ -722,7 +722,12 @@ root_found:
}
s->s_magic = ISOFS_SUPER_MAGIC;
- s->s_maxbytes = 0xffffffff; /* We can handle files up to 4 GB */
+
+ /*
+ * With multi-extent files, file size is only limited by the maximum
+ * size of a file system, which is 8 TB.
+ */
+ s->s_maxbytes = 0x80000000000LL;
/*
* The CDROM is read-only, has no nodes (devices) on it, and since