Skip to content

Conversation

IvanVolosyuk
Copy link
Contributor

@IvanVolosyuk IvanVolosyuk commented Feb 19, 2025

Motivation and Context

Try to solve the encrypted zfs send issue. This is purely theoretical change, I wasn't been able to reproduce the issue myself, but looking at the code this have come to mind.

Description

I'm not very familiar with the zfs code base, but I think there is a logic issue in the code.
The db_buf reference can be changed by the code holding dndb->db_mtx mutex and waiting on mutex can take a while, so the reference can become stale.

How Has This Been Tested?

Show pass the test suite test without an issue I would imagine.

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:

@amotin
Copy link
Member

amotin commented Jun 14, 2025

Dnode buffer should never change, since it is accessed from both open and syncing contexts. Even decryption of it is a special case, done in place.

@amotin amotin closed this Jun 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Work in Progress Not yet ready for general review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants