[04/12] man: document the new v5 fs geometry ioctl structures
diff mbox series

Message ID 156633309613.1215978.13281783388020912868.stgit@magnolia
State Superseded
Headers show
Series
  • xfsprogs-5.3: various fixes
Related show

Commit Message

Darrick J. Wong Aug. 20, 2019, 8:31 p.m. UTC
From: Darrick J. Wong <darrick.wong@oracle.com>

Amend the fs geometry ioctl documentation to cover the new v5 structure.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 libfrog/fsgeom.c                   |    4 ++++
 man/man2/ioctl_xfs_fsop_geometry.2 |    8 ++++++++
 2 files changed, 12 insertions(+)

Comments

Dave Chinner Aug. 30, 2019, 5:44 a.m. UTC | #1
On Tue, Aug 20, 2019 at 01:31:36PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> Amend the fs geometry ioctl documentation to cover the new v5 structure.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
>  libfrog/fsgeom.c                   |    4 ++++
>  man/man2/ioctl_xfs_fsop_geometry.2 |    8 ++++++++
>  2 files changed, 12 insertions(+)
> 
> 
> diff --git a/libfrog/fsgeom.c b/libfrog/fsgeom.c
> index 06e4e663..159738c5 100644
> --- a/libfrog/fsgeom.c
> +++ b/libfrog/fsgeom.c
> @@ -88,6 +88,10 @@ xfrog_geometry(
>  	if (!ret)
>  		return 0;
>  
> +	ret = ioctl(fd, XFS_IOC_FSGEOMETRY_V4, fsgeo);
> +	if (!ret)
> +		return 0;
> +
>  	return ioctl(fd, XFS_IOC_FSGEOMETRY_V1, fsgeo);
>  }

This hunk is in the previous patch.

>  
> diff --git a/man/man2/ioctl_xfs_fsop_geometry.2 b/man/man2/ioctl_xfs_fsop_geometry.2
> index 68e3387d..365bda8b 100644
> --- a/man/man2/ioctl_xfs_fsop_geometry.2
> +++ b/man/man2/ioctl_xfs_fsop_geometry.2
> @@ -12,6 +12,8 @@ ioctl_xfs_fsop_geometry \- report XFS filesystem layout and features
>  .PP
>  .BI "int ioctl(int " fd ", XFS_IOC_FSOP_GEOMETRY, struct xfs_fsop_geom*" arg );
>  .br
> +.BI "int ioctl(int " fd ", XFS_IOC_FSOP_GEOMETRY_V4, struct xfs_fsop_geom_v4 *" arg );
> +.br
>  .BI "int ioctl(int " fd ", XFS_IOC_FSOP_GEOMETRY_V1, struct xfs_fsop_geom_v1 *" arg );
>  .SH DESCRIPTION
>  Report the details of an XFS filesystem layout, features, and other descriptive items.
> @@ -43,6 +45,9 @@ struct xfs_fsop_geom {
>  	/* struct xfs_fsop_geom_v1 stops here. */
>  
>  	__u32         logsunit;
> +	/* struct xfs_fsop_geom_v4 stops here. */
> +
> +	__u64         reserved[18];
>  };
>  .fi
>  .in

And this looks like a stray, too.

The man page changes look fine, though :P

Cheers,

Dave.
Darrick J. Wong Aug. 30, 2019, 8:40 p.m. UTC | #2
On Fri, Aug 30, 2019 at 03:44:59PM +1000, Dave Chinner wrote:
> On Tue, Aug 20, 2019 at 01:31:36PM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@oracle.com>
> > 
> > Amend the fs geometry ioctl documentation to cover the new v5 structure.
> > 
> > Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> > ---
> >  libfrog/fsgeom.c                   |    4 ++++
> >  man/man2/ioctl_xfs_fsop_geometry.2 |    8 ++++++++
> >  2 files changed, 12 insertions(+)
> > 
> > 
> > diff --git a/libfrog/fsgeom.c b/libfrog/fsgeom.c
> > index 06e4e663..159738c5 100644
> > --- a/libfrog/fsgeom.c
> > +++ b/libfrog/fsgeom.c
> > @@ -88,6 +88,10 @@ xfrog_geometry(
> >  	if (!ret)
> >  		return 0;
> >  
> > +	ret = ioctl(fd, XFS_IOC_FSGEOMETRY_V4, fsgeo);
> > +	if (!ret)
> > +		return 0;
> > +
> >  	return ioctl(fd, XFS_IOC_FSGEOMETRY_V1, fsgeo);
> >  }
> 
> This hunk is in the previous patch.

