All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] btrfs-progs: make "btrfstune -S1" to reject fs with dirty log
@ 2022-04-19 11:36 Qu Wenruo
  2022-04-19 11:36 ` [PATCH v2 1/2] btrfs-progs: do not allow setting seed flag on " Qu Wenruo
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Qu Wenruo @ 2022-04-19 11:36 UTC (permalink / raw)
  To: linux-btrfs

[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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-04-25 12:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-19 11:36 [PATCH v2 0/2] btrfs-progs: make "btrfstune -S1" to reject fs with dirty log Qu Wenruo
2022-04-19 11:36 ` [PATCH v2 1/2] btrfs-progs: do not allow setting seed flag on " 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

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.