From: Andreas Dilger <adilger@sun.com>
To: Josef Bacik <jbacik@redhat.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH] e2fsprogs: play with 8TB to 16TB fs's better
Date: Tue, 8 Jan 2008 16:02:16 -0700 [thread overview]
Message-ID: <20080108230215.GI3351@webber.adilger.int> (raw)
In-Reply-To: <20080108193325.GB3323@unused.rdu.redhat.com>
On Jan 08, 2008 14:33 -0500, Josef Bacik wrote:
> @@ -190,8 +190,13 @@ errcode_t ext2fs_get_device_size(const c
> ioctl(fd, BLKGETSIZE64, &size64) >= 0) {
> if ((sizeof(*retblocks) < sizeof(unsigned long long)) &&
> ((size64 / blocksize) > 0xFFFFFFFF)) {
> - rc = EFBIG;
> - goto out;
> + /* 16tb fs is fine, just adjust slightly */
> + if ((size64 / blocksize) == 0x100000000) {
> + size64--;
> + } else {
> + rc = EFBIG;
> + goto out;
> + }
It might be cleaner to localize this check/fixup into a small helper function?
> +++ e2fsprogs/misc/mke2fs.c
> @@ -1455,13 +1455,6 @@ static void PRS(int argc, char *argv[])
> - if (!force && fs_param.s_blocks_count >= ((unsigned) 1 << 31)) {
> - com_err(program_name, 0,
> - _("Filesystem too large. No more than 2**31-1 blocks\n"
> - "\t (8TB using a blocksize of 4k) are currently supported."));
> - exit(1);
> - }
> -
> if ((blocksize > 4096) &&
> (fs_param.s_feature_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL))
> fprintf(stderr, _("\nWarning: some 2.4 kernels do not support "
It is also worthwhile to report at least a warning for filesystems larger
than 0x7fffffff blocks that older kernels (2.6.18 and older, IIRC) don't
necessarily work correctly with such large filesystems.
Doing something like having mke2fs zero out block 1, flush it from cache
with ioctl(BLKFLSBUF), then write some data at 8TB+1 to verify it doesn't
clobber block 1 might also be prudent. I've seen some RAID arrays do this
in the past, and when we pass 0xffffffff blocks we should do the same so
it may as well be a simple helper function.
Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.
next prev parent reply other threads:[~2008-01-08 23:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-08 19:33 [PATCH] e2fsprogs: play with 8TB to 16TB fs's better Josef Bacik
2008-01-08 23:02 ` Andreas Dilger [this message]
2008-01-09 21:04 ` Josef Bacik
2008-01-10 3:59 ` Andreas Dilger
2008-01-10 21:53 ` Josef Bacik
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=20080108230215.GI3351@webber.adilger.int \
--to=adilger@sun.com \
--cc=jbacik@redhat.com \
--cc=linux-ext4@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