Message ID | 3528774789271f9e46918f8b1d1461dad0e11cc4.1710373423.git.boris@bur.io (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | btrfs/277: specify protocol version 3 for verity send | expand |
On Wed, Mar 13, 2024 at 11:45 PM Boris Burkov <boris@bur.io> wrote: > > This test uses btrfs send with fs-verity which relies on protocol > version 3. The default in progs is version 2, so we need to explicitly > specify the protocol version. Note that the max protocol version in > progs is also currently broken (not properly gated by EXPERIMENTAL) so > that needs fixing as well. > > Signed-off-by: Boris Burkov <boris@bur.io> Reviewed-by: Filipe Manana <fdmanana@suse.com> Looks good, thanks. > --- > tests/btrfs/277 | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/btrfs/277 b/tests/btrfs/277 > index f5684fde1..3898bda4d 100755 > --- a/tests/btrfs/277 > +++ b/tests/btrfs/277 > @@ -84,7 +84,7 @@ _test_send_verity() { > echo "set subvolume read only" > $BTRFS_UTIL_PROG property set $subv ro true > echo "send subvolume" > - $BTRFS_UTIL_PROG send $subv -f $stream -q >> $seqres.full > + $BTRFS_UTIL_PROG send $subv -f $stream -q --proto=3 >> $seqres.full > > echo "blow away fs" > _scratch_unmount > -- > 2.43.0 > >
On 3/14/24 05:16, Boris Burkov wrote: > This test uses btrfs send with fs-verity which relies on protocol > version 3. The default in progs is version 2, so we need to explicitly > specify the protocol version. Note that the max protocol version in > progs is also currently broken (not properly gated by EXPERIMENTAL) so > that needs fixing as well. > > Signed-off-by: Boris Burkov <boris@bur.io> > --- > tests/btrfs/277 | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tests/btrfs/277 b/tests/btrfs/277 > index f5684fde1..3898bda4d 100755 > --- a/tests/btrfs/277 > +++ b/tests/btrfs/277 > @@ -84,7 +84,7 @@ _test_send_verity() { > echo "set subvolume read only" > $BTRFS_UTIL_PROG property set $subv ro true > echo "send subvolume" > - $BTRFS_UTIL_PROG send $subv -f $stream -q >> $seqres.full > + $BTRFS_UTIL_PROG send $subv -f $stream -q --proto=3 >> $seqres.full > > echo "blow away fs" > _scratch_unmount As of now, the test fails if v3 support isn't in the Send. Instead, we need to create _require_btrfs_send_v3() to call _notrun(). Thanks, Anand
On Wed, Mar 13, 2024 at 04:46:29PM -0700, Boris Burkov wrote: > This test uses btrfs send with fs-verity which relies on protocol > version 3. The default in progs is version 2, so we need to explicitly > specify the protocol version. Note that the max protocol version in > progs is also currently broken (not properly gated by EXPERIMENTAL) so > that needs fixing as well. What do you mean? Progs are ready for protocol 3 as its availability depends on kernel and if it's enabled then it's assumed that progs match the protocol specification.
On Thu, Mar 14, 2024 at 04:01:22PM +0100, David Sterba wrote: > On Wed, Mar 13, 2024 at 04:46:29PM -0700, Boris Burkov wrote: > > This test uses btrfs send with fs-verity which relies on protocol > > version 3. The default in progs is version 2, so we need to explicitly > > specify the protocol version. Note that the max protocol version in > > progs is also currently broken (not properly gated by EXPERIMENTAL) so > > that needs fixing as well. > > What do you mean? Progs are ready for protocol 3 as its availability > depends on kernel and if it's enabled then it's assumed that progs match > the protocol specification. I'm not sure exactly how it happened, but I currently also can't get btrfs-progs to actually put proto=3 in the send ioctl. I believe that the #ifdef CONFIG_BTRFS_DEBUG used to set the protocol version doesn't pick up the config value in the kernel (should it?!) I was able to fix it by switching to using EXPERIMENTAL as the flag but haven't sent that yet.
diff --git a/tests/btrfs/277 b/tests/btrfs/277 index f5684fde1..3898bda4d 100755 --- a/tests/btrfs/277 +++ b/tests/btrfs/277 @@ -84,7 +84,7 @@ _test_send_verity() { echo "set subvolume read only" $BTRFS_UTIL_PROG property set $subv ro true echo "send subvolume" - $BTRFS_UTIL_PROG send $subv -f $stream -q >> $seqres.full + $BTRFS_UTIL_PROG send $subv -f $stream -q --proto=3 >> $seqres.full echo "blow away fs" _scratch_unmount
This test uses btrfs send with fs-verity which relies on protocol version 3. The default in progs is version 2, so we need to explicitly specify the protocol version. Note that the max protocol version in progs is also currently broken (not properly gated by EXPERIMENTAL) so that needs fixing as well. Signed-off-by: Boris Burkov <boris@bur.io> --- tests/btrfs/277 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)