From: Darrick J. Wong <darrick.wong@xxxxxxxxxx> If a v5 fs geometry query fails, try the v4 interface before falling back to the v1 interface. Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> --- libfrog/fsgeom.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libfrog/fsgeom.c b/libfrog/fsgeom.c index a3b748f8..06e4e663 100644 --- a/libfrog/fsgeom.c +++ b/libfrog/fsgeom.c @@ -84,6 +84,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); }