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

zdb: show bp in uberblock dump #16667

Merged
merged 1 commit into from
Oct 20, 2024
Merged

Conversation

robn
Copy link
Member

@robn robn commented Oct 19, 2024

Motivation and Context

I was helping a friend with a broken pool. zdb -lu didn't show a head block pointer, and it annoyed me.

Description

Just format and print the block pointer in the uberblock when dumping it.

How Has This Been Tested?

Run program, enjoy block pointer:

$ sudo ./zdb -lqu /dev/nvme0n1p2
    Uberblock[0]
	magic = 0000000000bab10c
	version = 5000
	txg = 2476320
	guid_sum = 17693405506996517599
	timestamp = 1729339026 UTC = Sat Oct 19 22:57:06 2024
	bp = DVA[0]=<0:62290b6000:1000> DVA[1]=<0:5f41c5b000:1000> DVA[2]=<0:10016b9000:1000> [L0 DMU objset] fletcher4 uncompressed unencrypted LE contiguous unique triple size=1000L/1000P birth=2476320L/2476320P fill=264 cksum=00000004118c836b:00000fa5d98389b1:001e1fc53b6ba384:26b43e0bf0e15a8f
	mmp_magic = 00000000a11cea11
	mmp_delay = 0
	mmp_valid = 0
	checkpoint_txg = 0
	raidz_reflow state=0 off=0
        labels = 0 1 2 3
    Uberblock[1]
	magic = 0000000000bab10c
	version = 5000
...

zdb test tag ran to success.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

Just another useful nugget of info in times of strife.

Sponsored-by: https://despairlabs.com/sponsor/
Signed-off-by: Rob Norris <robn@despairlabs.com>
@behlendorf behlendorf added the Status: Accepted Ready to integrate (reviewed, tested) label Oct 20, 2024
@behlendorf behlendorf merged commit b2f6de7 into openzfs:master Oct 20, 2024
19 of 20 checks passed
behlendorf pushed a commit to behlendorf/zfs that referenced this pull request Oct 21, 2024
Just another useful nugget of info in times of strife.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Closes openzfs#16667
behlendorf pushed a commit to behlendorf/zfs that referenced this pull request Oct 21, 2024
Just another useful nugget of info in times of strife.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Closes openzfs#16667
robn added a commit to robn/zfs that referenced this pull request Nov 5, 2024
Just another useful nugget of info in times of strife.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Closes openzfs#16667
(cherry picked from commit b2f6de7)
@robn robn mentioned this pull request Nov 5, 2024
13 tasks
ptr1337 pushed a commit to CachyOS/zfs that referenced this pull request Nov 14, 2024
Just another useful nugget of info in times of strife.

Sponsored-by: https://despairlabs.com/sponsor/
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Closes openzfs#16667
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants