]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: report fs and rt health via geometry structure
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 24 Jul 2019 19:54:06 +0000 (15:54 -0400)
committerEric Sandeen <sandeen@redhat.com>
Wed, 24 Jul 2019 19:54:06 +0000 (15:54 -0400)
Source kernel commit: c23232d409355091502a362e99ed06f800765961

Use our newly expanded geometry structure to report the overall fs and
realtime health status.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_fs.h
libxfs/xfs_health.h

index f944ced77c760183b2c955c8c5b9443a7a0e534b..1794fe137c1fdef4fbbefc79e612871772a9976e 100644 (file)
@@ -220,9 +220,18 @@ struct xfs_fsop_geom {
        __u32           rtsectsize;     /* realtime sector size, bytes  */
        __u32           dirblocksize;   /* directory block size, bytes  */
        __u32           logsunit;       /* log stripe unit, bytes       */
-       __u64           reserved[18];   /* reserved space               */
+       uint32_t        sick;           /* o: unhealthy fs & rt metadata */
+       uint32_t        checked;        /* o: checked fs & rt metadata  */
+       __u64           reserved[17];   /* reserved space               */
 };
 
+#define XFS_FSOP_GEOM_SICK_COUNTERS    (1 << 0)  /* summary counters */
+#define XFS_FSOP_GEOM_SICK_UQUOTA      (1 << 1)  /* user quota */
+#define XFS_FSOP_GEOM_SICK_GQUOTA      (1 << 2)  /* group quota */
+#define XFS_FSOP_GEOM_SICK_PQUOTA      (1 << 3)  /* project quota */
+#define XFS_FSOP_GEOM_SICK_RT_BITMAP   (1 << 4)  /* realtime bitmap */
+#define XFS_FSOP_GEOM_SICK_RT_SUMMARY  (1 << 5)  /* realtime summary */
+
 /* Output for XFS_FS_COUNTS */
 typedef struct xfs_fsop_counts {
        __u64   freedata;       /* free data section blocks */
index 0915d20975bee2ad2025eb4b0cabad822589582f..3fffdcc8097030de966dbd31e92cbd12d4afa41e 100644 (file)
@@ -34,6 +34,7 @@
 struct xfs_mount;
 struct xfs_perag;
 struct xfs_inode;
+struct xfs_fsop_geom;
 
 /* Observable health issues for metadata spanning the entire filesystem. */
 #define XFS_SICK_FS_COUNTERS   (1 << 0)  /* summary counters */
@@ -182,4 +183,6 @@ xfs_inode_is_healthy(struct xfs_inode *ip)
        return !xfs_inode_has_sickness(ip, -1U);
 }
 
+void xfs_fsop_geom_health(struct xfs_mount *mp, struct xfs_fsop_geom *geo);
+
 #endif /* __XFS_HEALTH_H__ */