Skip to content

Commit c22d56e

Browse files
robnbehlendorf
authored andcommitted
zfs_znode: lift common code to a single shared file
For now, userspace has no znode implementation. Some of the property and path handling code is used there though and is the same on all platforms, so we only need a single copy of it. Reviewed by: Brian Behlendorf <[email protected]> Reviewed-by: Alexander Motin <[email protected]> Signed-off-by: Rob Norris <[email protected]> Sponsored-by: https://despairlabs.com/sponsor/ Closes #16492
1 parent 4c9b59e commit c22d56e

File tree

7 files changed

+404
-748
lines changed

7 files changed

+404
-748
lines changed

include/sys/zfs_znode.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ extern "C" {
158158
#define ZFS_DIRENT_OBJ(de) BF64_GET(de, 0, 48)
159159

160160
extern int zfs_obj_to_path(objset_t *osp, uint64_t obj, char *buf, int len);
161+
extern int zfs_obj_to_pobj(objset_t *osp, sa_handle_t *hdl,
162+
sa_attr_type_t *sa_table, uint64_t *pobjp, int *is_xattrdir);
161163
extern int zfs_get_zplprop(objset_t *os, zfs_prop_t prop, uint64_t *value);
162164

163165
#ifdef _KERNEL

lib/libzpool/Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ nodist_libzpool_la_SOURCES = \
4747
\
4848
module/os/linux/zfs/vdev_file.c \
4949
module/os/linux/zfs/zfs_debug.c \
50-
module/os/linux/zfs/zfs_znode.c \
5150
module/os/linux/zfs/zio_crypt.c \
5251
\
5352
module/zcommon/cityhash.c \
@@ -183,6 +182,7 @@ nodist_libzpool_la_SOURCES = \
183182
module/zfs/zfs_ratelimit.c \
184183
module/zfs/zfs_rlock.c \
185184
module/zfs/zfs_sa.c \
185+
module/zfs/zfs_znode.c \
186186
module/zfs/zil.c \
187187
module/zfs/zio.c \
188188
module/zfs/zio_checksum.c \

module/Kbuild.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,7 @@ ZFS_OBJS := \
424424
zfs_rlock.o \
425425
zfs_sa.o \
426426
zfs_vnops.o \
427+
zfs_znode.o \
427428
zil.o \
428429
zio.o \
429430
zio_checksum.o \
@@ -458,7 +459,7 @@ ZFS_OBJS_OS := \
458459
zfs_uio.o \
459460
zfs_vfsops.o \
460461
zfs_vnops_os.o \
461-
zfs_znode.o \
462+
zfs_znode_os.o \
462463
zio_crypt.o \
463464
zpl_ctldir.o \
464465
zpl_export.o \

module/Makefile.bsd

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ SRCS+= abd_os.c \
212212
zfs_racct.c \
213213
zfs_vfsops.c \
214214
zfs_vnops_os.c \
215-
zfs_znode.c \
215+
zfs_znode_os.c \
216216
zio_crypt.c \
217217
zvol_os.c
218218

@@ -358,6 +358,7 @@ SRCS+= abd.c \
358358
zfs_rlock.c \
359359
zfs_sa.c \
360360
zfs_vnops.c \
361+
zfs_znode.c \
361362
zil.c \
362363
zio.c \
363364
zio_checksum.c \

0 commit comments

Comments
 (0)