]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: introduce "rescue=" mount option
authorQu Wenruo <wqu@suse.com>
Thu, 4 Jun 2020 07:18:06 +0000 (15:18 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 27 Jul 2020 10:55:22 +0000 (12:55 +0200)
commitd63a476e3c3d2414a0aad90278c05d7d9b04fd53
treed4ab5d5e6afbd2d89d735c197934d3ea44730828
parentaa965fccec2988a99a6c126336c3f554ebd442e2
btrfs: introduce "rescue=" mount option

This patch introduces a new "rescue=" mount option group for all mount
options for data recovery.

Different rescue sub options are seperated by ':'. E.g
"ro,rescue=nologreplay:usebackuproot".

The original plan was to use ';', but ';' needs to be escaped/quoted,
or it will be interpreted by bash, similar to '|'.

And obviously, user can specify rescue options one by one like:
"ro,rescue=nologreplay,rescue=usebackuproot".

The following mount options are converted to "rescue=", old mount
options are deprecated but still available for compatibility purpose:

- usebackuproot
  Now it's "rescue=usebackuproot"

- nologreplay
  Now it's "rescue=nologreplay"

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/super.c