From c676a13fb69d3cb1ac8e2668243cc812a02163c6 Mon Sep 17 00:00:00 2001 From: Jorgen Lundman Date: Thu, 29 Feb 2024 16:28:09 +0900 Subject: [PATCH] Disable device TRIM for #356 Appears to corrupt pool, take safe option until it can be investigated. Signed-off-by: Jorgen Lundman --- module/os/windows/spl/spl-vnode.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/module/os/windows/spl/spl-vnode.c b/module/os/windows/spl/spl-vnode.c index f7675555df6c..c45071664a9c 100644 --- a/module/os/windows/spl/spl-vnode.c +++ b/module/os/windows/spl/spl-vnode.c @@ -245,6 +245,9 @@ blk_queue_discard(PDEVICE_OBJECT dev) // DWORD bytesReturned = 0; DEVICE_TRIM_DESCRIPTOR dtd = { 0 }; + // Disabled until we can verify #356 "zpool import hangs forever" + return (0); // No trim + if (kernel_ioctl(dev, NULL, IOCTL_STORAGE_QUERY_PROPERTY, &spqTrim, sizeof (spqTrim), &dtd, sizeof (dtd)) == 0) { return (dtd.TrimEnabled);