@@ -48,6 +48,7 @@ char *rt_name; /* Name of realtime device */
int rt_spec; /* Realtime dev specified as option */
int convert_lazy_count; /* Convert lazy-count mode on/off */
int lazy_count; /* What to set if to if converting */
+bool skip_freesp_check_on_upgrade; /* do not enable */
bool features_changed; /* did we change superblock feature bits? */
bool add_inobtcount; /* add inode btree counts to AGI */
bool add_bigtime; /* add support for timestamps up to 2486 */
@@ -89,6 +89,7 @@ extern char *rt_name; /* Name of realtime device */
extern int rt_spec; /* Realtime dev specified as option */
extern int convert_lazy_count; /* Convert lazy-count mode on/off */
extern int lazy_count; /* What to set if to if converting */
+extern bool skip_freesp_check_on_upgrade; /* do not enable */
extern bool features_changed; /* did we change superblock feature bits? */
extern bool add_inobtcount; /* add inode btree counts to AGI */
extern bool add_bigtime; /* add support for timestamps up to 2486 */
@@ -688,6 +688,8 @@ need_check_fs_free_space(
struct xfs_mount *mp,
const struct check_state *old)
{
+ if (skip_freesp_check_on_upgrade)
+ return false;
if (xfs_has_finobt(mp) && !(old->features & XFS_FEAT_FINOBT))
return true;
if (xfs_has_reflink(mp) && !(old->features & XFS_FEAT_REFLINK))
@@ -46,6 +46,7 @@ enum o_opt_nums {
BLOAD_LEAF_SLACK,
BLOAD_NODE_SLACK,
NOQUOTA,
+ SKIP_FREESP_CHECK,
O_MAX_OPTS,
};
@@ -59,6 +60,7 @@ static char *o_opts[] = {
[BLOAD_LEAF_SLACK] = "debug_bload_leaf_slack",
[BLOAD_NODE_SLACK] = "debug_bload_node_slack",
[NOQUOTA] = "noquota",
+ [SKIP_FREESP_CHECK] = "debug_skip_freesp_check_on_upgrade",
[O_MAX_OPTS] = NULL,
};
@@ -323,6 +325,15 @@ process_args(int argc, char **argv)
case NOQUOTA:
quotacheck_skip();
break;
+ case SKIP_FREESP_CHECK:
+ if (!val)
+ do_abort(
+ _("-o debug_skip_freesp_check_on_upgrade requires a parameter\n"));
+ skip_freesp_check_on_upgrade = (int)strtol(val, NULL, 0);
+ if (skip_freesp_check_on_upgrade)
+ do_log(
+ _("WARNING: Allowing filesystem upgrades to proceed without free space check. THIS MAY DESTROY YOUR FILESYSTEM!!!\n"));
+ break;
default:
unknown('o', val);
break;