All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 00/16] btrfs-progs: recover from failed metadata_uuid
Date: Mon, 14 Aug 2023 23:27:56 +0800	[thread overview]
Message-ID: <cover.1692018849.git.anand.jain@oracle.com> (raw)

The kernel reunites split-brained devices after a failed `btrfstune -m|M`
operation. We can achieve the same in btrfs-progs. So port it here.
Ref the discussion here:

   https://lore.kernel.org/all/1fa6802b-5812-14a8-3fc8-5da54bb5f79d@oracle.com/

Patch 1/16 wasn't integrated as part of the set
	[PATCH 00/10 v2] fixes and preparatory related to metadata_uuid
it's now merged with this patchset.

Patches [2-6,11,12] are cleanup patches.

Patches [7,8,10] are preparatory.

Patch [9] addresses a bug.

Patches [13, 14, 15] provide recovery from previously failed
`btrfstune -m|M` operations.

Patch [16] enhances the misc-test `034-metadata-uuid` to also validate this
new recovery feature.

This set has been successfully tested with the btrfs-progs testsuite.

This patchset is on top the latest devel last commit:
 8aba9b0052b6 btrfs-progs: btrfstune: consolidate error handling in main()


Anand Jain (16):
  btrfs-progs: track num_devices per fs_devices
  btrfs-progs: tune can use local fs_info variable
  btrfs-progs: rename set_metadata_uuid arg to new_fsid_str
  btrfs-progs: rename set_metadata_uuid new_fsid to fsid
  btrfs-progs: rename set_metadata_uuid new_uuid to new_fsid
  btrfs-progs: rename set_metadata_uuid uuid_changed to fsid_changed
  btrfs-progs: pass fsid in check_unfinished_fsid_change arg2
  btrfs-progs: pass metadata_uuid in check_unfinished_fsid_change arg3
  btrfs-progs: fix return without flag reset commit in tune
  btrfs-progs: preparing the latest device's superblock for commit
  btrfs-progs: rename fs_devices::list to match the kernel
  btrfs-progs: rename fs_devices::latest_trans to match the kernel
  btrfs-progs: tune use the latest bdev in fs_devices for super_copy
  btrfs-progs: add support to fix superblock with CHANGING_FSID_V2 flag
  btrfs-progs: recover from the failed btrfstune -m|M
  btrfs-progs: test btrfstune -m|M ability to fix previous failures

 cmds/filesystem.c                          |  14 +-
 common/device-scan.c                       |   2 +-
 kernel-shared/disk-io.c                    |   3 +
 kernel-shared/disk-io.h                    |   5 +
 kernel-shared/volumes.c                    | 203 +++++++++++++++++++--
 kernel-shared/volumes.h                    |   5 +-
 tests/misc-tests/034-metadata-uuid/test.sh |  70 +++++--
 tune/change-metadata-uuid.c                |  56 +++---
 tune/main.c                                |  35 ++--
 9 files changed, 312 insertions(+), 81 deletions(-)

-- 
2.39.3


             reply	other threads:[~2023-08-14 15:29 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-14 15:27 Anand Jain [this message]
2023-08-14 15:27 ` [PATCH 01/16] btrfs-progs: track num_devices per fs_devices Anand Jain
2023-08-14 15:27 ` [PATCH 02/16] btrfs-progs: tune can use local fs_info variable Anand Jain
2023-08-14 15:27 ` [PATCH 03/16] btrfs-progs: rename set_metadata_uuid arg to new_fsid_str Anand Jain
2023-08-14 15:28 ` [PATCH 04/16] btrfs-progs: rename set_metadata_uuid new_fsid to fsid Anand Jain
2023-08-14 15:28 ` [PATCH 05/16] btrfs-progs: rename set_metadata_uuid new_uuid to new_fsid Anand Jain
2023-08-14 15:28 ` [PATCH 06/16] btrfs-progs: rename set_metadata_uuid uuid_changed to fsid_changed Anand Jain
2023-08-14 15:28 ` [PATCH 07/16] btrfs-progs: pass fsid in check_unfinished_fsid_change arg2 Anand Jain
2023-08-14 15:28 ` [PATCH 08/16] btrfs-progs: pass metadata_uuid in check_unfinished_fsid_change arg3 Anand Jain
2023-08-14 15:28 ` [PATCH 09/16] btrfs-progs: fix return without flag reset commit in tune Anand Jain
2023-08-14 15:28 ` [PATCH 10/16] btrfs-progs: preparing the latest device's superblock for commit Anand Jain
2023-08-14 15:28 ` [PATCH 11/16] btrfs-progs: rename fs_devices::list to match the kernel Anand Jain
2023-08-14 15:28 ` [PATCH 12/16] btrfs-progs: rename fs_devices::latest_trans " Anand Jain
2023-08-14 15:28 ` [PATCH 13/16] btrfs-progs: tune use the latest bdev in fs_devices for super_copy Anand Jain
2023-08-14 15:28 ` [PATCH 14/16] btrfs-progs: add support to fix superblock with CHANGING_FSID_V2 flag Anand Jain
2023-08-14 15:28 ` [PATCH 15/16] btrfs-progs: recover from the failed btrfstune -m|M Anand Jain
2023-08-14 15:28 ` [PATCH 16/16] btrfs-progs: test btrfstune -m|M ability to fix previous failures Anand Jain
2023-08-23 20:10   ` David Sterba
2023-08-24 14:00     ` Anand Jain
2023-08-23 22:13 ` [PATCH 00/16] btrfs-progs: recover from failed metadata_uuid David Sterba
2023-08-23 22:24   ` David Sterba
2023-08-24 13:54     ` Anand Jain
2023-08-25 11:53       ` David Sterba
2023-08-25 14:57         ` Anand Jain

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.1692018849.git.anand.jain@oracle.com \
    --to=anand.jain@oracle.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.