Skip to content

Commit

Permalink
md: dump sb_flags
Browse files Browse the repository at this point in the history
sb_flags is very useful to debug md hung issue, especially
flag "MD_SB_CHANGE_PENDING", with this flag set, the write
and other md thread could get stuck.

Signed-off-by: Junxiao Bi <[email protected]>
  • Loading branch information
biger410 authored and brenns10 committed Nov 29, 2023
1 parent b291d82 commit 05c701d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drgn_tools/md.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,16 @@ def show_md(prog: Program) -> None:
"%-10s: %s"
% ("flags", enum_flags_str(prog, "enum mddev_flags", mddev.flags))
)
if has_member(mddev, "sb_flags"):
print(
"%-10s: %s"
% (
"sb_flags",
enum_flags_str(
prog, "enum mddev_sb_flags", mddev.sb_flags
),
)
)
# linear and raid0 doesn't support recovery
if mddev.level != 0 and mddev.level != -1:
print(
Expand Down

0 comments on commit 05c701d

Please sign in to comment.