diff mbox series

btrfs/316: use rescan wrapper

Message ID 5c2dd52fecbc5ac86068a725875882e3000bc969.1710373423.git.boris@bur.io (mailing list archive)
State New, archived
Headers show
Series btrfs/316: use rescan wrapper | expand

Commit Message

Boris Burkov March 13, 2024, 11:46 p.m. UTC
btrfs/316 is broken on the squota configuration because it uses a raw
rescan call which fails, instead of using the rescan wrapper. The test
passes with squota, so run it (instead of requiring rescan) though I
suspect it isn't the most meaningful test.

Signed-off-by: Boris Burkov <boris@bur.io>
---
 tests/btrfs/316 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Filipe Manana March 13, 2024, 11:52 p.m. UTC | #1
On Wed, Mar 13, 2024 at 11:45 PM Boris Burkov <boris@bur.io> wrote:
>
> btrfs/316 is broken on the squota configuration because it uses a raw
> rescan call which fails, instead of using the rescan wrapper. The test
> passes with squota, so run it (instead of requiring rescan) though I
> suspect it isn't the most meaningful test.
>
> Signed-off-by: Boris Burkov <boris@bur.io>
> ---
>  tests/btrfs/316 | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tests/btrfs/316 b/tests/btrfs/316
> index 07a94334a..36fcad7f8 100755
> --- a/tests/btrfs/316
> +++ b/tests/btrfs/316
> @@ -24,7 +24,8 @@ _scratch_mkfs >> $seqres.full
>  _scratch_mount
>
>  $BTRFS_UTIL_PROG quota enable $SCRATCH_MNT
> -$BTRFS_UTIL_PROG quota rescan -w $SCRATCH_MNT >> $seqres.full
> +#$BTRFS_UTIL_PROG quota rescan -w $SCRATCH_MNT >> $seqres.full

Why the comment and not remove the line? Seems like unintentional.

> +_qgroup_rescan $SCRATCH_MNT >> $seqres.full

With that fixed:

Reviewed-by: Filipe Manana <fdmanana@suse.com>

>
>  $BTRFS_UTIL_PROG qgroup create 1/0 $SCRATCH_MNT >> $seqres.full
>  $BTRFS_UTIL_PROG subvolume create $SCRATCH_MNT/subv1 >> $seqres.full
> --
> 2.43.0
>
>
Anand Jain March 14, 2024, 1:52 a.m. UTC | #2
On 3/14/24 05:16, Boris Burkov wrote:
> btrfs/316 is broken on the squota configuration because it uses a raw
> rescan call which fails, instead of using the rescan wrapper. The test
> passes with squota, so run it (instead of requiring rescan) though I
> suspect it isn't the most meaningful test.
> 
> Signed-off-by: Boris Burkov <boris@bur.io>
> ---
>   tests/btrfs/316 | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/btrfs/316 b/tests/btrfs/316
> index 07a94334a..36fcad7f8 100755
> --- a/tests/btrfs/316
> +++ b/tests/btrfs/316
> @@ -24,7 +24,8 @@ _scratch_mkfs >> $seqres.full
>   _scratch_mount
>   
>   $BTRFS_UTIL_PROG quota enable $SCRATCH_MNT
> -$BTRFS_UTIL_PROG quota rescan -w $SCRATCH_MNT >> $seqres.full

> +#$BTRFS_UTIL_PROG quota rescan -w $SCRATCH_MNT >> $seqres.full


Delete instead, I'll fix this locally.

> +_qgroup_rescan $SCRATCH_MNT >> $seqres.full
>   

However, we also need.

_require_qgroup_rescan ??

Could you pls confirm. Thx.


>   $BTRFS_UTIL_PROG qgroup create 1/0 $SCRATCH_MNT >> $seqres.full
>   $BTRFS_UTIL_PROG subvolume create $SCRATCH_MNT/subv1 >> $seqres.full
diff mbox series

Patch

diff --git a/tests/btrfs/316 b/tests/btrfs/316
index 07a94334a..36fcad7f8 100755
--- a/tests/btrfs/316
+++ b/tests/btrfs/316
@@ -24,7 +24,8 @@  _scratch_mkfs >> $seqres.full
 _scratch_mount
 
 $BTRFS_UTIL_PROG quota enable $SCRATCH_MNT
-$BTRFS_UTIL_PROG quota rescan -w $SCRATCH_MNT >> $seqres.full
+#$BTRFS_UTIL_PROG quota rescan -w $SCRATCH_MNT >> $seqres.full
+_qgroup_rescan $SCRATCH_MNT >> $seqres.full
 
 $BTRFS_UTIL_PROG qgroup create 1/0 $SCRATCH_MNT >> $seqres.full
 $BTRFS_UTIL_PROG subvolume create $SCRATCH_MNT/subv1 >> $seqres.full