Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add blkptr command to sdb #281

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

PaulZ-98
Copy link
Contributor

= Problem

sdb does not interpret the bitfields within ZFS block pointers in order to generate a proper display

= Solution

Implement the blkptr command in sdb. It might have been possible to include some of the ZFS C code into python for this. However it seemed the most straightforward to just port the functionality into python.

This was mostly porting C macros, but pylint guided the coding to have some object oriented content.

Closes #27

@PaulZ-98
Copy link
Contributor Author

I see that my bitfield operators can go into zfs/init.py so let me do some refactoring on that.

@PaulZ-98
Copy link
Contributor Author

PaulZ-98 commented Oct 7, 2021

Pushed changes - eliminated lookup tables that we can get from zfs itself, and put bitfield operations in init.py

@prakashsurya
Copy link
Contributor

sdb> echo 0xffff98c0bdc630c0 | cast zio_t* | member io_bp | blkptr
DVA[0]=<5:98d7fd2000:20000> [L0 ZIL intent log] zilog2 uncompressed unencrypted LE contiguous unique single 20000L/20000P birth=102888885L/102888885P fill=0 cksum=31f21b5d88444753:eb8c9d829c60c5f6:17bb3:33e

I was able to use this on a crash dump.. so while I haven't checked the code, it seems to be working for me, and is useful.. so I'm going to approve it..

@sdimitro @ahrens do either of you want to give this a look? maybe we can get it integrated?

@dlpx-tfc-github-manager dlpx-tfc-github-manager bot deleted the branch delphix:master January 5, 2023 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Want blkptr command for ZFS
2 participants