summaryrefslogtreecommitdiff
path: root/common/dmlogwrites
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2019-09-10 09:53:11 +0800
committerEryu Guan <guaneryu@gmail.com>2019-09-15 12:23:53 +0800
commitd0f42706da5094df08bae3cba03c50a79c9d8cfc (patch)
tree8578abe7e113f6fd17626f0edf8de1d7b844ec69 /common/dmlogwrites
parent4f7f6f1cf1b206ab17197e38eb0d732e3f2f43eb (diff)
btrfs: Check snapshot creation and deletion with dm-logwrites
We have generic dm-logwrites with fsstress test case (generic/482), but it doesn't cover fs specific operations like btrfs snapshot creation and deletion. Furthermore, that test is not heavy enough to bump btrfs tree height by its short runtime. And finally, btrfs check doesn't consider dirty log as an error, unlike ext*/xfs, that's to say we don't need to mount the fs to replay the log, but just running btrfs check on the fs is enough. So introduce a similar test case but for btrfs only. The test case will stress btrfs by: - Use small nodesize to bump tree height - Create a base tree which is already high enough - Trim tree blocks to find possible trim bugs - Call snapshot creation and deletion along with fsstress Also it includes certain workaround for btrfs: - Allow _log_writes_mkfs to accept extra mkfs options - Use no-holes feature To avoid missing hole file extents. Although that behavior doesn't follow the on-disk format spec, it doesn't cause data loss. And will follow the new on-disk format spec of no-holes feature, so it's better to workaround it. And an optimization for btrfs only: - Use replay-log --fsck/--check command Since dm-log-writes records bios sequentially, there is no way to locate certain entry unless we iterate all entries. This is becoming a big performance penalty if we replay certain a range, check the fs, then re-execute replay-log to replay another range. We need to records the previous entry location, or we need to re-iterate all previous entries. Thankfully, replay-log has already address it by providing --fsck and --check command, thus we don't need to break replay-log command. Please note, for fast storage (e.g. fast NVME or unsafe cache mode), it's recommended to use log devices larger than 15G, or we can't record the full log of just 30s fsstress run. Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Diffstat (limited to 'common/dmlogwrites')
-rw-r--r--common/dmlogwrites2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/dmlogwrites b/common/dmlogwrites
index ae2cbc6a..2a7ff612 100644
--- a/common/dmlogwrites
+++ b/common/dmlogwrites
@@ -69,7 +69,7 @@ _log_writes_mark()
_log_writes_mkfs()
{
_scratch_options mkfs
- _mkfs_dev $SCRATCH_OPTIONS $LOGWRITES_DMDEV
+ _mkfs_dev $SCRATCH_OPTIONS $@ $LOGWRITES_DMDEV
_log_writes_mark mkfs
}