Skip to content

Commit

Permalink
btrfs-progs: check: remove --clear-ino-cache option
Browse files Browse the repository at this point in the history
The inode_cache functionality is long gone and the 'rescue' group
provides the clearning functionality, no point keeping it in check.
Move the --clear-space-cache option to the deprecaeted section so it can
be removed soon.

Signed-off-by: David Sterba <[email protected]>
  • Loading branch information
kdave committed May 2, 2024
1 parent 5d97c32 commit 3b89906
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 24 deletions.
25 changes: 9 additions & 16 deletions Documentation/btrfs-check.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,6 @@ SAFE OR ADVISORY OPTIONS
This can be used to use a different starting point if some of the primary
superblock is damaged.

--clear-space-cache v1|v2
completely remove the free space cache of the given version

See also the *clear_cache* mount option.

.. warning::
This option is deprecated, please use `btrfs rescue clear-space-cache`
instead, this option would be removed in the future eventually.

DANGEROUS OPTIONS
-----------------

Expand Down Expand Up @@ -140,15 +131,17 @@ DANGEROUS OPTIONS
This option also skips the delay and warning in the repair mode (see
*--repair*).

DEPRECATED OR MOVED OPTIONS
---------------------------
DEPRECATED OR REMOVED OPTIONS
-----------------------------

--clear-space-cache v1|v2
completely remove the free space cache of the given version

--clear-ino-cache
(removed: 6.7)
See also the *clear_cache* mount option.

remove leftover items pertaining to the deprecated *inode cache* feature,
please use :ref:`btrfs rescue clear-ino-cache<man-rescue-clear-ino-cache>`
instead
.. warning::
This option is deprecated, please use `btrfs rescue clear-space-cache`
instead, this option would be removed in the future eventually.

EXIT STATUS
-----------
Expand Down
9 changes: 1 addition & 8 deletions check/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -10117,7 +10117,6 @@ static const char * const cmd_check_usage[] = {
OPTLINE("-p|--progress", "indicate progress"),
"",
"Deprecated or moved options:",
OPTLINE("--clear-ino-cache", "clear ino cache leftover items (moved to 'rescue' group)"),
OPTLINE("--clear-space-cache v1|v2", "clear space cache for v1 or v2 (moved to 'rescue' group)"),
NULL
};
Expand Down Expand Up @@ -10152,7 +10151,7 @@ static int cmd_check(const struct cmd_struct *cmd, int argc, char **argv)
GETOPT_VAL_INIT_EXTENT, GETOPT_VAL_CHECK_CSUM,
GETOPT_VAL_READONLY, GETOPT_VAL_CHUNK_TREE,
GETOPT_VAL_MODE, GETOPT_VAL_CLEAR_SPACE_CACHE,
GETOPT_VAL_CLEAR_INO_CACHE, GETOPT_VAL_FORCE };
GETOPT_VAL_FORCE };
static const struct option long_options[] = {
{ "super", required_argument, NULL, 's' },
{ "repair", no_argument, NULL, GETOPT_VAL_REPAIR },
Expand All @@ -10174,8 +10173,6 @@ static int cmd_check(const struct cmd_struct *cmd, int argc, char **argv)
GETOPT_VAL_MODE },
{ "clear-space-cache", required_argument, NULL,
GETOPT_VAL_CLEAR_SPACE_CACHE},
{ "clear-ino-cache", no_argument , NULL,
GETOPT_VAL_CLEAR_INO_CACHE},
{ "force", no_argument, NULL, GETOPT_VAL_FORCE },
{ NULL, 0, NULL, 0}
};
Expand Down Expand Up @@ -10257,10 +10254,6 @@ 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:
error("--clear-ino-cache option is deprecated, please use \"btrfs rescue clear-ino-cache\" instead");
exit(1);
break;
case GETOPT_VAL_FORCE:
force = true;
break;
Expand Down

0 comments on commit 3b89906

Please sign in to comment.