Re: [PATCH 18/18] mkfs: format bigtime filesystems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 18, 2020 at 05:45:41PM +0300, Amir Goldstein wrote:
> On Tue, Aug 18, 2020 at 2:23 AM Darrick J. Wong <darrick.wong@xxxxxxxxxx> wrote:
> >
> > From: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
> >
> > Allow formatting with large timestamps.
> >
> > Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
> 
> Reviewed-by: Amir Goldstein <amir73il@xxxxxxxxx>
> 
> Other than one comment below...
> 
> > ---
> >  man/man8/mkfs.xfs.8 |   16 ++++++++++++++++
> >  mkfs/xfs_mkfs.c     |   24 +++++++++++++++++++++++-
> >  2 files changed, 39 insertions(+), 1 deletion(-)
> >
> >
> > diff --git a/man/man8/mkfs.xfs.8 b/man/man8/mkfs.xfs.8
> > index 082f3ab6c063..7434b9f2b4cd 100644
> > --- a/man/man8/mkfs.xfs.8
> > +++ b/man/man8/mkfs.xfs.8
> > @@ -154,6 +154,22 @@ valid
> >  are:
> >  .RS 1.2i
> >  .TP
> > +.BI bigtime= value
> > +This option enables filesystems that can handle inode timestamps from December
> > +1901 to July 2486, and quota timer expirations from January 1970 to July 2486.
> > +The value is either 0 to disable the feature, or 1 to enable large timestamps.
> > +.IP
> > +If this feature is not enabled, the filesystem can only handle timestamps from
> > +December 1901 to January 2038, and quota timers from January 1970 to February
> > +2106.
> > +.IP
> > +By default,
> > +.B mkfs.xfs
> > +will not enable this feature.
> > +If the option
> > +.B \-m crc=0
> > +is used, the large timestamp feature is not supported and is disabled.
> > +.TP
> >  .BI crc= value
> >  This is used to create a filesystem which maintains and checks CRC information
> >  in all metadata objects on disk. The value is either 0 to disable the feature,
> > diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
> > index 037246effd70..f9f78a020092 100644
> > --- a/mkfs/xfs_mkfs.c
> > +++ b/mkfs/xfs_mkfs.c
> > @@ -120,6 +120,7 @@ enum {
> >         M_RMAPBT,
> >         M_REFLINK,
> >         M_INOBTCNT,
> > +       M_BIGTIME,
> >         M_MAX_OPTS,
> >  };
> >
> > @@ -667,6 +668,7 @@ static struct opt_params mopts = {
> >                 [M_RMAPBT] = "rmapbt",
> >                 [M_REFLINK] = "reflink",
> >                 [M_INOBTCNT] = "inobtcount",
> > +               [M_BIGTIME] = "bigtime",
> >         },
> >         .subopt_params = {
> >                 { .index = M_CRC,
> > @@ -703,6 +705,12 @@ static struct opt_params mopts = {
> >                   .maxval = 1,
> >                   .defaultval = 1,
> >                 },
> > +               { .index = M_BIGTIME,
> > +                 .conflicts = { { NULL, LAST_CONFLICT } },
> > +                 .minval = 0,
> > +                 .maxval = 1,
> > +                 .defaultval = 1,
> 
>                  .defaultval = 0 ?

The (somewhat misnamed) defaultval determines the implied value if the
user doesn't specify one, e.g. "-m bigtime" instead of "-m bigtime=1".
Therefore, we want it to default to 1 like all the other feature flag
arguments.

Thanks for reviewing most of this featureset! :)

--D

> 
> Thanks,
> Amir.



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux