btrfs: Introduce new rescue= mount options
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 3 repliesIn review
v2 from the cover letter
- Introduce 'rescue=' super option.
- Rename original 'usebackuproot' and 'nologreplay'.
It at least makes my vim spell check happier.
- Remove 'recovery' mount option.
As its successor is now deprecated, not need to keep the predecessor.
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | btrfs: Remove "recovery" mount optionfs/ | +0 | 3 replies | |
| 2/3 | btrfs: Introduce "rescue=" mount optionfs/ | +62 | 0 replies | |
| 3/3 | btrfs: Introduce new mount option to skip block group items scanfs/ fs/ fs/ +2 more | +115 | 0 replies |
Reviews trailers per patch
1 of 3 patches has a Reviewed-by or Acked-by.
| Patch | Johannes Thumshirn |
|---|---|
| 1/3 | R-b |
| 2/3 | |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2.1 0/3] btrfs: Introduce new rescue= mount options
This patchset can be fetched from github:
https://github.com/adam900710/linux/tree/rescue_options
The basis HEAD is v5.1-rc4 tag.
There are quite a lot btrfs extent tree corruption report in the mail list.
Since btrfs will do mount time block group item search, one corrupted leaf containing block group item will prevent the whole fs to be mounted.
This patchset will try to address the problem by introducing a new mount option, "rescue=skip_bg", as a last-resort rescue.
Of course this option will have a lot of restriction to prevent further screwing up the fs, including:
- Permanent RO
No remount rw is allowed
- No dirty log
Either clean the log or use rescue=no_log_replay mount option
This "rescue=skip_bg" has some advantage compared to user space tool like "btrfs-restore":
- Unified recovery tool
User can use any tool they're familiar with, as long as the kernel doesn't panic.
- More info for subvolume.
"btrfs subv list" can work now!
Also move the following mount options to "rescue=" group:
- nologreplay
to rescue=no_log_replay
- usebackuproot
to rescue=use_backup_root
Old options are still available for compatibility purpose, but they are deprecated in favor of new 'rescue=' super option.
Different rescue sub options can be separated by ':', like:
"rescue=no_log_replay:skip_bg:use_backup_root".
Or the traditional but longer way like:
"rescue=no_log_replay,rescue=skip_bg"
The separation character is chosen by:
- No conflicts with existing character
Especially no conflict with ','.
- No extra escaping/quota
Original plan is ';', but since it'll be interpreted by bash, it's changed to current ':'.
Changelog:
v2:
- Introduce 'rescue=' super option.
- Rename original 'usebackuproot' and 'nologreplay'.
It at least makes my vim spell check happier.
- Remove 'recovery' mount option.
As its successor is now deprecated, not need to keep the predecessor.
v2.1:
- Rebase to v5.1-rc4.
- Fix the typos in the cover letter.
Qu Wenruo (3):
btrfs: Remove "recovery" mount option
btrfs: Introduce "rescue=" mount option
btrfs: Introduce new mount option to skip block group items scan
fs/btrfs/ctree.h | 1 + fs/btrfs/disk-io.c | 29 +++++++++++-- fs/btrfs/extent-tree.c | 59 ++++++++++++++++++++++++++ fs/btrfs/super.c | 96 ++++++++++++++++++++++++++++++++++++------ fs/btrfs/volumes.c | 7 +++ 5 files changed, 176 insertions(+), 16 deletions(-)
Signature · 1 line
2.21.0