diff mbox series

[48/36] mkfs: don't use DIFLAG values for fsx_xflags

Message ID 20190326171819.GW1183@magnolia (mailing list archive)
State Accepted, archived
Headers show
Series xfsprogs-5.0: fix various problems | expand

Commit Message

Darrick J. Wong March 26, 2019, 5:18 p.m. UTC
From: Darrick J. Wong <darrick.wong@oracle.com>

mkfs shouldn't be using DIFLAG values where FS_XFLAG values are
required.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 mkfs/xfs_mkfs.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Eric Sandeen April 4, 2019, 4:38 p.m. UTC | #1
On 3/26/19 12:18 PM, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> mkfs shouldn't be using DIFLAG values where FS_XFLAG values are
> required.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

Yay!

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

> ---
>  mkfs/xfs_mkfs.c |   10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
> index e87c692c..19ad1c90 100644
> --- a/mkfs/xfs_mkfs.c
> +++ b/mkfs/xfs_mkfs.c
> @@ -1451,15 +1451,15 @@ data_opts_parser(
>  		break;
>  	case D_RTINHERIT:
>  		if (getnum(value, opts, subopt))
> -			cli->fsx.fsx_xflags |= XFS_DIFLAG_RTINHERIT;
> +			cli->fsx.fsx_xflags |= FS_XFLAG_RTINHERIT;
>  		break;
>  	case D_PROJINHERIT:
>  		cli->fsx.fsx_projid = getnum(value, opts, subopt);
> -		cli->fsx.fsx_xflags |= XFS_DIFLAG_PROJINHERIT;
> +		cli->fsx.fsx_xflags |= FS_XFLAG_PROJINHERIT;
>  		break;
>  	case D_EXTSZINHERIT:
>  		cli->fsx.fsx_extsize = getnum(value, opts, subopt);
> -		cli->fsx.fsx_xflags |= XFS_DIFLAG_EXTSZINHERIT;
> +		cli->fsx.fsx_xflags |= FS_XFLAG_EXTSZINHERIT;
>  		break;
>  	case D_COWEXTSIZE:
>  		cli->fsx.fsx_cowextsize = getnum(value, opts, subopt);
> @@ -2212,9 +2212,9 @@ validate_extsize_hint(
>  	bool			rt;
>  	uint16_t		flags = 0;
>  
> -	rt = (cli->fsx.fsx_xflags & XFS_DIFLAG_RTINHERIT);
> +	rt = (cli->fsx.fsx_xflags & FS_XFLAG_RTINHERIT);
>  
> -	if (cli->fsx.fsx_xflags & XFS_DIFLAG_EXTSZINHERIT)
> +	if (cli->fsx.fsx_xflags & FS_XFLAG_EXTSZINHERIT)
>  		flags |= XFS_DIFLAG_EXTSIZE;
>  
>  	fa = libxfs_inode_validate_extsize(mp, cli->fsx.fsx_extsize, S_IFREG,
>
diff mbox series

Patch

diff --git a/mkfs/xfs_mkfs.c b/mkfs/xfs_mkfs.c
index e87c692c..19ad1c90 100644
--- a/mkfs/xfs_mkfs.c
+++ b/mkfs/xfs_mkfs.c
@@ -1451,15 +1451,15 @@  data_opts_parser(
 		break;
 	case D_RTINHERIT:
 		if (getnum(value, opts, subopt))
-			cli->fsx.fsx_xflags |= XFS_DIFLAG_RTINHERIT;
+			cli->fsx.fsx_xflags |= FS_XFLAG_RTINHERIT;
 		break;
 	case D_PROJINHERIT:
 		cli->fsx.fsx_projid = getnum(value, opts, subopt);
-		cli->fsx.fsx_xflags |= XFS_DIFLAG_PROJINHERIT;
+		cli->fsx.fsx_xflags |= FS_XFLAG_PROJINHERIT;
 		break;
 	case D_EXTSZINHERIT:
 		cli->fsx.fsx_extsize = getnum(value, opts, subopt);
-		cli->fsx.fsx_xflags |= XFS_DIFLAG_EXTSZINHERIT;
+		cli->fsx.fsx_xflags |= FS_XFLAG_EXTSZINHERIT;
 		break;
 	case D_COWEXTSIZE:
 		cli->fsx.fsx_cowextsize = getnum(value, opts, subopt);
@@ -2212,9 +2212,9 @@  validate_extsize_hint(
 	bool			rt;
 	uint16_t		flags = 0;
 
-	rt = (cli->fsx.fsx_xflags & XFS_DIFLAG_RTINHERIT);
+	rt = (cli->fsx.fsx_xflags & FS_XFLAG_RTINHERIT);
 
-	if (cli->fsx.fsx_xflags & XFS_DIFLAG_EXTSZINHERIT)
+	if (cli->fsx.fsx_xflags & FS_XFLAG_EXTSZINHERIT)
 		flags |= XFS_DIFLAG_EXTSIZE;
 
 	fa = libxfs_inode_validate_extsize(mp, cli->fsx.fsx_extsize, S_IFREG,