All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH v2 0/2] btrfs-progs: make "btrfstune -S1" to reject fs with dirty log
Date: Tue, 19 Apr 2022 19:36:20 +0800	[thread overview]
Message-ID: <cover.1650368004.git.wqu@suse.com> (raw)

[CHANGELOG]
v2:
- Add a test case for it


A seed device with dirty log can be rejected by kernel, as kernel will
try to replay log even on RO mount.
But log replay on RO device is strongly prohibited, thus such seed
device will be rejected without a way to sprout.

Fix the problem by letting "btrfstune -S1" to check if the fs has dirty
log first.

Also add a test case for it, using a btrfs-image dump.

Qu Wenruo (2):
  btrfs-progs: do not allow setting seed flag on fs with dirty log
  btrfs-progs: make sure "btrfstune -S1" will reject fs with dirty log

 btrfstune.c                                      |   4 ++++
 .../052-seed-dirty-log/dirty_log.img.xz          | Bin 0 -> 2140 bytes
 tests/misc-tests/052-seed-dirty-log/test.sh      |  12 ++++++++++++
 3 files changed, 16 insertions(+)
 create mode 100644 tests/misc-tests/052-seed-dirty-log/dirty_log.img.xz
 create mode 100755 tests/misc-tests/052-seed-dirty-log/test.sh

-- 
2.35.1


             reply	other threads:[~2022-04-19 11:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-19 11:36 Qu Wenruo [this message]
2022-04-19 11:36 ` [PATCH v2 1/2] btrfs-progs: do not allow setting seed flag on fs with dirty log Qu Wenruo
2022-04-19 11:36 ` [PATCH v2 2/2] btrfs-progs: make sure "btrfstune -S1" will reject " Qu Wenruo
2022-04-25 12:11 ` [PATCH v2 0/2] btrfs-progs: make "btrfstune -S1" to " David Sterba

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=cover.1650368004.git.wqu@suse.com \
    --to=wqu@suse.com \
    --cc=linux-btrfs@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.