diff mbox

xfsprogs/db: version command misses RMAPBT feature string

Message ID 20170918071335.19365-1-zlang@redhat.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Zorro Lang Sept. 18, 2017, 7:13 a.m. UTC
When I create a XFS with "rmapbt=1,reflink=1", "xfs_db -c version"
didn't show RMAPBT feature. But REFLINK can be found.

  # mkfs/mkfs.xfs -f -m rmapbt=1,reflink=1 /dev/sda3
  # db/xfs_db -c version /dev/sda3
  versionnum [0xb4a5+0x18a] = V5,NLINK,DIRV2,ALIGN,LOGV2,EXTFLG,MOREBITS,ATTR2,LAZYSBCOUNT,PROJID32BIT,CRC,FTYPE,FINOBT,REFLINK

Signed-off-by: Zorro Lang <zlang@redhat.com>
---
 db/sb.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Brian Foster Sept. 18, 2017, 12:44 p.m. UTC | #1
On Mon, Sep 18, 2017 at 03:13:35PM +0800, Zorro Lang wrote:
> When I create a XFS with "rmapbt=1,reflink=1", "xfs_db -c version"
> didn't show RMAPBT feature. But REFLINK can be found.
> 
>   # mkfs/mkfs.xfs -f -m rmapbt=1,reflink=1 /dev/sda3
>   # db/xfs_db -c version /dev/sda3
>   versionnum [0xb4a5+0x18a] = V5,NLINK,DIRV2,ALIGN,LOGV2,EXTFLG,MOREBITS,ATTR2,LAZYSBCOUNT,PROJID32BIT,CRC,FTYPE,FINOBT,REFLINK
> 
> Signed-off-by: Zorro Lang <zlang@redhat.com>
> ---

Reviewed-by: Brian Foster <bfoster@redhat.com>

>  db/sb.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/db/sb.c b/db/sb.c
> index 8e7722cd..01d94a66 100644
> --- a/db/sb.c
> +++ b/db/sb.c
> @@ -694,6 +694,8 @@ version_string(
>  		strcat(s, ",SPARSE_INODES");
>  	if (xfs_sb_version_hasmetauuid(sbp))
>  		strcat(s, ",META_UUID");
> +	if (xfs_sb_version_hasrmapbt(sbp))
> +		strcat(s, ",RMAPBT");
>  	if (xfs_sb_version_hasreflink(sbp))
>  		strcat(s, ",REFLINK");
>  	return s;
> -- 
> 2.13.5
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Darrick J. Wong Sept. 18, 2017, 3:38 p.m. UTC | #2
On Mon, Sep 18, 2017 at 03:13:35PM +0800, Zorro Lang wrote:
> When I create a XFS with "rmapbt=1,reflink=1", "xfs_db -c version"
> didn't show RMAPBT feature. But REFLINK can be found.
> 
>   # mkfs/mkfs.xfs -f -m rmapbt=1,reflink=1 /dev/sda3
>   # db/xfs_db -c version /dev/sda3
>   versionnum [0xb4a5+0x18a] = V5,NLINK,DIRV2,ALIGN,LOGV2,EXTFLG,MOREBITS,ATTR2,LAZYSBCOUNT,PROJID32BIT,CRC,FTYPE,FINOBT,REFLINK
> 
> Signed-off-by: Zorro Lang <zlang@redhat.com>

Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

> ---
>  db/sb.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/db/sb.c b/db/sb.c
> index 8e7722cd..01d94a66 100644
> --- a/db/sb.c
> +++ b/db/sb.c
> @@ -694,6 +694,8 @@ version_string(
>  		strcat(s, ",SPARSE_INODES");
>  	if (xfs_sb_version_hasmetauuid(sbp))
>  		strcat(s, ",META_UUID");
> +	if (xfs_sb_version_hasrmapbt(sbp))
> +		strcat(s, ",RMAPBT");
>  	if (xfs_sb_version_hasreflink(sbp))
>  		strcat(s, ",REFLINK");
>  	return s;
> -- 
> 2.13.5
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/db/sb.c b/db/sb.c
index 8e7722cd..01d94a66 100644
--- a/db/sb.c
+++ b/db/sb.c
@@ -694,6 +694,8 @@  version_string(
 		strcat(s, ",SPARSE_INODES");
 	if (xfs_sb_version_hasmetauuid(sbp))
 		strcat(s, ",META_UUID");
+	if (xfs_sb_version_hasrmapbt(sbp))
+		strcat(s, ",RMAPBT");
 	if (xfs_sb_version_hasreflink(sbp))
 		strcat(s, ",REFLINK");
 	return s;