mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 03:37:45 +03:00
Add zfs_file_* interface, remove vnodes
Provide a common zfs_file_* interface which can be implemented on all platforms to perform normal file access from either the kernel module or the libzpool library. This allows all non-portable vnode_t usage in the common code to be replaced by the new portable zfs_file_t. The associated vnode and kobj compatibility functions, types, and macros have been removed from the SPL. Moving forward, vnodes should only be used in platform specific code when provided by the native operating system. Reviewed-by: Sean Eric Fagan <sef@ixsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Igor Kozhukhov <igor@dilos.org> Reviewed-by: Jorgen Lundman <lundman@lundman.net> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #9556
This commit is contained in:
committed by
Brian Behlendorf
parent
67a6c3bc9f
commit
da92d5cbb3
@@ -62,7 +62,7 @@ typedef struct dmu_recv_cookie {
|
||||
nvlist_t *drc_begin_nvl;
|
||||
|
||||
objset_t *drc_os;
|
||||
vnode_t *drc_vp; /* The vnode to read the stream from */
|
||||
zfs_file_t *drc_fp; /* The file to read the stream from */
|
||||
uint64_t drc_voff; /* The current offset in the stream */
|
||||
uint64_t drc_bytes_read;
|
||||
/*
|
||||
@@ -82,7 +82,7 @@ typedef struct dmu_recv_cookie {
|
||||
int dmu_recv_begin(char *tofs, char *tosnap, dmu_replay_record_t *drr_begin,
|
||||
boolean_t force, boolean_t resumable, nvlist_t *localprops,
|
||||
nvlist_t *hidden_args, char *origin, dmu_recv_cookie_t *drc,
|
||||
vnode_t *vp, offset_t *voffp);
|
||||
zfs_file_t *fp, offset_t *voffp);
|
||||
int dmu_recv_stream(dmu_recv_cookie_t *drc, int cleanup_fd,
|
||||
uint64_t *action_handlep, offset_t *voffp);
|
||||
int dmu_recv_end(dmu_recv_cookie_t *drc, void *owner);
|
||||
|
||||
Reference in New Issue
Block a user