Skip to contentSkip to conversation

btrfs-progs: tests: run rollback after conversion

PATCH In review David Sterba 3 participants 5 messages May 30, 2016 – May 31, 2016 Btrfs file system

lore
Share & tools
lore

David Sterba

author maintainer
#0 lore raw

PATCH 1/1 btrfs-progs: tests: run rollback after conversion

---
 tests/convert-tests.sh | 3 +++
 1 file changed, 3 insertions(+)
tests/convert-tests.sh +3 -0
index 3fce8915f94a..2806b921544b 100755
@@ -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
Signature · 1 line
2.7.1
#1 lore raw

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.

#2 lore raw

Thanks for the report.

We will check it and fix it soon.

Thanks,
Qu

David Sterba wrote on 2016/05/30 17:56 +0200:

Quoted 9 lines

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.

#3 lore raw
In reply to David Sterba

David Sterba wrote on 2016/05/30 17:56 +0200:

Quoted 9 lines

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

#4 lore raw

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:

Quoted 34 lines

David Sterba wrote on 2016/05/30 17:56 +0200:

Quoted 9 lines

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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html