From a840bb542362d58006b6cc27affd58ee6b965b80 Mon Sep 17 00:00:00 2001 From: jcassette Date: Sat, 18 Jan 2025 04:55:37 +0100 Subject: [PATCH] New: reflink support for ZFS --- src/NzbDrone.Common/Disk/DiskTransferService.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Common/Disk/DiskTransferService.cs b/src/NzbDrone.Common/Disk/DiskTransferService.cs index 2da930a78..f89c31b21 100644 --- a/src/NzbDrone.Common/Disk/DiskTransferService.cs +++ b/src/NzbDrone.Common/Disk/DiskTransferService.cs @@ -341,10 +341,11 @@ namespace NzbDrone.Common.Disk var isCifs = targetDriveFormat == "cifs"; var isBtrfs = sourceDriveFormat == "btrfs" && targetDriveFormat == "btrfs"; + var isZfs = sourceDriveFormat == "zfs" && targetDriveFormat == "zfs"; if (mode.HasFlag(TransferMode.Copy)) { - if (isBtrfs) + if (isBtrfs || isZfs) { if (_diskProvider.TryCreateRefLink(sourcePath, targetPath)) { @@ -358,7 +359,7 @@ namespace NzbDrone.Common.Disk if (mode.HasFlag(TransferMode.Move)) { - if (isBtrfs) + if (isBtrfs || isZfs) { if (isSameMount && _diskProvider.TryRenameFile(sourcePath, targetPath)) {