public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: fstests@vger.kernel.org
Cc: Jan Kara <jack@suse.cz>
Subject: [PATCH 1/6] dmhugedisk: Allow specifying of chunk size
Date: Tue, 29 May 2018 18:55:56 +0200	[thread overview]
Message-ID: <20180529165601.32133-2-jack@suse.cz> (raw)
In-Reply-To: <20180529165601.32133-1-jack@suse.cz>

Ext4 will want to use dmhugedisk infrastructure for testing resize bugs.
Ext4 fs images are rather sparse (especially with smaller block sizes) so
the current chunk size of 512 sectors leads to large space consumption.
Allow test to specify chunk size.

Signed-off-by: Jan Kara <jack@suse.cz>
---
 common/dmhugedisk | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/common/dmhugedisk b/common/dmhugedisk
index 4d3b63fcfcca..733b10cd2292 100644
--- a/common/dmhugedisk
+++ b/common/dmhugedisk
@@ -31,6 +31,11 @@ _dmhugedisk_init()
 {
 	test -z "$1" && _fatal "must specify sector count to _dmhugedisk_init"
 	local dm_backing_dev=$SCRATCH_DEV
+	local chunk_size="$2"
+
+	if [ -z "$chunk_size" ]; then
+		chunk_size=512
+	fi
 
 	$DMSETUP_PROG remove huge-test > /dev/null 2>&1
 	$DMSETUP_PROG remove huge-test-zero > /dev/null 2>&1
@@ -41,7 +46,7 @@ _dmhugedisk_init()
 	DMHUGEDISK_DEV='/dev/mapper/huge-test'
 
 	DMHUGEDISK_ZERO_TABLE="0 $blk_dev_size zero"
-	DMHUGEDISK_DEV_TABLE="0 $blk_dev_size snapshot $DMHUGEDISK_ZERO $SCRATCH_DEV N 512"
+	DMHUGEDISK_DEV_TABLE="0 $blk_dev_size snapshot $DMHUGEDISK_ZERO $SCRATCH_DEV N $chunk_size"
 
 	$DMSETUP_PROG create huge-test-zero --table "$DMHUGEDISK_ZERO_TABLE" || \
 		_fatal "failed to create dm huge zero device"
-- 
2.13.6


  reply	other threads:[~2018-05-29 16:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-29 16:55 [PATCH 0/6] ext4: Test for resize overflow Jan Kara
2018-05-29 16:55 ` Jan Kara [this message]
2018-05-29 16:55 ` [PATCH 2/6] ext4: Test for s_inodes_count overflow during fs resize Jan Kara
2018-05-29 16:55 ` [PATCH 3/6] xfs/310: Cleanup Jan Kara
2018-05-29 22:01   ` Dave Chinner
2018-05-29 16:55 ` [PATCH 4/6] ext4/032: Fix up resize2fs usage Jan Kara
2018-05-29 16:56 ` [PATCH 5/6] ext4/010: Fixup resize2fs and dumpe2fs usage Jan Kara
2018-05-29 16:56 ` [PATCH 6/6] ext4/306: Fixup resize2fs usage 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=20180529165601.32133-2-jack@suse.cz \
    --to=jack@suse.cz \
    --cc=fstests@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