From: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
To: Boris Burkov <boris@bur.io>
Cc: fstests@vger.kernel.org, linux-fscrypt@vger.kernel.org,
linux-btrfs@vger.kernel.org, kernel-team@fb.com,
Eric Biggers <ebiggers@google.com>,
Josef Bacik <josefbacik@toxicpanda.com>
Subject: Re: [PATCH v10 4/5] btrfs: test verity orphans with dmlogwrites
Date: Mon, 18 Jul 2022 16:01:47 -0400 [thread overview]
Message-ID: <441eacdd0e69e6e87aab2d0c6b4890dd@dorminy.me> (raw)
In-Reply-To: <YtWzWN3R4pbftK4o@zen>
>>
>> I'm not understanding the snapshot part. It seems like most tests
>> using
>> log-writes do `_log_writes_replay_log_range $cur $SCRATCH_DEV >>
>> $seqres.full` to start each iteration; and then it seems like this
>> test can
>> check the item counts before and after a
>> _scratch_mount/_scratch_umount
>> cycle and get the same results. (And, if that worked, the test
>> wouldn't
>> need its own _cleanup() and its own lv management, I think?) But I'm
>> probably missing something.
>
> IIRC, the purpose of the snapshots is that the mount/unmount cycle is
> destructive in the middle of the operation. If the orphan is present,
> we'll blow up all the verity items, so if we did it on the device we
> were replaying onto, it would leave it in a messed up state as we kept
> replaying. So we snapshot at each entry and mount/unmount that to check
> the invariants.
I think what you're saying is that we can't use the device itself
instead of the snapshot, because mount/unmount change the underlying
device, and this definitely makes sense.
Looking at other dmlogwrites users, though, generic/482 looks like it
does something similar, and I don't understand what the difference
between the replay+snapshot+mount cycles here and the replay+mount
cycles there. I probably just don't understand what the difference
between the two tests' scenarios is, though.
next prev parent reply other threads:[~2022-07-18 20:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <28979252b803c073d6a8084c11b5ba27@dorminy.me>
2022-07-18 19:24 ` [PATCH v10 4/5] btrfs: test verity orphans with dmlogwrites Boris Burkov
2022-07-18 20:01 ` Sweet Tea Dorminy [this message]
2022-07-18 20:43 ` Boris Burkov
2022-07-15 20:31 [PATCH v10 0/5] tests for btrfs fsverity Boris Burkov
2022-07-15 20:31 ` [PATCH v10 4/5] btrfs: test verity orphans with dmlogwrites Boris Burkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=441eacdd0e69e6e87aab2d0c6b4890dd@dorminy.me \
--to=sweettea-kernel@dorminy.me \
--cc=boris@bur.io \
--cc=ebiggers@google.com \
--cc=fstests@vger.kernel.org \
--cc=josefbacik@toxicpanda.com \
--cc=kernel-team@fb.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fscrypt@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox