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

NAS-125539 / None / [stable/dragonfish] Block Cloning Fixes and ZVOL Patch Backports #200

Merged
merged 6 commits into from
Dec 13, 2023

Conversation

ixhamza
Copy link

@ixhamza ixhamza commented Dec 13, 2023

This pull request includes recent block cloning fixes by @amotin, along with backports of patches for ZVOL read-only property fix, ZVOL threading as a property, and some cleanup. Details are mentioned in individual commits.

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)
  • 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:

ixhamza and others added 6 commits December 13, 2023 20:46
zvol_set_volmode() and zvol_set_snapdev() share a common code path.
Merge this shared code path into zvol_set_common().

Signed-off-by: Ameer Hamza <[email protected]>
Currently, zvol threading can be switched through the zvol_request_sync
module parameter system-wide. By making it a zvol property, zvol
threading can be switched per zvol.

Signed-off-by: Ameer Hamza <[email protected]>
The change in the zvol readonly property does not update the block
device readonly entry until the first IO to the ZVOL. This patch
addresses the issue by updating the block device readonly property
from the set property IOCTL call.

Signed-off-by: Ameer Hamza <[email protected]>
In some cases dbuf_assign_arcbuf() may be called on a block that
was recently cloned.  If it happened in current TXG we must undo
the block cloning first, since the only one dirty record per TXG
can't and shouldn't mean both cloning and overwrite same time.

Reviewed-by: Kay Pedersen <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by:	Alexander Motin <[email protected]>
Sponsored by:	iXsystems, Inc.
Closes openzfs#15653
These macros are similar to VERIFY0() and ASSERT0() but are intended
for pointers, and therefore use uintptr_t instead of int64_t.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Kay Pedersen <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Signed-off-by: Dag-Erling Smørgrav <[email protected]>
Closes openzfs#15225
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 openzfs#15654
Closes openzfs#15656
@ixhamza ixhamza requested a review from amotin December 13, 2023 22:18
@bugclerk bugclerk changed the title [stable/dragonfish] Block Cloning Fixes and ZVOL Patch Backports NAS-125539 / None / [stable/dragonfish] Block Cloning Fixes and ZVOL Patch Backports Dec 13, 2023
@bugclerk
Copy link

@amotin amotin merged commit 2eda98a into stable/dragonfish Dec 13, 2023
17 checks passed
@amotin amotin deleted the NAS-125539-dragonfish branch December 13, 2023 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants