linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@dilger.ca>
To: Jan Kara <jack@suse.cz>
Cc: Ted Tso <tytso@mit.edu>, linux-ext4@vger.kernel.org
Subject: Re: [PATCH 5/7] tests: Modify f_large_dir test to excercise indexed dir handling
Date: Tue, 18 Feb 2020 13:29:56 -0700	[thread overview]
Message-ID: <39788032-EB47-4ACB-8DA2-3E30B0772847@dilger.ca> (raw)
In-Reply-To: <20200213101602.29096-6-jack@suse.cz>

[-- Attachment #1: Type: text/plain, Size: 3003 bytes --]

On Feb 13, 2020, at 3:16 AM, Jan Kara <jack@suse.cz> wrote:
> 
> Modify f_large_dir test to create indexed directory and create entries
> in it. That way the new code in ext2fs_link() for addition of entries
> into indexed directories gets executed including various special cases
> when growing htree.
> 
> Signed-off-by: Jan Kara <jack@suse.cz>

Reviewed-by: Andreas Dilger <adilger@dilger.ca>

> ---
> tests/f_large_dir/expect | 10 ++++++++++
> tests/f_large_dir/script | 27 ++++++++++++++++++++++-----
> 2 files changed, 32 insertions(+), 5 deletions(-)
> 
> diff --git a/tests/f_large_dir/expect b/tests/f_large_dir/expect
> index 8f7d99dc1ee7..028234cc6bb5 100644
> --- a/tests/f_large_dir/expect
> +++ b/tests/f_large_dir/expect
> @@ -6,6 +6,16 @@ Allocating group tables:      \b\b\b\b\bdone
> Writing inode tables:      \b\b\b\b\bdone
> Writing superblocks and filesystem accounting information:      \b\b\b\b\bdone
> 
> +Pass 1: Checking inodes, blocks, and sizes
> +Pass 2: Checking directory structure
> +Pass 3: Checking directory connectivity
> +Pass 3A: Optimizing directories
> +Pass 4: Checking reference counts
> +Pass 5: Checking group summary information
> +
> +test.img: ***** FILE SYSTEM WAS MODIFIED *****
> +test.img: 17/65072 files (5.9% non-contiguous), 9732/108341 blocks
> +Exit status is 0
> Pass 1: Checking inodes, blocks, and sizes
> Pass 2: Checking directory structure
> Pass 3: Checking directory connectivity
> diff --git a/tests/f_large_dir/script b/tests/f_large_dir/script
> index 9af042ca6ca8..e3235836f997 100644
> --- a/tests/f_large_dir/script
> +++ b/tests/f_large_dir/script
> @@ -26,17 +26,33 @@ $MKE2FS -b 1024 -O large_dir,uninit_bg -N $((ENTRIES + 50)) \
> RC=$?
> if [ $RC -eq 0 ]; then
> {
> -	START=$SECONDS
> +	# First some initial fs setup to create indexed dir
> 	echo "mkdir /foo"
> 	echo "cd /foo"
> 	touch $TMPFILE.tmp
> 	echo "write $TMPFILE.tmp foofile"
> 	i=0
> -	last=0
> +	while test $i -lt $DIRENT_PER_LEAF ; do
> +		printf "mkdir d%0254u\n" $i
> +		i=$((i + 1));
> +	done
> +	echo "expand ./"
> +	printf "mkdir d%0254u\n" $i
> +} | $DEBUGFS -w $TMPFILE > /dev/null 2>> $OUT.new
> +	RC=$?
> +	# e2fsck should optimize the dir to become indexed
> +	$E2FSCK -yfD $TMPFILE >> $OUT.new 2>&1
> +	status=$?
> +	echo Exit status is $status >> $OUT.new
> +fi
> +
> +if [ $RC -eq 0 ]; then
> +{
> +	START=$SECONDS
> +	i=$(($DIRENT_PER_LEAF+1))
> +	last=$i
> +	echo "cd /foo"
> 	while test $i -lt $ENTRIES ; do
> -	    if test $((i % DIRENT_PER_LEAF)) -eq 0; then
> -	    	echo "expand ./"
> -	    fi
> 	    ELAPSED=$((SECONDS - START))
> 	    if test $((i % 5000)) -eq 0 -a $ELAPSED -gt 10; then
> 		RATE=$(((i - last) / ELAPSED))
> @@ -54,6 +70,7 @@ if [ $RC -eq 0 ]; then
> } | $DEBUGFS -w $TMPFILE > /dev/null 2>> $OUT.new
> 	RC=$?
> fi
> +
> if [ $RC -eq 0 ]; then
> 	$E2FSCK -yfD $TMPFILE >> $OUT.new 2>&1
> 	status=$?
> --
> 2.16.4
> 


Cheers, Andreas






[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 873 bytes --]

  reply	other threads:[~2020-02-18 20:29 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-13 10:15 [PATCH 0/7 v2] e2fsprogs: Better handling of indexed directories Jan Kara
2020-02-13 10:15 ` [PATCH 1/7] e2fsck: Clarify overflow link count error message Jan Kara
2020-02-14 19:27   ` Andreas Dilger
2020-03-07 18:52   ` Theodore Y. Ts'o
2020-02-13 10:15 ` [PATCH 2/7] e2fsck: Fix indexed dir rehash failure with metadata_csum enabled Jan Kara
2020-02-14 19:28   ` Andreas Dilger
2020-03-07 23:17   ` Theodore Y. Ts'o
2020-03-16  9:30     ` Jan Kara
2020-02-13 10:15 ` [PATCH 3/7] ext2fs: Update allocation info earlier in ext2fs_mkdir() and ext2fs_symlink() Jan Kara
2020-02-14 19:37   ` Andreas Dilger
2020-03-08  0:02   ` Theodore Y. Ts'o
2020-03-08  2:20     ` Theodore Y. Ts'o
2020-03-15 16:15       ` Theodore Y. Ts'o
2020-03-16  9:32         ` Jan Kara
2020-02-13 10:15 ` [PATCH 4/7] ext2fs: Implement dir entry creation in htree directories Jan Kara
2020-03-15 16:43   ` Theodore Y. Ts'o
2020-02-13 10:16 ` [PATCH 5/7] tests: Modify f_large_dir test to excercise indexed dir handling Jan Kara
2020-02-18 20:29   ` Andreas Dilger [this message]
2020-03-15 16:43   ` Theodore Y. Ts'o
2020-02-13 10:16 ` [PATCH 6/7] tests: Add test to excercise indexed directories with metadata_csum Jan Kara
2020-02-18 20:34   ` Andreas Dilger
2020-02-13 10:16 ` [PATCH 7/7] tune2fs: Update dir checksums when clearing dir_index feature Jan Kara
2020-02-18 20:50   ` Andreas Dilger
2020-02-19 10:23     ` Jan Kara
2020-03-15 17:15   ` Theodore Y. Ts'o
2020-03-16  0:11     ` Andreas Dilger
2020-03-16  9:27     ` Jan Kara
2020-03-26 14:27     ` 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=39788032-EB47-4ACB-8DA2-3E30B0772847@dilger.ca \
    --to=adilger@dilger.ca \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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).