diff mbox

btrfs-progs: tests: run rollback after conversion

Message ID 1464623554-5119-1-git-send-email-dsterba@suse.com (mailing list archive)
State Accepted
Headers show

Commit Message

David Sterba May 30, 2016, 3:52 p.m. UTC
Signed-off-by: David Sterba <dsterba@suse.com>
---
 tests/convert-tests.sh | 3 +++
 1 file changed, 3 insertions(+)

Comments

David Sterba May 30, 2016, 3:56 p.m. UTC | #1
Hi Qu,

the convert patchset does not pass a rollback test, fails in the case of
32k nodesize. Thre's not much info why, just 'rollback failed'.

The branch that passes is 'test-rollback', it's current devel without
the convert and low-mem fsck patchsets.
--
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 May 31, 2016, 12:38 a.m. UTC | #2
Thanks for the report.

We will check it and fix it soon.

Thanks,
Qu

David Sterba wrote on 2016/05/30 17:56 +0200:
> Hi Qu,
>
> the convert patchset does not pass a rollback test, fails in the case of
> 32k nodesize. Thre's not much info why, just 'rollback failed'.
>
> The branch that passes is 'test-rollback', it's current devel without
> the convert and low-mem fsck patchsets.
>
>


--
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 May 31, 2016, 1:13 a.m. UTC | #3
David Sterba wrote on 2016/05/30 17:56 +0200:
> Hi Qu,
>
> the convert patchset does not pass a rollback test, fails in the case of
> 32k nodesize. Thre's not much info why, just 'rollback failed'.
>
> The branch that passes is 'test-rollback', it's current devel without
> the convert and low-mem fsck patchsets.
>
>
Pretty strange.

As I manually tested a ext4 filled with my /etc, used 32K default 
incompat flags, both convert and rollback succeeded without problem.

The same is for convert-tests.sh.
All passed here, just as what we did when developing the patchset.

The commit head I tested is 2a7c68a4e46f4713e746d6e977e9c4cf27913ce3.

Did you have more info on the situation where the rollback fails?
Like the commit head, test method (I assume it's rollback tests from 
btrfs-progs)?

Thanks,
Qu


--
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 May 31, 2016, 2:08 a.m. UTC | #4
Problem located.

may_rollback() is still the old codes, while for new convert's metadata, 
it's complete OK if it's physical position is different from its logical 
space.
Unlike the strict old condition.

I'll add more check to ensure new convert can pass may_rollback() check.

Thanks,
Qu

Qu Wenruo wrote on 2016/05/31 09:13 +0800:
>
>
> David Sterba wrote on 2016/05/30 17:56 +0200:
>> Hi Qu,
>>
>> the convert patchset does not pass a rollback test, fails in the case of
>> 32k nodesize. Thre's not much info why, just 'rollback failed'.
>>
>> The branch that passes is 'test-rollback', it's current devel without
>> the convert and low-mem fsck patchsets.
>>
>>
> Pretty strange.
>
> As I manually tested a ext4 filled with my /etc, used 32K default
> incompat flags, both convert and rollback succeeded without problem.
>
> The same is for convert-tests.sh.
> All passed here, just as what we did when developing the patchset.
>
> The commit head I tested is 2a7c68a4e46f4713e746d6e977e9c4cf27913ce3.
>
> Did you have more info on the situation where the rollback fails?
> Like the commit head, test method (I assume it's rollback tests from
> btrfs-progs)?
>
> Thanks,
> Qu
>
>
> --
> 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


--
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/convert-tests.sh b/tests/convert-tests.sh
index 3fce8915f94a..2806b921544b 100755
--- a/tests/convert-tests.sh
+++ b/tests/convert-tests.sh
@@ -138,6 +138,9 @@  convert_test() {
 	run_check_stdout $SUDO_HELPER md5sum -c $CHECKSUMTMP |
 		grep -q 'FAILED' && _fail "file validation failed."
 	run_check_umount_test_dev
+
+	run_check $TOP/btrfs-convert --rollback $TEST_DEV
+	run_check fsck -n -t ext2,ext3,ext4 $TEST_DEV
 }
 
 if ! [ -z "$TEST" ]; then