From: Andreas Dilger <adilger@clusterfs.com>
To: Goldwyn Rodrigues <Goldwynr@noida.hcltech.com>
Cc: linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org,
jbglaw@liug-owl.de
Subject: Re: [PATCH] Pushing file size limits to 4TB on ext3
Date: Wed, 07 Jul 2004 04:35:04 +0000 [thread overview]
Message-ID: <20040707043504.GN3002@schnapps.adilger.int> (raw)
In-Reply-To: <33BC33A9E76474479B76AD0DE8A169728DAF@exch-ntd.nec.noida.hcltech.com>
[-- Attachment #1: Type: text/plain, Size: 3168 bytes --]
On Jul 07, 2004 09:18 +0530, Goldwyn Rodrigues wrote:
> Andreas suggested fields which deal with fragments could be used as they
> are not used by anyone. However, I did not get any response from anyone
> on whether those fields are being used. I did find the reference in the
> code, which has been used only for reading and writing inodes to disk.
> However, in order to change it to another 32-bit variable,
> #define i_blocks_high could be "redefined".
Since the addition of an RO_COMPAT field requires that e2fsprogs be fixed
to understand this change (and to validate that the i_blocks_high value
is sane, relative to the i_size) there is no harm in using the i_frag and
i_fsize fields. If you look at current e2fsck code, it _requires_ that
i_frag and i_fsize are zero so they could not possibly be used for anything.
Having a 16-bit field for the i_blocks_high is enough and is guaranteed not
to conflict with HURD.
> @@ -2651,7 +2661,29 @@ static int ext3_do_update_inode(handle_t
> } else {
> raw_inode->i_size_high =
> cpu_to_le32(ei->i_disksize >> 32);
> - if (ei->i_disksize > 0x7fffffffULL) {
> +
> + if (ei->i_disksize > 0x1ffffffffffULL) {
> + struct super_block *sb = inode->i_sb;
> + if (!EXT3_HAS_RO_COMPAT_FEATURE(sb, EXT3_FEATURE_RO_COMPAT_4TB_FILE) || EXT3_SB(sb)->s_es->s_rev_level == cpu_to_le32(EXT3_GOOD_OLD_REV)) {
1) Please wrap lines at 80 characters
2) This check should actually be done at i_blocks > 0xffffffffULL instead of
being related to the file size. It should be possible to have large
sparse files that do not cause this feature flag to be invoked.
3) The feature should be called something like "RO_COMPAT_MANY_BLOCKS" or
similar, since it isn't necessarily related to 4TB file sizes.
4) It is better to keep this feature independent from RO_COMPAT_LARGE_FILE,
since that is related to i_size. Just do two separate tests here.
> @@ -1172,8 +1172,8 @@ static loff_t ext3_max_size(int bits)
> res += 1LL << (2*(bits-2));
> res += 1LL << (3*(bits-2));
> res <<= bits;
> - if (res > (512LL << 32) - (1 << bits))
> - res = (512LL << 32) - (1 << bits);
> + if (res > (1024LL << 32) - (1 << bits))
> + res = (1024LL << 32) - (1 << bits);
This doesn't make sense. The earlier checks already provide the correct
limits based on indirect blocks (although it would be good to independently
verify that). With your patch we are not limited to 4TB at all (think larger
block sizes) so there is no reason to add this extra limit.
> +config EXT3_LARGE_FILE_SUPPORT
> + bool "Large File (>2TB) Support (EXPERIMENTAL)"
> + depends on EXT3_FS
> + depends on LBD
> + default n
> + help
> + Ext3 filesystem currently has a limit of 2TB. This experimental
> + release extends this limit to 8TB by using the reserved fields
^^^ 4TB (or more with blocksize
larger than 4kB on 64-bit
systems)
Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://members.shaw.ca/adilger/ http://members.shaw.ca/golinux/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
prev parent reply other threads:[~2004-07-07 4:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-07 3:50 [PATCH] Pushing file size limits to 4TB on ext3 Goldwyn Rodrigues
2004-07-07 4:35 ` Andreas Dilger [this message]
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=20040707043504.GN3002@schnapps.adilger.int \
--to=adilger@clusterfs.com \
--cc=Goldwynr@noida.hcltech.com \
--cc=jbglaw@liug-owl.de \
--cc=linux-ia64@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox