Linux-BTRFS Archive mirror
 help / color / mirror / Atom feed
From: Zorro Lang <zlang@redhat.com>
To: Anand Jain <anand.jain@oracle.com>
Cc: fstests@vger.kernel.org, linux-btrfs@vger.kernel.org,
	fdmanana@kernel.org
Subject: Re: [PATCH v2 3/3] common/verity: fix btrfs-corrupt-block -v option
Date: Wed, 24 Apr 2024 22:45:28 +0800	[thread overview]
Message-ID: <20240424144528.kd6k4uoh3wzip36c@dell-per750-06-vm-08.rhts.eng.pek2.redhat.com> (raw)
In-Reply-To: <f19513c267884160a851edf76d941df423a56fc7.1711097698.git.anand.jain@oracle.com>

On Fri, Mar 22, 2024 at 04:46:41PM +0530, Anand Jain wrote:
> The btrfs-corrupt-block -v has been replaced with --value so fix it.
> 
> _fsv_scratch_corrupt_merkle_tree() uses the btrfs-corrupt-block
> --value option, so add the "value" prerequisite in the function
> _require_fsverity_corruption.
> 
> Signed-off-by: Anand Jain <anand.jain@oracle.com>
> ---

It makes sense to me, as an option is changed. But I think it'll
cause _notrun on old btrfs-corrupt-block command/version. If btrfs
list feels good for that (no objection), then that's fine.

Reviewed-by: Zorro Lang <zlang@redhat.com>

>  common/verity | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/common/verity b/common/verity
> index 03d175ce1b7a..59b67e12010a 100644
> --- a/common/verity
> +++ b/common/verity
> @@ -191,7 +191,7 @@ _require_fsverity_corruption()
>  {
>  	_require_xfs_io_command "fiemap"
>  	if [ $FSTYP == "btrfs" ]; then
> -		_require_btrfs_corrupt_block
> +		_require_btrfs_corrupt_block "value"
>  	fi
>  }
>  
> @@ -402,7 +402,8 @@ _fsv_scratch_corrupt_merkle_tree()
>  			# in the default filesystem tree (-r 5) and corrupt one byte (-b 1) at
>  			# $offset (-o $offset) with the ascii representation of the byte we read
>  			# (-v $ascii)
> -			$BTRFS_CORRUPT_BLOCK_PROG -r 5 -I $ino,37,0 -v $ascii -o $offset -b 1 $SCRATCH_DEV
> +			$BTRFS_CORRUPT_BLOCK_PROG -r 5 -I $ino,37,0 \
> +			       --value $ascii --offset $offset -b 1 $SCRATCH_DEV
>  			(( offset += 1 ))
>  		done
>  		_scratch_mount
> -- 
> 2.39.3
> 
> 


      reply	other threads:[~2024-04-24 14:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-22 11:16 [PATCH v2 0/3] fix btrfs-corrupt-block options value and offset Anand Jain
2024-03-22 11:16 ` [PATCH v2 1/3] common/btrfs: refactor _require_btrfs_corrupt_block to check option Anand Jain
2024-04-24 14:37   ` Zorro Lang
2024-03-22 11:16 ` [PATCH v2 2/3] btrfs/290: fix btrfs_corrupt_block options Anand Jain
2024-04-24 14:39   ` Zorro Lang
2024-03-22 11:16 ` [PATCH v2 3/3] common/verity: fix btrfs-corrupt-block -v option Anand Jain
2024-04-24 14:45   ` Zorro Lang [this message]

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=20240424144528.kd6k4uoh3wzip36c@dell-per750-06-vm-08.rhts.eng.pek2.redhat.com \
    --to=zlang@redhat.com \
    --cc=anand.jain@oracle.com \
    --cc=fdmanana@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=linux-btrfs@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).