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-129309 / None / Add support for zvol block cloning #265

Merged
merged 1 commit into from
Dec 19, 2024

Conversation

ixhamza
Copy link

@ixhamza ixhamza commented Dec 18, 2024

Motivation and Context

Add block cloning support for zvols, similar to existing file block cloning.

Description

This change introduces block cloning support for zvols. Given that the upstream kernel patch for block cloning is still pending merge, this feature is being implemented as a local patch for the Electric Eel Alpha freeze. However, we plan to upstream at least the generic zvol.c part.

Related Patches

How Has This Been Tested?

  • Verified block cloning functionality across zvol devices and within the same zvol device.
  • Validated cloned blocks through zdb.
  • Conducted ZIL replay tests to ensure reliability.
  • Tested on both single-queue (default for zfs) and multi-queue configurations.
  • Observed significant performance improvements across all block sizes, with larger block sizes yielding better results.
  • Achieved up to 30x performance improvement with a 32k block size (used by perf team) in a virtualized QEMU environment.
  • Scale Build & API Tests.

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:

@bugclerk
Copy link

@bugclerk bugclerk changed the title Add support for zvol block cloning NAS-129309 / None / Add support for zvol block cloning Dec 18, 2024
module/os/linux/zfs/zvol_os.c Outdated Show resolved Hide resolved
module/os/linux/zfs/zvol_os.c Show resolved Hide resolved
module/os/linux/zfs/zvol_os.c Outdated Show resolved Hide resolved
Signed-off-by: Ameer Hamza <ahamza@ixsystems.com>
@ixhamza ixhamza merged commit 83e855f into truenas/zfs-2.3-release Dec 19, 2024
37 of 38 checks passed
@bugclerk
Copy link

Not updating JIRA ticket https://ixsystems.atlassian.net/browse/NAS-129309 target versions as no JIRA version corresponds to this PR

@bugclerk
Copy link

This PR has been merged and conversations have been locked.
If you would like to discuss more about this issue please use our forums or raise a Jira ticket.

@truenas truenas locked as resolved and limited conversation to collaborators Dec 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants