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

[2.2] dbuf: fix assertion ported from master in 9c40ae021 #16005

Closed

Conversation

mmatuska
Copy link
Contributor

@mmatuska mmatuska commented Mar 18, 2024

Motivation and Context

When porting from master 86e115e -> 9c40ae0, the assertion was ported improperly.
The ASSERT0P() is not implemented in 2.2 and we cannot replace it with ASSERT0() as we are checking a pointer.

Description

Fix assertion

How Has This Been Tested?

Compilation with clang and gcc under FreeBSD and Linux

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:

mmatuska referenced this pull request Mar 18, 2024
Block cloning normally creates dirty record without dr_data.  But if
the block is read after cloning, it is moved into DB_CACHED state and
receives the data buffer.  If after that we call dbuf_unoverride()
to convert the dirty record into normal write, we should give it the
data buffer from dbuf and release one.

Reviewed-by: Kay Pedersen <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Alexander Motin <[email protected]>
Sponsored by: iXsystems, Inc.
Closes #15654
Closes #15656
@amotin
Copy link
Member

amotin commented Mar 18, 2024

Not that I have strong objections, but is there any reason not to backport 506fe78 instead to not hit this again at some point?

@behlendorf
Copy link
Contributor

Is there any reason not to backport 506fe78 instead to not hit this again at some point?

I agree, this seems preferable and will likely help pave the way for future backports.

@behlendorf behlendorf added the Status: Revision Needed Changes are required for the PR to be accepted label Apr 3, 2024
@Harry-Chen Harry-Chen mentioned this pull request Apr 25, 2024
13 tasks
@behlendorf
Copy link
Contributor

Closing. Included in 2.2.4.

@behlendorf behlendorf closed this May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Revision Needed Changes are required for the PR to be accepted
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants