Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: Srivathsa Dara <srivathsa.d.dara@oracle.com>,
	linux-btrfs@vger.kernel.org
Cc: rajesh.sivaramasubramaniom@oracle.com, junxiao.bi@oracle.com,
	clm@fb.com, josef@toxicpanda.com, dsterba@suse.com
Subject: Re: [PATCH] btrfs-progs: tests: add convert test case for block number overflow
Date: Fri, 7 Jun 2024 08:02:53 +0930	[thread overview]
Message-ID: <fa840aab-365e-4eb8-b80a-08e2a58306f3@suse.com> (raw)
In-Reply-To: <20240606103228.3697282-1-srivathsa.d.dara@oracle.com>



在 2024/6/6 20:02, Srivathsa Dara 写道:
> This test cases will test whether btrfs-convert can handle ext4
> filesystems that are largerthan 16TiB.
> 
> At 16TiB block numbers overflow 32 bits, btrfs-convert either fails or
> corrupts fs if 64 bit block numbers are not supported.

You may want to merge this one into the existing overflow tests, check 
convert-tests/018-fs-size-overflow, which is doing the 64g overflow test 
already.

Otherwise it looks good.

Thanks,
Qu
> 
> Signed-off-by: Srivathsa Dara <srivathsa.d.dara@oracle.com>
> ---
>   .../025-64-bit-block-numbers/test.sh          | 21 +++++++++++++++++++
>   1 file changed, 21 insertions(+)
>   create mode 100755 tests/convert-tests/025-64-bit-block-numbers/test.sh
> 
> diff --git a/tests/convert-tests/025-64-bit-block-numbers/test.sh b/tests/convert-tests/025-64-bit-block-numbers/test.sh
> new file mode 100755
> index 00000000..0eb6bb49
> --- /dev/null
> +++ b/tests/convert-tests/025-64-bit-block-numbers/test.sh
> @@ -0,0 +1,21 @@
> +#!/bin/bash
> +# Check if btrfs-convert can handle 64 bit block numbers in an ext4 fs.
> +# At 16TiB block numbers overflow 32 bits and screw up total size and used
> +# space calculation
> +
> +
> +source "$TEST_TOP/common" || exit
> +source "$TEST_TOP/common.convert" || exit
> +
> +check_prereq btrfs-convert
> +check_global_prereq mke2fs
> +
> +setup_root_helper
> +prepare_test_dev 16t
> +
> +convert_test_prep_fs ext4 mke2fs -t ext4 -b 4096
> +run_check_umount_test_dev
> +
> +convert_test_do_convert
> +run_check_mount_test_dev
> +run_check_umount_test_dev

  reply	other threads:[~2024-06-06 22:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-06 10:32 [PATCH] btrfs-progs: tests: add convert test case for block number overflow Srivathsa Dara
2024-06-06 22:32 ` Qu Wenruo [this message]
2024-06-11  6:04   ` [External] : " Srivathsa Dara

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=fa840aab-365e-4eb8-b80a-08e2a58306f3@suse.com \
    --to=wqu@suse.com \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=josef@toxicpanda.com \
    --cc=junxiao.bi@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=rajesh.sivaramasubramaniom@oracle.com \
    --cc=srivathsa.d.dara@oracle.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