Skip to content

Commit

Permalink
Fix accounting error for pending sync IO ops in zpool iostat
Browse files Browse the repository at this point in the history
Currently vdev_queue_class_length is responsible for checking how long
the queue length is, however, it doesn't check the length when a list
is used, rather it just returns whether it is empty or not. To fix this
I added a counter variable to vdev_queue_t to keep track of the sync
IO ops, and changed vdev_queue_class_length to reference this variable
instead.

Signed-off-by: MigeljanImeri <ImeriMigel@gmail.com>
  • Loading branch information
MigeljanImeri committed Nov 2, 2023
1 parent 57b4098 commit 154debb
Show file tree
Hide file tree
Showing 3 changed files with 385 additions and 186 deletions.
1 change: 1 addition & 0 deletions include/sys/vdev_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ typedef union vdev_queue_class {
struct vdev_queue {
vdev_t *vq_vdev;
vdev_queue_class_t vq_class[ZIO_PRIORITY_NUM_QUEUEABLE];
ulong_t vq_sync_pending_count[ZIO_PRIORITY_NUM_QUEUEABLE];
avl_tree_t vq_read_offset_tree;
avl_tree_t vq_write_offset_tree;
uint64_t vq_last_offset;
Expand Down
Loading

0 comments on commit 154debb

Please sign in to comment.