From dfdfd44253891884128a597c61ec6efef8ae7a26 Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Sat, 20 Jun 2026 07:08:34 +0000 Subject: [PATCH] nwnss: keep zlssDev original with userspace companion --- .../nwnss/internal/{zlssUserIO.h => zlssDevUserIO.h} | 10 +++++----- src/nwnss/CMakeLists.txt | 2 +- src/nwnss/zlss/zlssDev.c | 11 ++--------- src/nwnss/zlss/{zlssUserIO.c => zlssDevUserIO.c} | 4 ++-- 4 files changed, 10 insertions(+), 17 deletions(-) rename include/nwnss/internal/{zlssUserIO.h => zlssDevUserIO.h} (62%) rename src/nwnss/zlss/{zlssUserIO.c => zlssDevUserIO.c} (95%) diff --git a/include/nwnss/internal/zlssUserIO.h b/include/nwnss/internal/zlssDevUserIO.h similarity index 62% rename from include/nwnss/internal/zlssUserIO.h rename to include/nwnss/internal/zlssDevUserIO.h index 0d7b8f6..152f8b5 100644 --- a/include/nwnss/internal/zlssUserIO.h +++ b/include/nwnss/internal/zlssDevUserIO.h @@ -1,12 +1,12 @@ -#ifndef NWNSS_INTERNAL_ZLSS_USER_IO_H -#define NWNSS_INTERNAL_ZLSS_USER_IO_H +#ifndef NWNSS_INTERNAL_ZLSS_DEV_USER_IO_H +#define NWNSS_INTERNAL_ZLSS_DEV_USER_IO_H /* - * Userspace companion for the original NSS ZLSS BIO entry points. + * Userspace companion for the original NSS ZLSS device/BIO entry points. * * Keep the public/original function names in zfs.h as the contract used by the * imported ZLSS/COMN code. In NSS_USERSPACE builds the implementations live in - * zlssUserIO.c instead of the kernel BIO implementation in zlssDev.c. + * zlssDevUserIO.c instead of the kernel BIO implementation in zlssDev.c. * * This boundary is intentionally I/O-centric: future NSS volume/image access * is implemented here using Linux userspace pread/pwrite/fsync semantics. It @@ -16,4 +16,4 @@ #include -#endif /* NWNSS_INTERNAL_ZLSS_USER_IO_H */ +#endif /* NWNSS_INTERNAL_ZLSS_DEV_USER_IO_H */ diff --git a/src/nwnss/CMakeLists.txt b/src/nwnss/CMakeLists.txt index 0d19c28..b7f88ab 100644 --- a/src/nwnss/CMakeLists.txt +++ b/src/nwnss/CMakeLists.txt @@ -342,7 +342,7 @@ add_library(nwnss SHARED zlss/zfsVolumeData.c zlss/zfsXTree.c zlss/zlssDev.c - zlss/zlssUserIO.c + zlss/zlssDevUserIO.c zlss/zlssLogicalVolume.c zlss/zlssLVAIPU.c zlss/zlssManage.c diff --git a/src/nwnss/zlss/zlssDev.c b/src/nwnss/zlss/zlssDev.c index a597e4d..e5a5703 100644 --- a/src/nwnss/zlss/zlssDev.c +++ b/src/nwnss/zlss/zlssDev.c @@ -35,14 +35,7 @@ | | +-------------------------------------------------------------------------*/ -#ifdef NSS_USERSPACE -/* - * Userspace builds keep the original zlssBioIO* entry points, but their - * implementations live in zlssUserIO.c. Leave the kernel BIO implementation - * below untouched for source compatibility. - */ -#include -#else +#if !defined(NSS_USERSPACE) #include #include #include @@ -695,4 +688,4 @@ void ZLSS_BioProcessStop() } -#endif /* NSS_USERSPACE */ +#endif /* !NSS_USERSPACE */ diff --git a/src/nwnss/zlss/zlssUserIO.c b/src/nwnss/zlss/zlssDevUserIO.c similarity index 95% rename from src/nwnss/zlss/zlssUserIO.c rename to src/nwnss/zlss/zlssDevUserIO.c index cc70162..6194233 100644 --- a/src/nwnss/zlss/zlssUserIO.c +++ b/src/nwnss/zlss/zlssDevUserIO.c @@ -1,6 +1,6 @@ /**************************************************************************** | - | Userspace ZLSS BIO companion for imported NSS sources. + | Userspace ZLSS device/BIO companion for imported NSS sources. | | The imported ZLSS/COMN code keeps calling the original zlssBioIO* entry | points declared in zfs.h. Kernel builds provide them from zlssDev.c via @@ -18,7 +18,7 @@ #include #include #include -#include +#include STATUS zlssBioIOSync( int rw,