* [PATCH] btrfs/150: add _scratch_dev_pool_get/put to run the test as expected
@ 2018-02-20 5:34 Misono, Tomohiro
2018-02-20 12:21 ` Qu Wenruo
0 siblings, 1 reply; 2+ messages in thread
From: Misono, Tomohiro @ 2018-02-20 5:34 UTC (permalink / raw)
To: fstests; +Cc: bo.li.liu, linux-btrfs
btrfs/150 uses RAID1 profile and make SCRATCH_DEV fail for test.
However, if SCRATCH_DEV_POOL consists more than two devices, SCRATCH_DEV
may not be used for RAID1 pair and the tests may not run as expected.
Fix this by add _scratch_dev_pool_get/put like other tests (141, 143
etc.) do.
Signed-off-by: Tomohiro Misono <misono.tomohiro@jp.fujitsu.com>
---
tests/btrfs/150 | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/btrfs/150 b/tests/btrfs/150
index 97041b6c..1e4586be 100755
--- a/tests/btrfs/150
+++ b/tests/btrfs/150
@@ -55,6 +55,7 @@ _supported_os Linux
_require_scratch
_require_fail_make_request
_require_scratch_dev_pool 2
+_scratch_dev_pool_get 2
SYSFS_BDEV=`_sysfs_dev $SCRATCH_DEV`
enable_io_failure()
@@ -100,6 +101,7 @@ while [[ -z $result ]]; do
disable_io_failure
done
+_scratch_dev_pool_put
# success, all done
status=0
exit
--
2.14.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] btrfs/150: add _scratch_dev_pool_get/put to run the test as expected
2018-02-20 5:34 [PATCH] btrfs/150: add _scratch_dev_pool_get/put to run the test as expected Misono, Tomohiro
@ 2018-02-20 12:21 ` Qu Wenruo
0 siblings, 0 replies; 2+ messages in thread
From: Qu Wenruo @ 2018-02-20 12:21 UTC (permalink / raw)
To: Misono, Tomohiro, fstests; +Cc: bo.li.liu, linux-btrfs
[-- Attachment #1.1: Type: text/plain, Size: 1481 bytes --]
On 2018年02月20日 13:34, Misono, Tomohiro wrote:
> btrfs/150 uses RAID1 profile and make SCRATCH_DEV fail for test.
> However, if SCRATCH_DEV_POOL consists more than two devices, SCRATCH_DEV
> may not be used for RAID1 pair and the tests may not run as expected.
>
> Fix this by add _scratch_dev_pool_get/put like other tests (141, 143
> etc.) do.
>
> Signed-off-by: Tomohiro Misono <misono.tomohiro@jp.fujitsu.com>
Indeed, if we have more devices, it's highly possible that the first
device doesn't have data stripe of the raid1 chunk on it.
(And under most case it won't have data stripe, since during mkfs we use
the first device to contain temporary chunks, so unallocated space of
devid 1 is smaller compared to other devices, and chunk allocator will
use device with more unallocated space)
Reviewed-by: Qu Wenruo <wqu@suse.com>
Thanks,
Qu
> ---
> tests/btrfs/150 | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/tests/btrfs/150 b/tests/btrfs/150
> index 97041b6c..1e4586be 100755
> --- a/tests/btrfs/150
> +++ b/tests/btrfs/150
> @@ -55,6 +55,7 @@ _supported_os Linux
> _require_scratch
> _require_fail_make_request
> _require_scratch_dev_pool 2
> +_scratch_dev_pool_get 2
>
> SYSFS_BDEV=`_sysfs_dev $SCRATCH_DEV`
> enable_io_failure()
> @@ -100,6 +101,7 @@ while [[ -z $result ]]; do
> disable_io_failure
> done
>
> +_scratch_dev_pool_put
> # success, all done
> status=0
> exit
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 520 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-20 12:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-20 5:34 [PATCH] btrfs/150: add _scratch_dev_pool_get/put to run the test as expected Misono, Tomohiro
2018-02-20 12:21 ` Qu Wenruo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox