diff mbox series

[1/2] btrfs-progs: mkfs: make -R|--runtime-features option deprecated

Message ID 1ca85433fb63d9c9cf66da72e407381c0146b76c.1681180159.git.wqu@suse.com (mailing list archive)
State New, archived
Headers show
Series btrfs-progs: move block-group-tree out of experimental features | expand

Commit Message

Qu Wenruo April 11, 2023, 2:31 a.m. UTC
The option -R|--runtime-features is introduced to support features that
doesn't result a full incompat flag change, thus things like
free-space-tree and quota features are put here.

But to end users, such separation of features is not helpful and can be
sometimes confusing.

Thus we're already migrating those runtime features into -O|--features
option under experimental builds.

I believe this is the proper time to move those runtime features into
-O|--features option, and mark the -R|--runtime-features option
deprecated.

For now we still keep the old option as for compatibility purposes.

Signed-off-by: Qu Wenruo <wqu@suse.com>
---
 Documentation/mkfs.btrfs.rst | 25 ++++---------------------
 common/fsfeatures.c          |  6 ------
 mkfs/main.c                  |  3 ++-
 3 files changed, 6 insertions(+), 28 deletions(-)

Comments

Neal Gompa April 12, 2023, 1:51 a.m. UTC | #1
On Mon, Apr 10, 2023 at 10:42 PM Qu Wenruo <wqu@suse.com> wrote:
>
> The option -R|--runtime-features is introduced to support features that
> doesn't result a full incompat flag change, thus things like
> free-space-tree and quota features are put here.
>
> But to end users, such separation of features is not helpful and can be
> sometimes confusing.
>
> Thus we're already migrating those runtime features into -O|--features
> option under experimental builds.
>
> I believe this is the proper time to move those runtime features into
> -O|--features option, and mark the -R|--runtime-features option
> deprecated.
>
> For now we still keep the old option as for compatibility purposes.
>
> Signed-off-by: Qu Wenruo <wqu@suse.com>
> ---
>  Documentation/mkfs.btrfs.rst | 25 ++++---------------------
>  common/fsfeatures.c          |  6 ------
>  mkfs/main.c                  |  3 ++-
>  3 files changed, 6 insertions(+), 28 deletions(-)
>
> diff --git a/Documentation/mkfs.btrfs.rst b/Documentation/mkfs.btrfs.rst
> index ba7227b31f72..e80f4c5c83ee 100644
> --- a/Documentation/mkfs.btrfs.rst
> +++ b/Documentation/mkfs.btrfs.rst
> @@ -161,18 +161,6 @@ OPTIONS
>
>                  $ mkfs.btrfs -O list-all
>
> --R|--runtime-features <feature1>[,<feature2>...]
> -        A list of features that be can enabled at mkfs time, otherwise would have
> -        to be turned on on a mounted filesystem.
> -        To disable a feature, prefix it with *^*.
> -
> -        See section *RUNTIME FEATURES* for more details.  To see all available
> -        runtime features that **mkfs.btrfs** supports run:
> -
> -        .. code-block:: bash
> -
> -                $ mkfs.btrfs -R list-all
> -
>  -f|--force
>          Forcibly overwrite the block devices when an existing filesystem is detected.
>          By default, **mkfs.btrfs** will utilize *libblkid* to check for any known
> @@ -199,6 +187,10 @@ OPTIONS
>  -l|--leafsize <size>
>          Removed in 6.0, used to be alias for *--nodesize*.
>
> +-R|--runtime-features <feature1>[,<feature2>...]
> +        Removed in 6.4, used to specify features not affecting on-disk format.
> +        Now all such features are merged into `-O|--features` option.
> +
>  SIZE UNITS
>  ----------
>
> @@ -279,15 +271,6 @@ zoned
>          see *ZONED MODE* in :doc:`btrfs(5)<btrfs-man5>`, the mode is automatically selected when
>          a zoned device is detected
>
> -
> -RUNTIME FEATURES
> -----------------
> -
> -Features that are typically enabled on a mounted filesystem, e.g. by a mount
> -option or by an ioctl. Some of them can be enabled early, at mkfs time.  This
> -applies to features that need to be enabled once and then the status is
> -permanent, this does not replace mount options.
> -
>  quota
>          (kernel support since 3.4)
>
> diff --git a/common/fsfeatures.c b/common/fsfeatures.c
> index 169e47e92582..4aca96f6e4fe 100644
> --- a/common/fsfeatures.c
> +++ b/common/fsfeatures.c
> @@ -99,7 +99,6 @@ static const struct btrfs_feature mkfs_features[] = {
>                 VERSION_NULL(default),
>                 .desc           = "mixed data and metadata block groups"
>         },
> -#if EXPERIMENTAL
>         {
>                 .name           = "quota",
>                 .runtime_flag   = BTRFS_FEATURE_RUNTIME_QUOTA,
> @@ -109,7 +108,6 @@ static const struct btrfs_feature mkfs_features[] = {
>                 VERSION_NULL(default),
>                 .desc           = "quota support (qgroups)"
>         },
> -#endif
>         {
>                 .name           = "extref",
>                 .incompat_flag  = BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF,
> @@ -143,7 +141,6 @@ static const struct btrfs_feature mkfs_features[] = {
>                 VERSION_TO_STRING2(default, 5,15),
>                 .desc           = "no explicit hole extents for files"
>         },
> -#if EXPERIMENTAL
>         {
>                 .name           = "free-space-tree",
>                 .compat_ro_flag = BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE |
> @@ -154,7 +151,6 @@ static const struct btrfs_feature mkfs_features[] = {
>                 VERSION_TO_STRING2(default, 5,15),
>                 .desc           = "free space tree (space_cache=v2)"
>         },
> -#endif
>         {
>                 .name           = "raid1c34",
>                 .incompat_flag  = BTRFS_FEATURE_INCOMPAT_RAID1C34,
> @@ -185,8 +181,6 @@ static const struct btrfs_feature mkfs_features[] = {
>                 VERSION_NULL(default),
>                 .desc           = "block group tree to reduce mount time"
>         },
> -#endif
> -#if EXPERIMENTAL
>         {
>                 .name           = "extent-tree-v2",
>                 .incompat_flag  = BTRFS_FEATURE_INCOMPAT_EXTENT_TREE_V2,

Shouldn't the removal of the EXPERIMENTAL tags be a separate commit?
It seems unrelated and the commit message doesn't say anything about
this.

> diff --git a/mkfs/main.c b/mkfs/main.c
> index f5e34cbda612..78cc2b598b25 100644
> --- a/mkfs/main.c
> +++ b/mkfs/main.c
> @@ -424,7 +424,6 @@ static const char * const mkfs_usage[] = {
>         OPTLINE("-n|--nodesize SIZE", "size of btree nodes"),
>         OPTLINE("-s|--sectorsize SIZE", "data block size (may not be mountable by current kernel)"),
>         OPTLINE("-O|--features LIST", "comma separated list of filesystem features (use '-O list-all' to list features)"),
> -       OPTLINE("-R|--runtime-features LIST", "comma separated list of runtime features (use '-R list-all' to list runtime features)"),
>         OPTLINE("-L|--label LABEL", "set the filesystem label"),
>         OPTLINE("-U|--uuid UUID", "specify the filesystem UUID (must be unique)"),
>         "Creation:",
> @@ -440,6 +439,7 @@ static const char * const mkfs_usage[] = {
>         OPTLINE("--help", "print this help and exit"),
>         "Deprecated:",
>         OPTLINE("-l|--leafsize SIZE", "removed in 6.0, use --nodesize"),
> +       OPTLINE("-R|--runtime-features LIST", "removed in 6.4, use -O|--features"),
>         NULL
>  };
>
> @@ -1140,6 +1140,7 @@ int BOX_MAIN(mkfs)(int argc, char **argv)
>                                 char *orig = strdup(optarg);
>                                 char *tmp = orig;
>
> +                               warning("runtime features are deprecated, use -O|--features instead.");
>                                 tmp = btrfs_parse_runtime_features(tmp,
>                                                 &features);
>                                 if (tmp) {
> --
> 2.39.2
>
Qu Wenruo April 12, 2023, 2:15 a.m. UTC | #2
On 2023/4/12 09:51, Neal Gompa wrote:
> On Mon, Apr 10, 2023 at 10:42 PM Qu Wenruo <wqu@suse.com> wrote:
>>
>> The option -R|--runtime-features is introduced to support features that
>> doesn't result a full incompat flag change, thus things like
>> free-space-tree and quota features are put here.
>>
>> But to end users, such separation of features is not helpful and can be
>> sometimes confusing.
>>
>> Thus we're already migrating those runtime features into -O|--features
>> option under experimental builds.
>>
>> I believe this is the proper time to move those runtime features into
>> -O|--features option, and mark the -R|--runtime-features option
>> deprecated.
>>
>> For now we still keep the old option as for compatibility purposes.
>>
>> Signed-off-by: Qu Wenruo <wqu@suse.com>
>> ---
>>   Documentation/mkfs.btrfs.rst | 25 ++++---------------------
>>   common/fsfeatures.c          |  6 ------
>>   mkfs/main.c                  |  3 ++-
>>   3 files changed, 6 insertions(+), 28 deletions(-)
>>
>> diff --git a/Documentation/mkfs.btrfs.rst b/Documentation/mkfs.btrfs.rst
>> index ba7227b31f72..e80f4c5c83ee 100644
>> --- a/Documentation/mkfs.btrfs.rst
>> +++ b/Documentation/mkfs.btrfs.rst
>> @@ -161,18 +161,6 @@ OPTIONS
>>
>>                   $ mkfs.btrfs -O list-all
>>
>> --R|--runtime-features <feature1>[,<feature2>...]
>> -        A list of features that be can enabled at mkfs time, otherwise would have
>> -        to be turned on on a mounted filesystem.
>> -        To disable a feature, prefix it with *^*.
>> -
>> -        See section *RUNTIME FEATURES* for more details.  To see all available
>> -        runtime features that **mkfs.btrfs** supports run:
>> -
>> -        .. code-block:: bash
>> -
>> -                $ mkfs.btrfs -R list-all
>> -
>>   -f|--force
>>           Forcibly overwrite the block devices when an existing filesystem is detected.
>>           By default, **mkfs.btrfs** will utilize *libblkid* to check for any known
>> @@ -199,6 +187,10 @@ OPTIONS
>>   -l|--leafsize <size>
>>           Removed in 6.0, used to be alias for *--nodesize*.
>>
>> +-R|--runtime-features <feature1>[,<feature2>...]
>> +        Removed in 6.4, used to specify features not affecting on-disk format.
>> +        Now all such features are merged into `-O|--features` option.
>> +
>>   SIZE UNITS
>>   ----------
>>
>> @@ -279,15 +271,6 @@ zoned
>>           see *ZONED MODE* in :doc:`btrfs(5)<btrfs-man5>`, the mode is automatically selected when
>>           a zoned device is detected
>>
>> -
>> -RUNTIME FEATURES
>> -----------------
>> -
>> -Features that are typically enabled on a mounted filesystem, e.g. by a mount
>> -option or by an ioctl. Some of them can be enabled early, at mkfs time.  This
>> -applies to features that need to be enabled once and then the status is
>> -permanent, this does not replace mount options.
>> -
>>   quota
>>           (kernel support since 3.4)
>>
>> diff --git a/common/fsfeatures.c b/common/fsfeatures.c
>> index 169e47e92582..4aca96f6e4fe 100644
>> --- a/common/fsfeatures.c
>> +++ b/common/fsfeatures.c
>> @@ -99,7 +99,6 @@ static const struct btrfs_feature mkfs_features[] = {
>>                  VERSION_NULL(default),
>>                  .desc           = "mixed data and metadata block groups"
>>          },
>> -#if EXPERIMENTAL
>>          {
>>                  .name           = "quota",
>>                  .runtime_flag   = BTRFS_FEATURE_RUNTIME_QUOTA,
>> @@ -109,7 +108,6 @@ static const struct btrfs_feature mkfs_features[] = {
>>                  VERSION_NULL(default),
>>                  .desc           = "quota support (qgroups)"
>>          },
>> -#endif
>>          {
>>                  .name           = "extref",
>>                  .incompat_flag  = BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF,
>> @@ -143,7 +141,6 @@ static const struct btrfs_feature mkfs_features[] = {
>>                  VERSION_TO_STRING2(default, 5,15),
>>                  .desc           = "no explicit hole extents for files"
>>          },
>> -#if EXPERIMENTAL
>>          {
>>                  .name           = "free-space-tree",
>>                  .compat_ro_flag = BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE |
>> @@ -154,7 +151,6 @@ static const struct btrfs_feature mkfs_features[] = {
>>                  VERSION_TO_STRING2(default, 5,15),
>>                  .desc           = "free space tree (space_cache=v2)"
>>          },
>> -#endif
>>          {
>>                  .name           = "raid1c34",
>>                  .incompat_flag  = BTRFS_FEATURE_INCOMPAT_RAID1C34,
>> @@ -185,8 +181,6 @@ static const struct btrfs_feature mkfs_features[] = {
>>                  VERSION_NULL(default),
>>                  .desc           = "block group tree to reduce mount time"
>>          },
>> -#endif
>> -#if EXPERIMENTAL
>>          {
>>                  .name           = "extent-tree-v2",
>>                  .incompat_flag  = BTRFS_FEATURE_INCOMPAT_EXTENT_TREE_V2,
> 
> Shouldn't the removal of the EXPERIMENTAL tags be a separate commit?
> It seems unrelated and the commit message doesn't say anything about
> this.

Nope, this is just how the diff tool determine where the changes are.

The end result of that patch still keeps the extent-tree-v2 feature 
under experimental, it's covered by the same EXPERIMENTAL ifdef of 
block-group-tree.

Thus sometimes it's better to use difftool to review patches, as we can 
hit cases like this from time to time.

Thanks,
Qu
> 
>> diff --git a/mkfs/main.c b/mkfs/main.c
>> index f5e34cbda612..78cc2b598b25 100644
>> --- a/mkfs/main.c
>> +++ b/mkfs/main.c
>> @@ -424,7 +424,6 @@ static const char * const mkfs_usage[] = {
>>          OPTLINE("-n|--nodesize SIZE", "size of btree nodes"),
>>          OPTLINE("-s|--sectorsize SIZE", "data block size (may not be mountable by current kernel)"),
>>          OPTLINE("-O|--features LIST", "comma separated list of filesystem features (use '-O list-all' to list features)"),
>> -       OPTLINE("-R|--runtime-features LIST", "comma separated list of runtime features (use '-R list-all' to list runtime features)"),
>>          OPTLINE("-L|--label LABEL", "set the filesystem label"),
>>          OPTLINE("-U|--uuid UUID", "specify the filesystem UUID (must be unique)"),
>>          "Creation:",
>> @@ -440,6 +439,7 @@ static const char * const mkfs_usage[] = {
>>          OPTLINE("--help", "print this help and exit"),
>>          "Deprecated:",
>>          OPTLINE("-l|--leafsize SIZE", "removed in 6.0, use --nodesize"),
>> +       OPTLINE("-R|--runtime-features LIST", "removed in 6.4, use -O|--features"),
>>          NULL
>>   };
>>
>> @@ -1140,6 +1140,7 @@ int BOX_MAIN(mkfs)(int argc, char **argv)
>>                                  char *orig = strdup(optarg);
>>                                  char *tmp = orig;
>>
>> +                               warning("runtime features are deprecated, use -O|--features instead.");
>>                                  tmp = btrfs_parse_runtime_features(tmp,
>>                                                  &features);
>>                                  if (tmp) {
>> --
>> 2.39.2
>>
> 
>
Anand Jain April 13, 2023, 12:04 p.m. UTC | #3
On 4/11/23 08:01, Qu Wenruo wrote:
> The option -R|--runtime-features is introduced to support features that
> doesn't result a full incompat flag change, thus things like
> free-space-tree and quota features are put here.
> 
> But to end users, such separation of features is not helpful and can be

> sometimes confusing.

Indeed.

More below.


> 
> Thus we're already migrating those runtime features into -O|--features
> option under experimental builds.
> 
> I believe this is the proper time to move those runtime features into
> -O|--features option, and mark the -R|--runtime-features option
> deprecated.
> 
> For now we still keep the old option as for compatibility purposes.
> 
> Signed-off-by: Qu Wenruo <wqu@suse.com>
> ---
>   Documentation/mkfs.btrfs.rst | 25 ++++---------------------
>   common/fsfeatures.c          |  6 ------
>   mkfs/main.c                  |  3 ++-
>   3 files changed, 6 insertions(+), 28 deletions(-)
> 
> diff --git a/Documentation/mkfs.btrfs.rst b/Documentation/mkfs.btrfs.rst
> index ba7227b31f72..e80f4c5c83ee 100644
> --- a/Documentation/mkfs.btrfs.rst
> +++ b/Documentation/mkfs.btrfs.rst
> @@ -161,18 +161,6 @@ OPTIONS
>   
>                   $ mkfs.btrfs -O list-all
>   
> --R|--runtime-features <feature1>[,<feature2>...]
> -        A list of features that be can enabled at mkfs time,


> otherwise would have
> -        to be turned on on a mounted filesystem.

  --R option is useful, why not consider rename?

Such as:
  --mount-with

Thanks, Anand


> -        To disable a feature, prefix it with *^*.
> -
> -        See section *RUNTIME FEATURES* for more details.  To see all available
> -        runtime features that **mkfs.btrfs** supports run:
> -
> -        .. code-block:: bash
> -
> -                $ mkfs.btrfs -R list-all
> -
>   -f|--force
>           Forcibly overwrite the block devices when an existing filesystem is detected.
>           By default, **mkfs.btrfs** will utilize *libblkid* to check for any known
> @@ -199,6 +187,10 @@ OPTIONS
>   -l|--leafsize <size>
>           Removed in 6.0, used to be alias for *--nodesize*.
>   
> +-R|--runtime-features <feature1>[,<feature2>...]
> +        Removed in 6.4, used to specify features not affecting on-disk format.
> +        Now all such features are merged into `-O|--features` option.
> +
>   SIZE UNITS
>   ----------
>   
> @@ -279,15 +271,6 @@ zoned
>           see *ZONED MODE* in :doc:`btrfs(5)<btrfs-man5>`, the mode is automatically selected when
>           a zoned device is detected
>   
> -
> -RUNTIME FEATURES
> -----------------
> -
> -Features that are typically enabled on a mounted filesystem, e.g. by a mount
> -option or by an ioctl. Some of them can be enabled early, at mkfs time.  This
> -applies to features that need to be enabled once and then the status is
> -permanent, this does not replace mount options.
> -
>   quota
>           (kernel support since 3.4)
>   
> diff --git a/common/fsfeatures.c b/common/fsfeatures.c
> index 169e47e92582..4aca96f6e4fe 100644
> --- a/common/fsfeatures.c
> +++ b/common/fsfeatures.c
> @@ -99,7 +99,6 @@ static const struct btrfs_feature mkfs_features[] = {
>   		VERSION_NULL(default),
>   		.desc		= "mixed data and metadata block groups"
>   	},
> -#if EXPERIMENTAL
>   	{
>   		.name		= "quota",
>   		.runtime_flag	= BTRFS_FEATURE_RUNTIME_QUOTA,
> @@ -109,7 +108,6 @@ static const struct btrfs_feature mkfs_features[] = {
>   		VERSION_NULL(default),
>   		.desc		= "quota support (qgroups)"
>   	},
> -#endif
>   	{
>   		.name		= "extref",
>   		.incompat_flag	= BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF,
> @@ -143,7 +141,6 @@ static const struct btrfs_feature mkfs_features[] = {
>   		VERSION_TO_STRING2(default, 5,15),
>   		.desc		= "no explicit hole extents for files"
>   	},
> -#if EXPERIMENTAL
>   	{
>   		.name		= "free-space-tree",
>   		.compat_ro_flag	= BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE |
> @@ -154,7 +151,6 @@ static const struct btrfs_feature mkfs_features[] = {
>   		VERSION_TO_STRING2(default, 5,15),
>   		.desc		= "free space tree (space_cache=v2)"
>   	},
> -#endif
>   	{
>   		.name		= "raid1c34",
>   		.incompat_flag	= BTRFS_FEATURE_INCOMPAT_RAID1C34,
> @@ -185,8 +181,6 @@ static const struct btrfs_feature mkfs_features[] = {
>   		VERSION_NULL(default),
>   		.desc		= "block group tree to reduce mount time"
>   	},
> -#endif
> -#if EXPERIMENTAL
>   	{
>   		.name		= "extent-tree-v2",
>   		.incompat_flag	= BTRFS_FEATURE_INCOMPAT_EXTENT_TREE_V2,
> diff --git a/mkfs/main.c b/mkfs/main.c
> index f5e34cbda612..78cc2b598b25 100644
> --- a/mkfs/main.c
> +++ b/mkfs/main.c
> @@ -424,7 +424,6 @@ static const char * const mkfs_usage[] = {
>   	OPTLINE("-n|--nodesize SIZE", "size of btree nodes"),
>   	OPTLINE("-s|--sectorsize SIZE", "data block size (may not be mountable by current kernel)"),
>   	OPTLINE("-O|--features LIST", "comma separated list of filesystem features (use '-O list-all' to list features)"),
> -	OPTLINE("-R|--runtime-features LIST", "comma separated list of runtime features (use '-R list-all' to list runtime features)"),
>   	OPTLINE("-L|--label LABEL", "set the filesystem label"),
>   	OPTLINE("-U|--uuid UUID", "specify the filesystem UUID (must be unique)"),
>   	"Creation:",
> @@ -440,6 +439,7 @@ static const char * const mkfs_usage[] = {
>   	OPTLINE("--help", "print this help and exit"),
>   	"Deprecated:",
>   	OPTLINE("-l|--leafsize SIZE", "removed in 6.0, use --nodesize"),
> +	OPTLINE("-R|--runtime-features LIST", "removed in 6.4, use -O|--features"),
>   	NULL
>   };
>   
> @@ -1140,6 +1140,7 @@ int BOX_MAIN(mkfs)(int argc, char **argv)
>   				char *orig = strdup(optarg);
>   				char *tmp = orig;
>   
> +				warning("runtime features are deprecated, use -O|--features instead.");
>   				tmp = btrfs_parse_runtime_features(tmp,
>   						&features);
>   				if (tmp) {
David Sterba April 13, 2023, 4:32 p.m. UTC | #4
On Thu, Apr 13, 2023 at 05:34:31PM +0530, Anand Jain wrote:
> On 4/11/23 08:01, Qu Wenruo wrote:
> > deprecated.
> > 
> > For now we still keep the old option as for compatibility purposes.
> > 
> > Signed-off-by: Qu Wenruo <wqu@suse.com>
> > ---
> >   Documentation/mkfs.btrfs.rst | 25 ++++---------------------
> >   common/fsfeatures.c          |  6 ------
> >   mkfs/main.c                  |  3 ++-
> >   3 files changed, 6 insertions(+), 28 deletions(-)
> > 
> > diff --git a/Documentation/mkfs.btrfs.rst b/Documentation/mkfs.btrfs.rst
> > index ba7227b31f72..e80f4c5c83ee 100644
> > --- a/Documentation/mkfs.btrfs.rst
> > +++ b/Documentation/mkfs.btrfs.rst
> > @@ -161,18 +161,6 @@ OPTIONS
> >   
> >                   $ mkfs.btrfs -O list-all
> >   
> > --R|--runtime-features <feature1>[,<feature2>...]
> > -        A list of features that be can enabled at mkfs time,
> 
> 
> > otherwise would have
> > -        to be turned on on a mounted filesystem.
> 
>   --R option is useful, why not consider rename?

For what use case is it useful? The reason it's getting dropped is
because from user perspective it's not that important what kind of
feature is it and it gets enabled from one place. It was my idea to have
two options because other mkfs utilities have that, but with a different
semantics than mkfs-time/mount-time, rather per object type (inode,
journal, ...), and it turned out to be wrong.

> Such as:
>   --mount-with

In the context of mkfs I'd find such option very confusing especially
when there's no mount option like that.
Anand Jain April 14, 2023, 5:07 a.m. UTC | #5
On 14/4/23 00:32, David Sterba wrote:
> On Thu, Apr 13, 2023 at 05:34:31PM +0530, Anand Jain wrote:
>> On 4/11/23 08:01, Qu Wenruo wrote:
>>> deprecated.
>>>
>>> For now we still keep the old option as for compatibility purposes.
>>>
>>> Signed-off-by: Qu Wenruo <wqu@suse.com>
>>> ---
>>>    Documentation/mkfs.btrfs.rst | 25 ++++---------------------
>>>    common/fsfeatures.c          |  6 ------
>>>    mkfs/main.c                  |  3 ++-
>>>    3 files changed, 6 insertions(+), 28 deletions(-)
>>>
>>> diff --git a/Documentation/mkfs.btrfs.rst b/Documentation/mkfs.btrfs.rst
>>> index ba7227b31f72..e80f4c5c83ee 100644
>>> --- a/Documentation/mkfs.btrfs.rst
>>> +++ b/Documentation/mkfs.btrfs.rst
>>> @@ -161,18 +161,6 @@ OPTIONS
>>>    
>>>                    $ mkfs.btrfs -O list-all
>>>    
>>> --R|--runtime-features <feature1>[,<feature2>...]
>>> -        A list of features that be can enabled at mkfs time,
>>
>>
>>> otherwise would have
>>> -        to be turned on on a mounted filesystem.
>>
>>    --R option is useful, why not consider rename?
> 
> For what use case is it useful? The reason it's getting dropped is
> because from user perspective it's not that important what kind of
> feature is it and it gets enabled from one place. It was my idea to have
> two options because other mkfs utilities have that, but with a different
> semantics than mkfs-time/mount-time, rather per object type (inode,
> journal, ...), and it turned out to be wrong.
> 
>> Such as:
>>    --mount-with
> 
> In the context of mkfs I'd find such option very confusing especially
> when there's no mount option like that.

Okay.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
diff mbox series

Patch

diff --git a/Documentation/mkfs.btrfs.rst b/Documentation/mkfs.btrfs.rst
index ba7227b31f72..e80f4c5c83ee 100644
--- a/Documentation/mkfs.btrfs.rst
+++ b/Documentation/mkfs.btrfs.rst
@@ -161,18 +161,6 @@  OPTIONS
 
                 $ mkfs.btrfs -O list-all
 
--R|--runtime-features <feature1>[,<feature2>...]
-        A list of features that be can enabled at mkfs time, otherwise would have
-        to be turned on on a mounted filesystem.
-        To disable a feature, prefix it with *^*.
-
-        See section *RUNTIME FEATURES* for more details.  To see all available
-        runtime features that **mkfs.btrfs** supports run:
-
-        .. code-block:: bash
-
-                $ mkfs.btrfs -R list-all
-
 -f|--force
         Forcibly overwrite the block devices when an existing filesystem is detected.
         By default, **mkfs.btrfs** will utilize *libblkid* to check for any known
@@ -199,6 +187,10 @@  OPTIONS
 -l|--leafsize <size>
         Removed in 6.0, used to be alias for *--nodesize*.
 
+-R|--runtime-features <feature1>[,<feature2>...]
+        Removed in 6.4, used to specify features not affecting on-disk format.
+        Now all such features are merged into `-O|--features` option.
+
 SIZE UNITS
 ----------
 
@@ -279,15 +271,6 @@  zoned
         see *ZONED MODE* in :doc:`btrfs(5)<btrfs-man5>`, the mode is automatically selected when
         a zoned device is detected
 
-
-RUNTIME FEATURES
-----------------
-
-Features that are typically enabled on a mounted filesystem, e.g. by a mount
-option or by an ioctl. Some of them can be enabled early, at mkfs time.  This
-applies to features that need to be enabled once and then the status is
-permanent, this does not replace mount options.
-
 quota
         (kernel support since 3.4)
 
diff --git a/common/fsfeatures.c b/common/fsfeatures.c
index 169e47e92582..4aca96f6e4fe 100644
--- a/common/fsfeatures.c
+++ b/common/fsfeatures.c
@@ -99,7 +99,6 @@  static const struct btrfs_feature mkfs_features[] = {
 		VERSION_NULL(default),
 		.desc		= "mixed data and metadata block groups"
 	},
-#if EXPERIMENTAL
 	{
 		.name		= "quota",
 		.runtime_flag	= BTRFS_FEATURE_RUNTIME_QUOTA,
@@ -109,7 +108,6 @@  static const struct btrfs_feature mkfs_features[] = {
 		VERSION_NULL(default),
 		.desc		= "quota support (qgroups)"
 	},
-#endif
 	{
 		.name		= "extref",
 		.incompat_flag	= BTRFS_FEATURE_INCOMPAT_EXTENDED_IREF,
@@ -143,7 +141,6 @@  static const struct btrfs_feature mkfs_features[] = {
 		VERSION_TO_STRING2(default, 5,15),
 		.desc		= "no explicit hole extents for files"
 	},
-#if EXPERIMENTAL
 	{
 		.name		= "free-space-tree",
 		.compat_ro_flag	= BTRFS_FEATURE_COMPAT_RO_FREE_SPACE_TREE |
@@ -154,7 +151,6 @@  static const struct btrfs_feature mkfs_features[] = {
 		VERSION_TO_STRING2(default, 5,15),
 		.desc		= "free space tree (space_cache=v2)"
 	},
-#endif
 	{
 		.name		= "raid1c34",
 		.incompat_flag	= BTRFS_FEATURE_INCOMPAT_RAID1C34,
@@ -185,8 +181,6 @@  static const struct btrfs_feature mkfs_features[] = {
 		VERSION_NULL(default),
 		.desc		= "block group tree to reduce mount time"
 	},
-#endif
-#if EXPERIMENTAL
 	{
 		.name		= "extent-tree-v2",
 		.incompat_flag	= BTRFS_FEATURE_INCOMPAT_EXTENT_TREE_V2,
diff --git a/mkfs/main.c b/mkfs/main.c
index f5e34cbda612..78cc2b598b25 100644
--- a/mkfs/main.c
+++ b/mkfs/main.c
@@ -424,7 +424,6 @@  static const char * const mkfs_usage[] = {
 	OPTLINE("-n|--nodesize SIZE", "size of btree nodes"),
 	OPTLINE("-s|--sectorsize SIZE", "data block size (may not be mountable by current kernel)"),
 	OPTLINE("-O|--features LIST", "comma separated list of filesystem features (use '-O list-all' to list features)"),
-	OPTLINE("-R|--runtime-features LIST", "comma separated list of runtime features (use '-R list-all' to list runtime features)"),
 	OPTLINE("-L|--label LABEL", "set the filesystem label"),
 	OPTLINE("-U|--uuid UUID", "specify the filesystem UUID (must be unique)"),
 	"Creation:",
@@ -440,6 +439,7 @@  static const char * const mkfs_usage[] = {
 	OPTLINE("--help", "print this help and exit"),
 	"Deprecated:",
 	OPTLINE("-l|--leafsize SIZE", "removed in 6.0, use --nodesize"),
+	OPTLINE("-R|--runtime-features LIST", "removed in 6.4, use -O|--features"),
 	NULL
 };
 
@@ -1140,6 +1140,7 @@  int BOX_MAIN(mkfs)(int argc, char **argv)
 				char *orig = strdup(optarg);
 				char *tmp = orig;
 
+				warning("runtime features are deprecated, use -O|--features instead.");
 				tmp = btrfs_parse_runtime_features(tmp,
 						&features);
 				if (tmp) {