From: Jan Andres <jandres@gmx.net>
To: linux-kernel@vger.kernel.org
Cc: linux-fsdevel@vger.kernel.org
Subject: [PATCH v2] isofs: Fix lseek() to position beyond 4 GB
Date: Wed, 4 Aug 2010 22:52:46 +0200 [thread overview]
Message-ID: <20100804205245.GA5312@pitr.home.jan> (raw)
In-Reply-To: <20100803211814.GA4436@pitr.home.jan>
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>
--- linux-2.6.35-j7/fs/isofs/inode.c.orig 2010-08-02 00:11:14.000000000 +0200
+++ linux-2.6.35-j7/fs/isofs/inode.c 2010-08-04 22:49:02.000000000 +0200
@@ -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
next prev parent reply other threads:[~2010-08-04 20:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-03 21:18 [PATCH] isofs: Fix lseek() to position beyond 4 GB Jan Andres
2010-08-03 21:23 ` Joe Perches
2010-08-04 20:52 ` Jan Andres [this message]
2010-09-30 22:14 ` [PATCH v2] " Jan Kara
2010-09-30 22:26 ` Jan Kara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100804205245.GA5312@pitr.home.jan \
--to=jandres@gmx.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.