Message ID | d28d747954ec9967f6e01dcc2185229f1667b7db.1701658076.git.wqu@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | btrfs-progs: Documentation: update the man page for btrfs check lowmem mode | expand |
On Sun, Dec 3, 2023 at 9:48 PM Qu Wenruo <wqu@suse.com> wrote: > > Lowmem mode has improved quite a lot since its introduction, for > read-only check it's definitely fine. > > For repair mode, both lowmem and original mode are considered dangerous > especially for complex corruptions. > > For now lowmem mode is only bad at fixing fundamentally corrupted cases, > like bad shift offsets or transid, which in real world it's not an easy > repair for the original mode either. > > This patch would move the --mode option out of the dangerous section and > update the notes for the lowmem mode on its limitation. > > Signed-off-by: Qu Wenruo <wqu@suse.com> > --- > Documentation/btrfs-check.rst | 32 ++++++++++++++------------------ > 1 file changed, 14 insertions(+), 18 deletions(-) > > diff --git a/Documentation/btrfs-check.rst b/Documentation/btrfs-check.rst > index 046aec52923a..41ab39fab317 100644 > --- a/Documentation/btrfs-check.rst > +++ b/Documentation/btrfs-check.rst > @@ -57,6 +57,20 @@ SAFE OR ADVISORY OPTIONS > -E|--subvol-extents <subvolid> > show extent state for the given subvolume > > +--mode <MODE> > + select mode of operation regarding memory and IO > + > + The *MODE* can be one of: > + > + original > + The metadata are read into memory and verified, thus the requirements are high > + on large filesystems and can even lead to out-of-memory conditions. The > + possible workaround is to export the block device over network to a machine > + with enough memory. > + lowmem > + This mode is supposed to address the high memory consumption at the cost of > + increased IO when it needs to re-read blocks. This may increase run time. > + > -p|--progress > indicate progress at various checking phases > > @@ -117,24 +131,6 @@ DANGEROUS OPTIONS > .. warning:: > Do not use unless you know what you're doing. > > ---mode <MODE> > - select mode of operation regarding memory and IO > - > - The *MODE* can be one of: > - > - original > - The metadata are read into memory and verified, thus the requirements are high > - on large filesystems and can even lead to out-of-memory conditions. The > - possible workaround is to export the block device over network to a machine > - with enough memory. > - lowmem > - This mode is supposed to address the high memory consumption at the cost of > - increased IO when it needs to re-read blocks. This may increase run time. > - > - .. note:: > - *lowmem* mode does not work with *--repair* yet, and is still considered > - experimental. > - > .. _man-check-option-force: > > --force > -- > 2.43.0 > > This patch should also include updating the code in check/main.c to drop the warnings and notes of its experimental nature too. -- 真実はいつも一つ!/ Always, there's only one truth!
On Mon, Dec 04, 2023 at 01:18:06PM +1030, Qu Wenruo wrote: > Lowmem mode has improved quite a lot since its introduction, for > read-only check it's definitely fine. > > For repair mode, both lowmem and original mode are considered dangerous > especially for complex corruptions. > > For now lowmem mode is only bad at fixing fundamentally corrupted cases, > like bad shift offsets or transid, which in real world it's not an easy > repair for the original mode either. > > This patch would move the --mode option out of the dangerous section and > update the notes for the lowmem mode on its limitation. > > Signed-off-by: Qu Wenruo <wqu@suse.com> Added to devel, with removed warnings from the code as Neal noted.
diff --git a/Documentation/btrfs-check.rst b/Documentation/btrfs-check.rst index 046aec52923a..41ab39fab317 100644 --- a/Documentation/btrfs-check.rst +++ b/Documentation/btrfs-check.rst @@ -57,6 +57,20 @@ SAFE OR ADVISORY OPTIONS -E|--subvol-extents <subvolid> show extent state for the given subvolume +--mode <MODE> + select mode of operation regarding memory and IO + + The *MODE* can be one of: + + original + The metadata are read into memory and verified, thus the requirements are high + on large filesystems and can even lead to out-of-memory conditions. The + possible workaround is to export the block device over network to a machine + with enough memory. + lowmem + This mode is supposed to address the high memory consumption at the cost of + increased IO when it needs to re-read blocks. This may increase run time. + -p|--progress indicate progress at various checking phases @@ -117,24 +131,6 @@ DANGEROUS OPTIONS .. warning:: Do not use unless you know what you're doing. ---mode <MODE> - select mode of operation regarding memory and IO - - The *MODE* can be one of: - - original - The metadata are read into memory and verified, thus the requirements are high - on large filesystems and can even lead to out-of-memory conditions. The - possible workaround is to export the block device over network to a machine - with enough memory. - lowmem - This mode is supposed to address the high memory consumption at the cost of - increased IO when it needs to re-read blocks. This may increase run time. - - .. note:: - *lowmem* mode does not work with *--repair* yet, and is still considered - experimental. - .. _man-check-option-force: --force
Lowmem mode has improved quite a lot since its introduction, for read-only check it's definitely fine. For repair mode, both lowmem and original mode are considered dangerous especially for complex corruptions. For now lowmem mode is only bad at fixing fundamentally corrupted cases, like bad shift offsets or transid, which in real world it's not an easy repair for the original mode either. This patch would move the --mode option out of the dangerous section and update the notes for the lowmem mode on its limitation. Signed-off-by: Qu Wenruo <wqu@suse.com> --- Documentation/btrfs-check.rst | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-)