mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Remove UIO_ZEROCOPY functions structures
The original xuio zero copy functionality has always been unused on Linux and FreeBSD. Remove this disabled code to avoid any confusion and improve readability. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #11124
This commit is contained in:
@@ -43,27 +43,6 @@ typedef struct uio uio_t;
|
||||
typedef struct iovec iovec_t;
|
||||
typedef enum uio_seg uio_seg_t;
|
||||
|
||||
typedef enum xuio_type {
|
||||
UIOTYPE_ASYNCIO,
|
||||
UIOTYPE_ZEROCOPY
|
||||
} xuio_type_t;
|
||||
|
||||
typedef struct xuio {
|
||||
uio_t xu_uio;
|
||||
|
||||
/* Extended uio fields */
|
||||
enum xuio_type xu_type; /* What kind of uio structure? */
|
||||
union {
|
||||
struct {
|
||||
int xu_zc_rw;
|
||||
void *xu_zc_priv;
|
||||
} xu_zc;
|
||||
} xu_ext;
|
||||
} xuio_t;
|
||||
|
||||
#define XUIO_XUZC_PRIV(xuio) xuio->xu_ext.xu_zc.xu_zc_priv
|
||||
#define XUIO_XUZC_RW(xuio) xuio->xu_ext.xu_zc.xu_zc_rw
|
||||
|
||||
static __inline int
|
||||
zfs_uiomove(void *cp, size_t n, enum uio_rw dir, uio_t *uio)
|
||||
{
|
||||
|
||||
@@ -63,49 +63,6 @@ typedef struct uio {
|
||||
size_t uio_skip;
|
||||
} uio_t;
|
||||
|
||||
typedef struct aio_req {
|
||||
uio_t *aio_uio;
|
||||
void *aio_private;
|
||||
} aio_req_t;
|
||||
|
||||
typedef enum xuio_type {
|
||||
UIOTYPE_ASYNCIO,
|
||||
UIOTYPE_ZEROCOPY,
|
||||
} xuio_type_t;
|
||||
|
||||
|
||||
#define UIOA_IOV_MAX 16
|
||||
|
||||
typedef struct uioa_page_s {
|
||||
int uioa_pfncnt;
|
||||
void **uioa_ppp;
|
||||
caddr_t uioa_base;
|
||||
size_t uioa_len;
|
||||
} uioa_page_t;
|
||||
|
||||
typedef struct xuio {
|
||||
uio_t xu_uio;
|
||||
enum xuio_type xu_type;
|
||||
union {
|
||||
struct {
|
||||
uint32_t xu_a_state;
|
||||
ssize_t xu_a_mbytes;
|
||||
uioa_page_t *xu_a_lcur;
|
||||
void **xu_a_lppp;
|
||||
void *xu_a_hwst[4];
|
||||
uioa_page_t xu_a_locked[UIOA_IOV_MAX];
|
||||
} xu_aio;
|
||||
|
||||
struct {
|
||||
int xu_zc_rw;
|
||||
void *xu_zc_priv;
|
||||
} xu_zc;
|
||||
} xu_ext;
|
||||
} xuio_t;
|
||||
|
||||
#define XUIO_XUZC_PRIV(xuio) xuio->xu_ext.xu_zc.xu_zc_priv
|
||||
#define XUIO_XUZC_RW(xuio) xuio->xu_ext.xu_zc.xu_zc_rw
|
||||
|
||||
#define uio_segflg(uio) (uio)->uio_segflg
|
||||
#define uio_offset(uio) (uio)->uio_loffset
|
||||
#define uio_resid(uio) (uio)->uio_resid
|
||||
|
||||
@@ -864,18 +864,6 @@ int dmu_assign_arcbuf_by_dnode(dnode_t *dn, uint64_t offset,
|
||||
int dmu_assign_arcbuf_by_dbuf(dmu_buf_t *handle, uint64_t offset,
|
||||
struct arc_buf *buf, dmu_tx_t *tx);
|
||||
#define dmu_assign_arcbuf dmu_assign_arcbuf_by_dbuf
|
||||
#ifdef HAVE_UIO_ZEROCOPY
|
||||
int dmu_xuio_init(struct xuio *uio, int niov);
|
||||
void dmu_xuio_fini(struct xuio *uio);
|
||||
int dmu_xuio_add(struct xuio *uio, struct arc_buf *abuf, offset_t off,
|
||||
size_t n);
|
||||
int dmu_xuio_cnt(struct xuio *uio);
|
||||
struct arc_buf *dmu_xuio_arcbuf(struct xuio *uio, int i);
|
||||
void dmu_xuio_clear(struct xuio *uio, int i);
|
||||
#endif /* HAVE_UIO_ZEROCOPY */
|
||||
void xuio_stat_wbuf_copied(void);
|
||||
void xuio_stat_wbuf_nocopy(void);
|
||||
|
||||
extern int zfs_prefetch_disable;
|
||||
extern int zfs_max_recordsize;
|
||||
|
||||
|
||||
@@ -237,13 +237,6 @@ extern "C" {
|
||||
struct objset;
|
||||
struct dmu_pool;
|
||||
|
||||
typedef struct dmu_xuio {
|
||||
int next;
|
||||
int cnt;
|
||||
struct arc_buf **bufs;
|
||||
iovec_t *iovp;
|
||||
} dmu_xuio_t;
|
||||
|
||||
typedef struct dmu_sendstatus {
|
||||
list_node_t dss_link;
|
||||
int dss_outfd;
|
||||
|
||||
Reference in New Issue
Block a user