btrfs-progs: check: remove inode cache clearing functionality

Since we're already directing the end user to use "btrfs rescue
clear-ino-cache" command, there is not much need to support it in
btrfs-check.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Qu Wenruo 2023-12-04 17:26:27 +10:30 committed by David Sterba
parent 171dd56995
commit eae4109054
6 changed files with 17 additions and 19 deletions

View File

@ -101,13 +101,6 @@ SAFE OR ADVISORY OPTIONS
This option is deprecated, please use `btrfs rescue clear-space-cache`
instead, this option would be removed in the future eventually.
--clear-ino-cache
remove leftover items pertaining to the deprecated `inode cache` feature
.. warning::
This option is deprecated, please use `btrfs rescue clear-ino-cache`
instead, this option would be removed in the future eventually.
DANGEROUS OPTIONS
-----------------
@ -147,6 +140,16 @@ DANGEROUS OPTIONS
This option also skips the delay and warning in the repair mode (see
*--repair*).
DEPRECATED OR MOVED OPTIONS
---------------------------
--clear-ino-cache
(removed: 6.7)
remove leftover items pertaining to the deprecated *inode cache* feature,
please use :ref:`btrfs rescue clear-ino-cache<man-rescue-clear-ino-cache>`
instead
EXIT STATUS
-----------

View File

@ -50,6 +50,8 @@ fix-device-size <device>
WARNING: CPU: 3 PID: 439 at fs/btrfs/ctree.h:1559 btrfs_update_device+0x1c5/0x1d0 [btrfs]
.. _man-rescue-clear-ino-cache:
clear-ino-cache <device>
Remove leftover items pertaining to the deprecated `inode cache` feature.

View File

@ -489,7 +489,8 @@ inode_cache, noinode_cache
.. note::
The functionality has been removed in 5.11, any stale data created by
previous use of the *inode_cache* option can be removed by :command:`btrfs check --clear-ino-cache`.
previous use of the *inode_cache* option can be removed by
:ref:`btrfs rescue clear-ino-cache<man-rescue-clear-ino-cache>`.
NOTES ON GENERIC MOUNT OPTIONS

View File

@ -9994,7 +9994,6 @@ static int cmd_check(const struct cmd_struct *cmd, int argc, char **argv)
int init_csum_tree = 0;
int readonly = 0;
int clear_space_cache = 0;
int clear_ino_cache = 0;
int qgroup_report = 0;
int qgroups_repaired = 0;
int qgroup_verify_ret;
@ -10118,8 +10117,8 @@ static int cmd_check(const struct cmd_struct *cmd, int argc, char **argv)
ctree_flags |= OPEN_CTREE_WRITES;
break;
case GETOPT_VAL_CLEAR_INO_CACHE:
clear_ino_cache = 1;
ctree_flags |= OPEN_CTREE_WRITES;
error("--clear-ino-cache option is deprecated, please use \"btrfs rescue clear-ino-cache\" instead");
exit(1);
break;
case GETOPT_VAL_FORCE:
force = 1;
@ -10234,13 +10233,6 @@ static int cmd_check(const struct cmd_struct *cmd, int argc, char **argv)
goto close_out;
}
if (clear_ino_cache) {
warning("--clear-ino-cache option is deprecated, please use \"btrfs rescue clear-ino-cache\" instead");
ret = clear_ino_cache_items(gfs_info);
err = ret;
goto close_out;
}
/*
* repair mode will force us to commit transaction which
* will make us fail to load log tree when mounting.

View File

@ -9,7 +9,7 @@ setup_root_helper
image=$(extract_image "./ino-cache-enabled.raw.xz")
run_check "$TOP/btrfs" check --clear-ino-cache "$image"
run_check "$TOP/btrfs" rescue clear-ino-cache "$image"
run_check "$TOP/btrfs" check "$image"
# Check for FREE_INO items for toplevel subvol