From: Eric Sandeen <sandeen@redhat.com>
To: Valerie Aurora Henson <vaurora@redhat.com>
Cc: Andreas Dilger <adilger@sun.com>, Theodore Tso <tytso@mit.edu>,
linux-ext4@vger.kernel.org
Subject: Re: [RFC PATCH 14/17] super->s_*_blocks_count -> ext2fs_*_blocks_count()
Date: Fri, 14 Nov 2008 10:24:10 -0600 [thread overview]
Message-ID: <491DA62A.5020908@redhat.com> (raw)
In-Reply-To: <20081114032531.GI20637@shell>
Valerie Aurora Henson wrote:
> On Thu, Nov 13, 2008 at 01:24:41PM -0700, Andreas Dilger wrote:
>> Since it isn't yet common to be able to test > 32-bit blocks
>> these bugs may go unnoticed for some time. It would be nice to be able
>> to test 64-bit support easily with e2fsprogs. Maybe truncate file
>> to > 16TB in size (abort if underlying filesystem isn't able to do this),
>> use "lazy_bg" or equivalent to avoid writing many GB of data into the
>> sparse file, then run e2fsck on it after putting some files at the end.
>> This could probably be done by the "script" support in "make check".
>
> Unfortunately, ext4 doesn't support a file this big so you'd have to
> deliberately put your e2fsprogs tree on XFS or something like that for
> this automatic check to actually help - not a terribly common
> situation for an e2fsprogs developer. (I'm doing all my testing on
> sparse files on XFS, which definitely chafes - nothing wrong with XFS,
> just kind of annoying that I can't self-host e2fsprogs development.)
>
> Hummm... Would it work to use LVM to glue together two loopback
> devices backed by files that sum to just over 16TB?
Or you could play with devicemapper, see
Documentation/device-mapper/zero.txt:
One very interesting use of dm-zero is for creating "sparse" devices in
conjunction with dm-snapshot. A sparse device reports a device-size
larger than the amount of actual storage space available for that
device. A user can write data anywhere within the sparse device and read
it back like a normal device. Reads to previously unwritten areas will
return a zero'd buffer. When enough data has been written to fill up the
actual storage space, the sparse device is deactivated. This can be very
useful for testing device and filesystem limitations.
To create a sparse device, start by creating a dm-zero device that's the
desired size of the sparse device. For this example, we'll assume a 10TB
sparse device.
TEN_TERABYTES=`expr 10 \* 1024 \* 1024 \* 1024 \* 2` # 10 TB in sectors
echo "0 $TEN_TERABYTES zero" | dmsetup create zero1
Then create a snapshot of the zero device, using any available
block-device as the COW device. The size of the COW device will
determine the amount of real space available to the sparse device. For
this example, we'll assume /dev/sdb1 is an available 10GB partition.
echo "0 $TEN_TERABYTES snapshot /dev/mapper/zero1 /dev/sdb1 p 128" | \
dmsetup create sparse1
This will create a 10TB sparse device called /dev/mapper/sparse1 that
has 10GB of actual storage space available. If more than 10GB of data is
written to this device, it will start returning I/O errors.
-Eric
next prev parent reply other threads:[~2008-11-14 16:24 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-12 3:42 [RFC,PATCH] 64-bit support for e2fsprogs Valerie Aurora Henson
2008-11-12 3:42 ` [RFC PATCH 01/17] Disable tst_refcount - doesn't compile, don't know why Valerie Aurora Henson
2008-11-12 3:42 ` [RFC PATCH 02/17] Squash warnings Valerie Aurora Henson
2008-11-12 3:42 ` [RFC PATCH 03/17] Add 64-bit bitops Valerie Aurora Henson
2008-11-12 3:42 ` [RFC PATCH 04/17] Implement 64-bit "bitarray" bmap ops Valerie Aurora Henson
2008-11-12 3:42 ` [RFC PATCH 05/17] Convert libext2fs to 64-bit bitmap interface Valerie Aurora Henson
2008-11-12 3:42 ` [RFC PATCH 06/17] Convert mke2fs to new " Valerie Aurora Henson
2008-11-12 3:43 ` [RFC PATCH 07/17] Convert e2fsck " Valerie Aurora Henson
2008-11-12 3:43 ` [RFC PATCH 08/17] Turn on new bitmaps in e2fsck and mke2fs Valerie Aurora Henson
2008-11-12 3:43 ` [RFC PATCH 09/17] Add progress bar for allocating block tables - takes forever on large Valerie Aurora Henson
2008-11-12 3:43 ` [RFC PATCH 10/17] signed int -> blk64_t to fix bugs at 2^31 - 2^32 blocks Valerie Aurora Henson
2008-11-12 3:43 ` [RFC PATCH 11/17] Fix overflow in calculation of total file system blocks Valerie Aurora Henson
2008-11-12 3:43 ` [RFC PATCH 12/17] Add ext2fs_block_iterate3 (from Ted) Valerie Aurora Henson
2008-11-12 3:43 ` [RFC PATCH 13/17] Support 48-bit file acl blocks Valerie Aurora Henson
2008-11-12 3:43 ` [RFC PATCH 14/17] super->s_*_blocks_count -> ext2fs_*_blocks_count() Valerie Aurora Henson
2008-11-12 3:43 ` [RFC PATCH 15/17] Convert to inode/block/bitmap/table loc()/loc_set() functions Valerie Aurora Henson
2008-11-12 3:43 ` [RFC PATCH 16/17] ext2fs_block_alloc_stats -> ext2fs_block_alloc_stats2 Valerie Aurora Henson
2008-11-12 3:43 ` [RFC PATCH 17/17] Convert to 64-bit IO Valerie Aurora Henson
2008-11-13 20:26 ` [RFC PATCH 15/17] Convert to inode/block/bitmap/table loc()/loc_set() functions Andreas Dilger
2008-11-13 20:24 ` [RFC PATCH 14/17] super->s_*_blocks_count -> ext2fs_*_blocks_count() Andreas Dilger
2008-11-14 3:25 ` Valerie Aurora Henson
2008-11-14 16:24 ` Eric Sandeen [this message]
2008-11-13 20:14 ` [RFC PATCH 13/17] Support 48-bit file acl blocks Andreas Dilger
2008-11-14 2:30 ` Valerie Aurora Henson
2008-11-13 20:04 ` [RFC PATCH 11/17] Fix overflow in calculation of total file system blocks Andreas Dilger
2008-11-14 2:34 ` Valerie Aurora Henson
2008-11-14 3:10 ` 64-bit inode support in e2fsprogs? (was Re: [RFC PATCH 11/17] Fix overflow in calculation of total file system blocks) Valerie Aurora Henson
2008-11-14 20:32 ` Andreas Dilger
2008-11-13 19:57 ` [RFC PATCH 10/17] signed int -> blk64_t to fix bugs at 2^31 - 2^32 blocks Andreas Dilger
2008-11-14 2:38 ` Valerie Aurora Henson
2008-11-14 3:42 ` Eric Sandeen
2008-11-14 3:54 ` Valerie Aurora Henson
2008-11-14 4:04 ` Eric Sandeen
2008-11-14 14:24 ` Theodore Tso
2008-11-14 20:35 ` Andreas Dilger
2008-11-16 15:06 ` Theodore Tso
2008-11-13 19:54 ` [RFC PATCH 09/17] Add progress bar for allocating block tables - takes forever on large Andreas Dilger
2008-11-14 2:45 ` Valerie Aurora Henson
2008-11-12 20:47 ` [RFC PATCH 04/17] Implement 64-bit "bitarray" bmap ops Andreas Dilger
2008-11-14 2:59 ` Valerie Aurora Henson
2008-11-12 20:25 ` [RFC,PATCH] 64-bit support for e2fsprogs Andreas Dilger
2008-11-13 20:30 ` Theodore Tso
2008-11-14 3:01 ` Valerie Aurora Henson
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=491DA62A.5020908@redhat.com \
--to=sandeen@redhat.com \
--cc=adilger@sun.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=vaurora@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).