Dunno where that came from, and it's not reflected in my git repo at
this point ... ?   Weird.

> >  
> > diff --git a/man/man2/ioctl_xfs_fsop_geometry.2 b/man/man2/ioctl_xfs_fsop_geometry.2
> > index 68e3387d..365bda8b 100644
> > --- a/man/man2/ioctl_xfs_fsop_geometry.2
> > +++ b/man/man2/ioctl_xfs_fsop_geometry.2
> > @@ -12,6 +12,8 @@ ioctl_xfs_fsop_geometry \- report XFS filesystem layout and features
> >  .PP
> >  .BI "int ioctl(int " fd ", XFS_IOC_FSOP_GEOMETRY, struct xfs_fsop_geom*" arg );
> >  .br
> > +.BI "int ioctl(int " fd ", XFS_IOC_FSOP_GEOMETRY_V4, struct xfs_fsop_geom_v4 *" arg );
> > +.br
> >  .BI "int ioctl(int " fd ", XFS_IOC_FSOP_GEOMETRY_V1, struct xfs_fsop_geom_v1 *" arg );
> >  .SH DESCRIPTION
> >  Report the details of an XFS filesystem layout, features, and other descriptive items.
> > @@ -43,6 +45,9 @@ struct xfs_fsop_geom {
> >  	/* struct xfs_fsop_geom_v1 stops here. */
> >  
> >  	__u32         logsunit;
> > +	/* struct xfs_fsop_geom_v4 stops here. */
> > +
> > +	__u64         reserved[18];
> >  };
> >  .fi
> >  .in
> 
> And this looks like a stray, too.

That's not a stray, that's part of the manpage update to reflect the
extra space at the end of the structure.

--D

> The man page changes look fine, though :P
> 
> Cheers,
> 
> Dave.
> -- 
> Dave Chinner
> david@fromorbit.com

Patch
diff mbox series

diff --git a/libfrog/fsgeom.c b/libfrog/fsgeom.c
index 06e4e663..159738c5 100644
--- a/libfrog/fsgeom.c
+++ b/libfrog/fsgeom.c
@@ -88,6 +88,10 @@  xfrog_geometry(
 	if (!ret)
 		return 0;
 
+	ret = ioctl(fd, XFS_IOC_FSGEOMETRY_V4, fsgeo);
+	if (!ret)
+		return 0;
+
 	return ioctl(fd, XFS_IOC_FSGEOMETRY_V1, fsgeo);
 }
 
diff --git a/man/man2/ioctl_xfs_fsop_geometry.2 b/man/man2/ioctl_xfs_fsop_geometry.2
index 68e3387d..365bda8b 100644
--- a/man/man2/ioctl_xfs_fsop_geometry.2
+++ b/man/man2/ioctl_xfs_fsop_geometry.2
@@ -12,6 +12,8 @@  ioctl_xfs_fsop_geometry \- report XFS filesystem layout and features
 .PP
 .BI "int ioctl(int " fd ", XFS_IOC_FSOP_GEOMETRY, struct xfs_fsop_geom*" arg );
 .br
+.BI "int ioctl(int " fd ", XFS_IOC_FSOP_GEOMETRY_V4, struct xfs_fsop_geom_v4 *" arg );
+.br
 .BI "int ioctl(int " fd ", XFS_IOC_FSOP_GEOMETRY_V1, struct xfs_fsop_geom_v1 *" arg );
 .SH DESCRIPTION
 Report the details of an XFS filesystem layout, features, and other descriptive items.
@@ -43,6 +45,9 @@  struct xfs_fsop_geom {
 	/* struct xfs_fsop_geom_v1 stops here. */
 
 	__u32         logsunit;
+	/* struct xfs_fsop_geom_v4 stops here. */
+
+	__u64         reserved[18];
 };
 .fi
 .in
@@ -124,6 +129,9 @@  underlying log device, in filesystem blocks.
 This field is meaningful only if the flag
 .B  XFS_FSOP_GEOM_FLAGS_LOGV2
 is set.
+.PP
+.I reserved
+is set to zero.
 .SH FILESYSTEM FEATURE FLAGS
 Filesystem features are reported to userspace as a combination the following
 flags: