Skip to content

range_tree: Provide more debug details upon unexpected add/remove#17581

Merged
amotin merged 1 commit intoopenzfs:masterfrom
KlaraSystems:range_tree_overlapping_debug
Jul 31, 2025
Merged

range_tree: Provide more debug details upon unexpected add/remove#17581
amotin merged 1 commit intoopenzfs:masterfrom
KlaraSystems:range_tree_overlapping_debug

Conversation

@ihoro
Copy link
Copy Markdown
Contributor

@ihoro ihoro commented Jul 30, 2025

Sponsored-by: Klara, Inc.

Motivation and Context

Whenever unexpected addition or removal happens to a range tree the panic string provides more details for debugging: metaslab id, vdev guid, spa name, range tree name, etc.

Description

A new entrypoint for range tree creation was added -- zfs_range_tree_create_flags() function with extra flags and name parameters. The only flag for now is ZFS_RT_F_DYN_NAME what means that the given name reference is a dynamic buffer which must be freed when the range tree is being destroyed.

How Has This Been Tested?

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)
  • Quality assurance (non-breaking change which makes the code more robust against bugs)
  • 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:

Copy link
Copy Markdown
Member

@amotin amotin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Please just fix one long line to make checkstyle happy. Plus couple optional comments, if you like:

Comment thread module/zfs/vdev_raidz.c Outdated
Comment thread module/zfs/vdev.c Outdated
@amotin amotin added the Status: Code Review Needed Ready for review and testing label Jul 30, 2025
Comment thread module/zfs/dnode.c Outdated
Comment thread module/zfs/metaslab.c Outdated
Comment thread module/zfs/vdev.c Outdated
Comment thread module/zfs/vdev_trim.c Outdated
Comment thread module/zfs/vdev_trim.c Outdated
@ihoro ihoro force-pushed the range_tree_overlapping_debug branch from d7c9c1a to 8676625 Compare July 30, 2025 20:57
Sponsored-by: Klara, Inc.
Signed-off-by: Igor Ostapenko <igor.ostapenko@klarasystems.com>
@ihoro ihoro force-pushed the range_tree_overlapping_debug branch from 8676625 to 93092fe Compare July 30, 2025 21:01
@ihoro
Copy link
Copy Markdown
Contributor Author

ihoro commented Jul 30, 2025

Thanks for review, I think I've covered all the comments.

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Jul 31, 2025
@amotin amotin merged commit cb5e7e0 into openzfs:master Jul 31, 2025
39 of 41 checks passed
amotin pushed a commit that referenced this pull request Aug 5, 2025
Sponsored-by: Klara, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Signed-off-by: Igor Ostapenko <igor.ostapenko@klarasystems.com>
Closes #17581
amotin pushed a commit to truenas/zfs that referenced this pull request Aug 17, 2025
Sponsored-by: Klara, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Signed-off-by: Igor Ostapenko <igor.ostapenko@klarasystems.com>
Closes openzfs#17581
amotin pushed a commit to truenas/zfs that referenced this pull request Aug 17, 2025
Sponsored-by: Klara, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Signed-off-by: Igor Ostapenko <igor.ostapenko@klarasystems.com>
Closes openzfs#17581
ixhamza pushed a commit to truenas/zfs that referenced this pull request Aug 28, 2025
Sponsored-by: Klara, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Signed-off-by: Igor Ostapenko <igor.ostapenko@klarasystems.com>
Closes openzfs#17581
spauka pushed a commit to spauka/zfs that referenced this pull request Aug 30, 2025
Sponsored-by: Klara, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Signed-off-by: Igor Ostapenko <igor.ostapenko@klarasystems.com>
Closes openzfs#17581
bugclerk pushed a commit to truenas/zfs that referenced this pull request Sep 8, 2025
Sponsored-by: Klara, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Signed-off-by: Igor Ostapenko <igor.ostapenko@klarasystems.com>
Closes openzfs#17581
(cherry picked from commit c1e8ab8)
lundman pushed a commit to openzfsonosx/openzfs-fork that referenced this pull request Jan 30, 2026
Sponsored-by: Klara, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Signed-off-by: Igor Ostapenko <igor.ostapenko@klarasystems.com>
Closes openzfs#17581
lundman pushed a commit to openzfsonwindows/openzfs that referenced this pull request Feb 23, 2026
Sponsored-by: Klara, Inc.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Signed-off-by: Igor Ostapenko <igor.ostapenko@klarasystems.com>
Closes openzfs#17581
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.

3 participants