Skip to content

Commit

Permalink
inflightIO: fix crash due to missing member
Browse files Browse the repository at this point in the history
commit 079a2e3e8625("blk-mq: Change shared sbitmap naming to shared tags")
renamed "nr_active_requests_shared_sbitmap" to "nr_active_requests_shared_tags".

Orabug: 37393601

Signed-off-by: Junxiao Bi <[email protected]>
  • Loading branch information
biger410 committed Dec 16, 2024
1 parent 8e87cbf commit 2388184
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drgn_tools/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,12 @@ def get_inflight_io_nr(prog: drgn.Program, disk: Object) -> int:
# hwq.tags were shared across different disks from same hba host.
if (hwq.flags & BLK_MQ_F_TAG_SHARED) != 0:
if (hwq.flags & BLK_MQ_F_TAG_HCTX_SHARED) != 0:
nr += hwq.queue.nr_active_requests_shared_tags.counter
# starting commit 079a2e3e8625, "nr_active_requests_shared_sbitmap"
# was renamed to "nr_active_requests_shared_tags".
if has_member(hwq.queue, "nr_active_requests_shared_tags"):
nr += hwq.queue.nr_active_requests_shared_tags.counter
else:
nr += hwq.queue.nr_active_requests_shared_sbitmap.counter
else:
nr += hwq.nr_active.counter
else:
Expand Down

0 comments on commit 2388184

Please sign in to comment.