diff mbox

[3/3] btrfs-progs: convert-test: trigger chunk allocation after convert

Message ID 20161213094415.30912-4-quwenruo@cn.fujitsu.com (mailing list archive)
State Superseded
Headers show

Commit Message

Qu Wenruo Dec. 13, 2016, 9:44 a.m. UTC
Populate fs after convert so we can trigger data chunk allocation.
This can expose too restrict old rollback condition

Reported-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
---
 tests/common         | 4 ++++
 tests/common.convert | 3 +++
 2 files changed, 7 insertions(+)

Comments

Tsutomu Itoh Dec. 13, 2016, 11:51 p.m. UTC | #1
On 2016/12/13 18:44, Qu Wenruo wrote:
> Populate fs after convert so we can trigger data chunk allocation.
> This can expose too restrict old rollback condition
> 
> Reported-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
> ---
>  tests/common         | 4 ++++
>  tests/common.convert | 3 +++
>  2 files changed, 7 insertions(+)
> 
> diff --git a/tests/common b/tests/common
> index 571118a..4a1330f 100644
> --- a/tests/common
> +++ b/tests/common
> @@ -486,6 +486,10 @@ generate_dataset() {
>  				run_check $SUDO_HELPER ln -s "$dirpath/$long_filename" "$dirpath/slow_slink.$num"
>  			done
>  			;;
> +		large)
> +			run_check $SUDO_HELPER dd if=/dev/urandom bs=32M count=1 \
> +			of="$dirpath/$dataset_type" bs=32M >/dev/null 2>&1
> +			;;

Too many bs=.

Thanks,
Tsutomu

>  	esac
>  }
>  
> diff --git a/tests/common.convert b/tests/common.convert
> index a2d3152..8c9242e 100644
> --- a/tests/common.convert
> +++ b/tests/common.convert
> @@ -160,6 +160,9 @@ convert_test_post_checks_all() {
>  	convert_test_post_check_checksums "$1"
>  	convert_test_post_check_permissions "$2"
>  	convert_test_post_check_acl "$3"
> +
> +	# Create a large file to trigger data chunk allocation
> +	generate_dataset "large"
>  	run_check_umount_test_dev
>  }
>  
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Qu Wenruo Dec. 14, 2016, 12:52 a.m. UTC | #2
At 12/14/2016 07:51 AM, Tsutomu Itoh wrote:
> On 2016/12/13 18:44, Qu Wenruo wrote:
>> Populate fs after convert so we can trigger data chunk allocation.
>> This can expose too restrict old rollback condition
>>
>> Reported-by: Chandan Rajendra <chandan@linux.vnet.ibm.com>
>> Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
>> ---
>>  tests/common         | 4 ++++
>>  tests/common.convert | 3 +++
>>  2 files changed, 7 insertions(+)
>>
>> diff --git a/tests/common b/tests/common
>> index 571118a..4a1330f 100644
>> --- a/tests/common
>> +++ b/tests/common
>> @@ -486,6 +486,10 @@ generate_dataset() {
>>  				run_check $SUDO_HELPER ln -s "$dirpath/$long_filename" "$dirpath/slow_slink.$num"
>>  			done
>>  			;;
>> +		large)
>> +			run_check $SUDO_HELPER dd if=/dev/urandom bs=32M count=1 \
>> +			of="$dirpath/$dataset_type" bs=32M >/dev/null 2>&1
>> +			;;
>
> Too many bs=.
>
> Thanks,
> Tsutomu

Oh, right.

Thanks for pointing it out, I'll update it soon.

Thanks,
Qu
>
>>  	esac
>>  }
>>
>> diff --git a/tests/common.convert b/tests/common.convert
>> index a2d3152..8c9242e 100644
>> --- a/tests/common.convert
>> +++ b/tests/common.convert
>> @@ -160,6 +160,9 @@ convert_test_post_checks_all() {
>>  	convert_test_post_check_checksums "$1"
>>  	convert_test_post_check_permissions "$2"
>>  	convert_test_post_check_acl "$3"
>> +
>> +	# Create a large file to trigger data chunk allocation
>> +	generate_dataset "large"
>>  	run_check_umount_test_dev
>>  }
>>
>>
>
>
>


--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/tests/common b/tests/common
index 571118a..4a1330f 100644
--- a/tests/common
+++ b/tests/common
@@ -486,6 +486,10 @@  generate_dataset() {
 				run_check $SUDO_HELPER ln -s "$dirpath/$long_filename" "$dirpath/slow_slink.$num"
 			done
 			;;
+		large)
+			run_check $SUDO_HELPER dd if=/dev/urandom bs=32M count=1 \
+			of="$dirpath/$dataset_type" bs=32M >/dev/null 2>&1
+			;;
 	esac
 }
 
diff --git a/tests/common.convert b/tests/common.convert
index a2d3152..8c9242e 100644
--- a/tests/common.convert
+++ b/tests/common.convert
@@ -160,6 +160,9 @@  convert_test_post_checks_all() {
 	convert_test_post_check_checksums "$1"
 	convert_test_post_check_permissions "$2"
 	convert_test_post_check_acl "$3"
+
+	# Create a large file to trigger data chunk allocation
+	generate_dataset "large"
 	run_check_umount_test_dev
 }