nwnss: keep zlssDev original with userspace companion

This commit is contained in:
Mario Fetka
2026-06-20 07:08:34 +00:00
parent 92d18172b8
commit dfdfd44253
4 changed files with 10 additions and 17 deletions

View File

@@ -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 <zfs.h>
#endif /* NWNSS_INTERNAL_ZLSS_USER_IO_H */
#endif /* NWNSS_INTERNAL_ZLSS_DEV_USER_IO_H */

View File

@@ -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

View File

@@ -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 <internal/zlssUserIO.h>
#else
#if !defined(NSS_USERSPACE)
#include <linux/fs.h>
#include <linux/bio.h>
#include <linux/gfp.h>
@@ -695,4 +688,4 @@ void ZLSS_BioProcessStop()
}
#endif /* NSS_USERSPACE */
#endif /* !NSS_USERSPACE */

View File

@@ -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 <zOmni.h>
#include <xError.h>
#include <xCache.h>
#include <internal/zlssUserIO.h>
#include <internal/zlssDevUserIO.h>
STATUS zlssBioIOSync(
int rw,