xfs_admin: support upgrading v5 filesystems
v6 cover xfs_admin: support upgrading v5 filesystems
Hi all,
This submission extends xfs_repair and xfs_admin to support adding the inode btree counter and bigtime features to an existing v5 filesystem. The first three patches lay the groundwork in both tools for performing upgrades, and the last two patches add the ability to add features.
v2: Rebase to 5.10-rc0
v3: respond to reviewer comments
v4: document which kernel version these new features showed up in
v5: move all the upgrader code to xfs_repair per Eric suggestion, which
eliminates a bunch of fragile db/admin/repair coordination.
v6: update mkfs/admin/repair manpages to identify CLI options that apply
only to V4 fses and are therefore deprecated
If you're going to start using this mess, you probably ought to just pull from my git trees, which are linked below.
This is an extraordinary way to destroy everything. Enjoy! Comments and questions are, as always, welcome.
--D
xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=fs-upgrades
--- db/xfs_admin.sh | 6 ++- man/man8/mkfs.xfs.8 | 16 +++++++++ man/man8/xfs_admin.8 | 47 +++++++++++++++++++++++++ repair/globals.c | 2 + repair/globals.h | 2 + repair/phase2.c | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++ repair/xfs_repair.c | 22 ++++++++++++ 7 files changed, 186 insertions(+), 2 deletions(-)
PATCH v6 1/5 man: mark all deprecated V4 format options
From: Darrick J. Wong <[email protected]>
Update the manual pages for the most popular tools to note which options are only useful with the V4 XFS format, and that the V4 format is deprecated and will be removed no later than September 2030.
--- man/man8/mkfs.xfs.8 | 16 ++++++++++++++++ man/man8/xfs_admin.8 | 10 ++++++++++ 2 files changed, 26 insertions(+)
man/man8/mkfs.xfs.8 +16 -0
@@ -223,6 +223,11 @@ of calculating and checking the CRCs is not noticeable in normal operation. By default, .B mkfs.xfs will enable metadata CRCs. +.IP +Formatting a filesystem without CRCs selects the V4 format, which is deprecated +and will be removed from upstream in September 2030. +Distributors may choose to withdraw support for the V4 format earlier than +this date. .TP .BI finobt= value This option enables the use of a separate free inode btree index in each
@@ -592,6 +597,8 @@ This option can be used to turn off inode alignment when the filesystem needs to be mountable by a version of IRIX that does not have the inode alignment feature (any release of IRIX before 6.2, and IRIX 6.2 without XFS patches). +.IP +This option only applies to the deprecated V4 format. .TP .BI attr= value This is used to specify the version of extended attribute inline
@@ -602,6 +609,8 @@ between attribute and extent data. The previous version 1, which has fixed regions for attribute and extent data, is kept for backwards compatibility with kernels older than version 2.6.16. +.IP +This option only applies to the deprecated V4 format. .TP .BI projid32bit[= value ] This is used to enable 32bit quota project identifiers. The
@@ -609,6 +618,8 @@ This is used to enable 32bit quota project identifiers. The is either 0 or 1, with 1 signifying that 32bit projid are to be enabled. If the value is omitted, 1 is assumed. (This default changed in release version 3.2.0.) +.IP +This option only applies to the deprecated V4 format. .TP .BI sparse[= value ] Enable sparse inode chunk allocation. The
@@ -690,6 +701,7 @@ stripe-aligned log writes (see the sunit and su options, below). The previous version 1, which is limited to 32k log buffers and does not support stripe-aligned writes, is kept for backwards compatibility with very old 2.4 kernels. +This option only applies to the deprecated V4 format. .TP .BI sunit= value This specifies the alignment to be used for log writes. The
@@ -744,6 +756,8 @@ is 1 (on) so you must specify .B lazy-count=0 if you want to disable this feature for older kernels which don't support it. +.IP +This option only applies to the deprecated V4 format. .RE .PP .PD 0
@@ -803,6 +817,8 @@ will be stored in the directory structure. The default value is 1. When CRCs are enabled (the default), the ftype functionality is always enabled, and cannot be turned off. .IP +This option only applies to the deprecated V4 format. +.IP .RE .TP .BI \-p " protofile"
man/man8/xfs_admin.8 +10 -0
@@ -54,6 +54,8 @@ for a detailed description of the XFS log. Enables unwritten extent support on a filesystem that does not already have this enabled (for legacy filesystems, it can't be disabled anymore at mkfs time). +.IP +This option only applies to the deprecated V4 format. .TP .B \-f Specifies that the filesystem image to be processed is stored in a
@@ -67,12 +69,16 @@ option). .B \-j Enables version 2 log format (journal format supporting larger log buffers). +.IP +This option only applies to the deprecated V4 format. .TP .B \-l Print the current filesystem label. .TP .B \-p Enable 32bit project identifier support (PROJID32BIT feature). +.IP +This option only applies to the deprecated V4 format. .TP .B \-u Print the current filesystem UUID (Universally Unique IDentifier).
@@ -83,6 +89,8 @@ Enable (1) or disable (0) lazy-counters in the filesystem. Lazy-counters may not be disabled on Version 5 superblock filesystems (i.e. those with metadata CRCs enabled). .IP +In other words, this option only applies to the deprecated V4 format. +.IP This operation may take quite a bit of time on large filesystems as the entire filesystem needs to be scanned when this option is changed. .IP
@@ -92,6 +100,8 @@ information is kept in other parts of the filesystem to be able to maintain the counter values without needing to keep them in the superblock. This gives significant improvements in performance on some configurations and metadata intensive workloads. +.IP +This option only applies to the deprecated V4 format. .TP .BI \-L " label" Set the filesystem label to
Re: [PATCH 1/5] man: mark all deprecated V4 format options
Quoted 7 lines · Darrick J. Wong
From: Darrick J. Wong <[email protected]>
Update the manual pages for the most popular tools to note which options are only useful with the V4 XFS format, and that the V4 format is deprecated and will be removed no later than September 2030.
Signed-off-by Darrick J. Wong <[email protected]>
Looks good,
PATCH v6 2/5 xfs_repair: allow upgrades to v5 filesystems
In reply to Darrick J. WongFrom: Darrick J. Wong <[email protected]>
Add some helper functions so that we can allow users to upgrade V5 filesystems in a sane manner. This just lands the boilerplate; the actual feature validation and whatnot will land in the next patches.
--- repair/phase2.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+)
repair/phase2.c +40 -0
@@ -131,6 +131,40 @@ zero_log( libxfs_max_lsn = log->l_last_sync_lsn; } +/* Perform the user's requested upgrades on filesystem. */ +static void +upgrade_filesystem ( +struct xfs_mount *mp) +{ +struct xfs_buf *bp; +bool dirty = false; +int error; + +if (no_modify || !dirty) +return ; + + bp =libxfs_getsb (mp); +if (!bp || bp->b_error) { +do_error ( +_ ("couldn't get superblock for feature upgrade, err=%d\n" ), + bp ? bp->b_error :ENOMEM ); + }else { +libxfs_sb_to_disk (bp->b_addr, &mp->m_sb); + +/* +* Write the primary super to disk immediately so that +* needsrepair will be set if repair doesn't complete. +*/ + error = -libxfs_bwrite (bp); +if (error) +do_error ( +_ ("filesystem feature upgrade failed, err=%d\n" ), + error); + } +if (bp) +libxfs_buf_relse (bp); +} +/* * ok, at this point, the fs is mounted but the root inode may be * trashed and the ag headers haven't been checked. So we have
@@ -235,4 +269,10 @@ phase2(do_warn (_ ("would correct\n" )); } } + +/* +* Upgrade the filesystem now that we've done a preliminary check of +* the superblocks, the AGs, the log, and the metadata inodes. +*/ +upgrade_filesystem (mp); }
Re: [PATCH 2/5] xfs_repair: allow upgrades to v5 filesystems
Quoted 8 lines · Darrick J. Wong
From: Darrick J. Wong <[email protected]>
Add some helper functions so that we can allow users to upgrade V5 filesystems in a sane manner. This just lands the boilerplate; the actual feature validation and whatnot will land in the next patches.
Signed-off-by Darrick J. Wong <[email protected]>---
Quoted 61 lines
repair/phase2.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+)repair/phase2.c +40
-0@@ -131,6 +131,40 @@ zero_log( libxfs_max_lsn = log->l_last_sync_lsn; } +/* Perform the user's requested upgrades on filesystem. */ +static void +upgrade_filesystem ( +struct xfs_mount *mp) +{ +struct xfs_buf *bp; +bool dirty = false; +int error; + +if (no_modify || !dirty) +return ; + + bp =libxfs_getsb (mp); +if (!bp || bp->b_error) { +do_error ( +_ ("couldn't get superblock for feature upgrade, err=%d\n" ), + bp ? bp->b_error :ENOMEM ); + }else { +libxfs_sb_to_disk (bp->b_addr, &mp->m_sb); + +/* +* Write the primary super to disk immediately so that +* needsrepair will be set if repair doesn't complete. +*/ + error = -libxfs_bwrite (bp); +if (error) +do_error ( +_ ("filesystem feature upgrade failed, err=%d\n" ), + error); + } +if (bp) +libxfs_buf_relse (bp); +} +/* * ok, at this point, the fs is mounted but the root inode may be * trashed and the ag headers haven't been checked. So we have @@ -235,4 +269,10 @@ phase2(do_warn (_ ("would correct\n" )); } } + +/* +* Upgrade the filesystem now that we've done a preliminary check of +* the superblocks, the AGs, the log, and the metadata inodes. +*/ +upgrade_filesystem (mp); }
Re: [PATCH 2/5] xfs_repair: allow upgrades to v5 filesystems
In reply to Darrick J. WongQuoted 5 lines · Darrick J. Wong
From: Darrick J. Wong <[email protected]>
Add some helper functions so that we can allow users to upgrade V5 filesystems in a sane manner. This just lands the boilerplate; the actual feature validation and whatnot will land in the next patches.
Looks good,
PATCH v6 3/5 xfs_admin: support adding features to V5 filesystems
In reply to Darrick J. WongFrom: Darrick J. Wong <[email protected]>
Teach the xfs_admin script how to add features to V5 filesystems. Technically speaking we could add lazycount to the list, but that option is only useful for the V4 format which is deprecated.
--- db/xfs_admin.sh | 6 ++++-- man/man8/xfs_admin.8 | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-)
db/xfs_admin.sh +4 -2
@@ -8,9 +8,10 @@ status=0 DB_OPTS="" REPAIR_OPTS="" REPAIR_DEV_OPTS="" -USAGE="Usage: xfs_admin [-efjlpuV] [-c 0|1] [-L label] [-r rtdev] [-U uuid] device [logdev]" +DB_LOG_OPTS="" +USAGE="Usage: xfs_admin [-efjlpuV] [-c 0|1] [-L label] [-O v5_feature] [-r rtdev] [-U uuid] device [logdev]" -while getopts "c:efjlL:pr:uU:V" c +while getopts "c:efjlL:O:pr:uU:V" c do case $c in c) REPAIR_OPTS=$REPAIR_OPTS" -c lazycount="$OPTARG;;
@@ -19,6 +20,7 @@ do j) DB_OPTS=$DB_OPTS" -c 'version log2'";; l) DB_OPTS=$DB_OPTS" -r -c label";; L) DB_OPTS=$DB_OPTS" -c 'label "$OPTARG"'";; + O) REPAIR_OPTS=$REPAIR_OPTS" -c $OPTARG=1";; p) DB_OPTS=$DB_OPTS" -c 'version projid32bit'";; r) REPAIR_DEV_OPTS=" -r '$OPTARG'";; u) DB_OPTS=$DB_OPTS" -r -c uuid";;
man/man8/xfs_admin.8 +22 -0
@@ -6,6 +6,8 @@ xfs_admin \- change parameters of an XFS filesystem [ .B \-eflpu ] [ +.BI \-O " featurelist" +] [ .BR "\-c 0" | 1 ] [ .B \-L
@@ -116,6 +118,26 @@ The filesystem label can be cleared using the special "\c " value for .IR label . .TP +.BI \-O " feature1" = "status" , "feature2" = "status..." +Add or remove features on an existing V5 filesystem. +The features should be specified as a comma-separated list. +.I status +should be either 0 to disable the feature or 1 to enable the feature. +Note, however, that most features cannot be disabled. +.IP +.B NOTE: +Administrators must ensure the filesystem is clean by running +.B xfs_repair -n +to inspect the filesystem before performing the upgrade. +If corruption is found, recovery procedures (e.g. reformat followed by +restoration from backup; or running +.B xfs_repair +without the +.BR -n ) +must be followed to clean the filesystem. +.IP +There are no feature options currently. +.TP .BI \-U " uuid" Set the UUID of the filesystem to .IR uuid .
PATCH v6 4/5 xfs_repair: enable inobtcount upgrade via repair
In reply to Darrick J. WongFrom: Darrick J. Wong <[email protected]>
Use xfs_repair to add the inode btree counter feature to a filesystem.
--- man/man8/xfs_admin.8 | 11 ++++++++++- repair/globals.c | 1 + repair/globals.h | 1 + repair/phase2.c | 30 ++++++++++++++++++++++++++++++ repair/xfs_repair.c | 11 +++++++++++ 5 files changed, 53 insertions(+), 1 deletion(-)
man/man8/xfs_admin.8 +10 -1
@@ -136,7 +136,16 @@ without the .BR -n ) must be followed to clean the filesystem. .IP -There are no feature options currently. +Supported features are as follows: +.RS 0.7i +.TP 0.4i +.B inobtcount +Keep a count the number of blocks in each inode btree in the AGI. +This reduces mount time by speeding up metadata space reservation calculations. +The filesystem cannot be downgraded after this feature is enabled. +Once enabled, the filesystem will not be writable by older kernels. +This feature was added to Linux 5.10. +.RE .TP .BI \-U " uuid" Set the UUID of the filesystem to
repair/globals.c +1 -0
@@ -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 add_inobtcount;/* add inode btree counts to AGI */ /* misc status variables */
repair/globals.h +1 -0
@@ -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 add_inobtcount;/* add inode btree counts to AGI */ /* misc status variables */
repair/phase2.c +30 -0
@@ -131,6 +131,33 @@ zero_log( libxfs_max_lsn = log->l_last_sync_lsn; } +static bool +set_inobtcount ( +struct xfs_mount *mp) +{ +if (!xfs_sb_version_hascrc (&mp->m_sb)) { +printf ( +_ ("Inode btree count feature only supported on V5 filesystems.\n" )); +exit (0 ); + } + +if (!xfs_sb_version_hasfinobt (&mp->m_sb)) { +printf ( +_ ("Inode btree count feature requires free inode btree.\n" )); +exit (0 ); + } + +if (xfs_sb_version_hasinobtcounts (&mp->m_sb)) { +printf (_ ("Filesystem already has inode btree counts.\n" )); +exit (0 ); + } + +printf (_ ("Adding inode btree counts to filesystem.\n" )); + mp->m_sb.sb_features_ro_compat |=XFS_SB_FEAT_RO_COMPAT_INOBTCNT ; + mp->m_sb.sb_features_incompat |=XFS_SB_FEAT_INCOMPAT_NEEDSREPAIR ; +return true; +} +/* Perform the user's requested upgrades on filesystem. */ static void upgrade_filesystem(
@@ -140,6 +167,9 @@ upgrade_filesystem(bool dirty = false;int error; +if (add_inobtcount) + dirty |=set_inobtcount (mp); +if (no_modify || !dirty)return ;
repair/xfs_repair.c +11 -0
@@ -65,11 +65,13 @@ static char *o_opts[] = {*/ enum c_opt_nums {CONVERT_LAZY_COUNT =0 , +CONVERT_INOBTCOUNT ,C_MAX_OPTS , };static char *c_opts[] = { [CONVERT_LAZY_COUNT ] ="lazycount" , + [CONVERT_INOBTCOUNT ] ="inobtcount" , [C_MAX_OPTS ] =NULL , };
@@ -302,6 +304,15 @@ process_args(int argc, char **argv) lazy_count = (int )strtol (val,NULL ,0 ); convert_lazy_count =1 ;break ; +case CONVERT_INOBTCOUNT : +if (!val) +do_abort ( +_ ("-c inobtcount requires a parameter\n" )); +if (strtol (val,NULL ,0 ) !=1 ) +do_abort ( +_ ("-c inobtcount only supports upgrades\n" )); + add_inobtcount = true; +break ;default :unknown ('c' , val);break ;
Re: [PATCH 4/5] xfs_repair: enable inobtcount upgrade via repair
Quoted 7 lines · Darrick J. Wong
From: Darrick J. Wong <[email protected]>
Use
xfs_repairto add the inode btree counter feature to a filesystem.Signed-off-by Darrick J. Wong <[email protected]>Reviewed-by Christoph Hellwig <[email protected]>---
Quoted 137 lines
man/man8/xfs_admin.8 | 11 ++++++++++- repair/globals.c | 1 + repair/globals.h | 1 + repair/phase2.c | 30 ++++++++++++++++++++++++++++++ repair/xfs_repair.c | 11 +++++++++++ 5 files changed, 53 insertions(+), 1 deletion(-)man/man8/xfs_admin.8 +10
-1@@ -136,7 +136,16 @@ without the .BR -n ) must be followed to clean the filesystem. .IP -There are no feature options currently. +Supported features are as follows: +.RS 0.7i +.TP 0.4i +.B inobtcount +Keep a count the number of blocks in each inode btree in the AGI. +This reduces mount time by speeding up metadata space reservation calculations. +The filesystem cannot be downgraded after this feature is enabled. +Once enabled, the filesystem will not be writable by older kernels. +This feature was added to Linux 5.10. +.RE .TP .BI \-U " uuid" Set the UUID of the filesystem torepair/globals.c +1
-0@@ -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 add_inobtcount;/* add inode btree counts to AGI */ /* misc status variables */ repair/globals.h +1
-0@@ -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 add_inobtcount;/* add inode btree counts to AGI */ /* misc status variables */ repair/phase2.c +30
-0@@ -131,6 +131,33 @@ zero_log( libxfs_max_lsn = log->l_last_sync_lsn; } +static bool +set_inobtcount ( +struct xfs_mount *mp) +{ +if (!xfs_sb_version_hascrc (&mp->m_sb)) { +printf ( +_ ("Inode btree count feature only supported on V5 filesystems.\n" )); +exit (0 ); + } + +if (!xfs_sb_version_hasfinobt (&mp->m_sb)) { +printf ( +_ ("Inode btree count feature requires free inode btree.\n" )); +exit (0 ); + } + +if (xfs_sb_version_hasinobtcounts (&mp->m_sb)) { +printf (_ ("Filesystem already has inode btree counts.\n" )); +exit (0 ); + } + +printf (_ ("Adding inode btree counts to filesystem.\n" )); + mp->m_sb.sb_features_ro_compat |=XFS_SB_FEAT_RO_COMPAT_INOBTCNT ; + mp->m_sb.sb_features_incompat |=XFS_SB_FEAT_INCOMPAT_NEEDSREPAIR ; +return true; +} +/* Perform the user's requested upgrades on filesystem. */ static void upgrade_filesystem(@@ -140,6 +167,9 @@ upgrade_filesystem(bool dirty = false;int error; +if (add_inobtcount) + dirty |=set_inobtcount (mp); +if (no_modify || !dirty)return ;repair/xfs_repair.c +11
-0@@ -65,11 +65,13 @@ static char *o_opts[] = {*/ enum c_opt_nums {CONVERT_LAZY_COUNT =0 , +CONVERT_INOBTCOUNT ,C_MAX_OPTS , };static char *c_opts[] = { [CONVERT_LAZY_COUNT ] ="lazycount" , + [CONVERT_INOBTCOUNT ] ="inobtcount" , [C_MAX_OPTS ] =NULL , };@@ -302,6 +304,15 @@ process_args(int argc, char **argv) lazy_count = (int )strtol (val,NULL ,0 ); convert_lazy_count =1 ;break ; +case CONVERT_INOBTCOUNT : +if (!val) +do_abort ( +_ ("-c inobtcount requires a parameter\n" )); +if (strtol (val,NULL ,0 ) !=1 ) +do_abort ( +_ ("-c inobtcount only supports upgrades\n" )); + add_inobtcount = true; +break ;default :unknown ('c' , val);break ;
PATCH v6 5/5 xfs_repair: enable bigtime upgrade via repair
In reply to Darrick J. WongFrom: Darrick J. Wong <[email protected]>
Upgrade existing V5 filesystems to support large timestamps up to 2486.
--- man/man8/xfs_admin.8 | 6 ++++++ repair/globals.c | 1 + repair/globals.h | 1 + repair/phase2.c | 23 +++++++++++++++++++++++ repair/xfs_repair.c | 11 +++++++++++ 5 files changed, 42 insertions(+)
man/man8/xfs_admin.8 +6 -0
@@ -145,6 +145,12 @@ This reduces mount time by speeding up metadata space reservation calculations. The filesystem cannot be downgraded after this feature is enabled. Once enabled, the filesystem will not be writable by older kernels. This feature was added to Linux 5.10. +.TP 0.4i +.B bigtime +Upgrade a filesystem to support larger timestamps up to the year 2486. +The filesystem cannot be downgraded after this feature is enabled. +Once enabled, the filesystem will not be mountable by older kernels. +This feature was added to Linux 5.10. .RE .TP .BI \-U " uuid"
repair/globals.c +1 -0
@@ -49,6 +49,7 @@ 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 add_inobtcount;/* add inode btree counts to AGI */ +bool add_bigtime;/* add support for timestamps up to 2486 */ /* misc status variables */
repair/globals.h +1 -0
@@ -90,6 +90,7 @@ 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 add_inobtcount;/* add inode btree counts to AGI */ +extern bool add_bigtime;/* add support for timestamps up to 2486 */ /* misc status variables */
repair/phase2.c +23 -0
@@ -158,6 +158,27 @@ set_inobtcount(return true; } +static bool +set_bigtime ( +struct xfs_mount *mp) +{ +if (!xfs_sb_version_hascrc (&mp->m_sb)) { +printf ( +_ ("Large timestamp feature only supported on V5 filesystems.\n" )); +exit (0 ); + } + +if (xfs_sb_version_hasbigtime (&mp->m_sb)) { +printf (_ ("Filesystem already supports large timestamps.\n" )); +exit (0 ); + } + +printf (_ ("Adding large timestamp support to filesystem.\n" )); + mp->m_sb.sb_features_incompat |= (XFS_SB_FEAT_INCOMPAT_NEEDSREPAIR | +XFS_SB_FEAT_INCOMPAT_BIGTIME ); +return true; +} +/* Perform the user's requested upgrades on filesystem. */ static void upgrade_filesystem(
@@ -169,6 +190,8 @@ upgrade_filesystem(if (add_inobtcount) dirty |=set_inobtcount (mp); +if (add_bigtime) + dirty |=set_bigtime (mp);if (no_modify || !dirty)return ;
repair/xfs_repair.c +11 -0
@@ -66,12 +66,14 @@ static char *o_opts[] = {enum c_opt_nums {CONVERT_LAZY_COUNT =0 ,CONVERT_INOBTCOUNT , +CONVERT_BIGTIME ,C_MAX_OPTS , };static char *c_opts[] = { [CONVERT_LAZY_COUNT ] ="lazycount" , [CONVERT_INOBTCOUNT ] ="inobtcount" , + [CONVERT_BIGTIME ] ="bigtime" , [C_MAX_OPTS ] =NULL , };
@@ -313,6 +315,15 @@ process_args(int argc, char **argv) _("-c inobtcount only supports upgrades\n")); add_inobtcount = true;break ; +case CONVERT_BIGTIME : +if (!val) +do_abort ( +_ ("-c bigtime requires a parameter\n" )); +if (strtol (val,NULL ,0 ) !=1 ) +do_abort ( +_ ("-c bigtime only supports upgrades\n" )); + add_bigtime = true; +break ;default :unknown ('c' , val);break ;