mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Add zpool status -s (slow I/Os) and -p (parseable)
This patch adds a new slow I/Os (-s) column to zpool status to show the number of VDEV slow I/Os. This is the number of I/Os that didn't complete in zio_slow_io_ms milliseconds. It also adds a new parsable (-p) flag to display exact values. NAME STATE READ WRITE CKSUM SLOW testpool ONLINE 0 0 0 - mirror-0 ONLINE 0 0 0 - loop0 ONLINE 0 0 0 20 loop1 ONLINE 0 0 0 0 Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Signed-off-by: Tony Hutter <hutter2@llnl.gov> Closes #7756 Closes #6885
This commit is contained in:
committed by
Brian Behlendorf
parent
877d925a9e
commit
ad796b8a3b
@@ -74,6 +74,7 @@ extern "C" {
|
||||
#define FM_EREPORT_PAYLOAD_ZFS_VDEV_READ_ERRORS "vdev_read_errors"
|
||||
#define FM_EREPORT_PAYLOAD_ZFS_VDEV_WRITE_ERRORS "vdev_write_errors"
|
||||
#define FM_EREPORT_PAYLOAD_ZFS_VDEV_CKSUM_ERRORS "vdev_cksum_errors"
|
||||
#define FM_EREPORT_PAYLOAD_ZFS_VDEV_DELAYS "vdev_delays"
|
||||
#define FM_EREPORT_PAYLOAD_ZFS_PARENT_GUID "parent_guid"
|
||||
#define FM_EREPORT_PAYLOAD_ZFS_PARENT_TYPE "parent_type"
|
||||
#define FM_EREPORT_PAYLOAD_ZFS_PARENT_PATH "parent_path"
|
||||
|
||||
@@ -665,6 +665,9 @@ typedef struct zpool_load_policy {
|
||||
#define ZPOOL_CONFIG_VDEV_ASYNC_AGG_W_HISTO "vdev_async_agg_w_histo"
|
||||
#define ZPOOL_CONFIG_VDEV_AGG_SCRUB_HISTO "vdev_agg_scrub_histo"
|
||||
|
||||
/* Number of slow IOs */
|
||||
#define ZPOOL_CONFIG_VDEV_SLOW_IOS "vdev_slow_ios"
|
||||
|
||||
/* vdev enclosure sysfs path */
|
||||
#define ZPOOL_CONFIG_VDEV_ENC_SYSFS_PATH "vdev_enc_sysfs_path"
|
||||
|
||||
@@ -990,6 +993,7 @@ typedef struct vdev_stat {
|
||||
uint64_t vs_fragmentation; /* device fragmentation */
|
||||
uint64_t vs_checkpoint_space; /* checkpoint-consumed space */
|
||||
uint64_t vs_resilver_deferred; /* resilver deferred */
|
||||
uint64_t vs_slow_ios; /* slow IOs */
|
||||
} vdev_stat_t;
|
||||
|
||||
/*
|
||||
|
||||
+3
-1
@@ -1076,9 +1076,11 @@ extern const char *spa_state_to_name(spa_t *spa);
|
||||
/* error handling */
|
||||
struct zbookmark_phys;
|
||||
extern void spa_log_error(spa_t *spa, const zbookmark_phys_t *zb);
|
||||
extern void zfs_ereport_post(const char *class, spa_t *spa, vdev_t *vd,
|
||||
extern int zfs_ereport_post(const char *class, spa_t *spa, vdev_t *vd,
|
||||
const zbookmark_phys_t *zb, zio_t *zio, uint64_t stateoroffset,
|
||||
uint64_t length);
|
||||
extern boolean_t zfs_ereport_is_valid(const char *class, spa_t *spa, vdev_t *vd,
|
||||
zio_t *zio);
|
||||
extern nvlist_t *zfs_event_create(spa_t *spa, vdev_t *vd, const char *type,
|
||||
const char *name, nvlist_t *aux);
|
||||
extern void zfs_post_remove(spa_t *spa, vdev_t *vd);
|
||||
|
||||
+1
-6
@@ -158,11 +158,6 @@ enum zio_encrypt {
|
||||
(compress) == ZIO_COMPRESS_ON || \
|
||||
(compress) == ZIO_COMPRESS_OFF)
|
||||
|
||||
/*
|
||||
* Default Linux timeout for a sd device.
|
||||
*/
|
||||
#define ZIO_DELAY_MAX (30 * MILLISEC)
|
||||
|
||||
#define ZIO_FAILURE_MODE_WAIT 0
|
||||
#define ZIO_FAILURE_MODE_CONTINUE 1
|
||||
#define ZIO_FAILURE_MODE_PANIC 2
|
||||
@@ -664,7 +659,7 @@ extern void zfs_ereport_finish_checksum(zio_cksum_report_t *report,
|
||||
extern void zfs_ereport_free_checksum(zio_cksum_report_t *report);
|
||||
|
||||
/* If we have the good data in hand, this function can be used */
|
||||
extern void zfs_ereport_post_checksum(spa_t *spa, vdev_t *vd,
|
||||
extern int zfs_ereport_post_checksum(spa_t *spa, vdev_t *vd,
|
||||
const zbookmark_phys_t *zb, struct zio *zio, uint64_t offset,
|
||||
uint64_t length, const abd_t *good_data, const abd_t *bad_data,
|
||||
struct zio_bad_cksum *info);
|
||||
|
||||
Reference in New Issue
Block a user