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 <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Sponsored-by: https://despairlabs.com/sponsor/
Closes #16492
This commit is contained in:
Rob Norris
2024-08-28 22:28:24 +10:00
committed by Tony Hutter
parent 3f9ee8089d
commit e580b543a8
7 changed files with 404 additions and 748 deletions
+2
View File
@@ -158,6 +158,8 @@ extern "C" {
#define ZFS_DIRENT_OBJ(de) BF64_GET(de, 0, 48)
extern int zfs_obj_to_path(objset_t *osp, uint64_t obj, char *buf, int len);
extern int zfs_obj_to_pobj(objset_t *osp, sa_handle_t *hdl,
sa_attr_type_t *sa_table, uint64_t *pobjp, int *is_xattrdir);
extern int zfs_get_zplprop(objset_t *os, zfs_prop_t prop, uint64_t *value);
#ifdef _KERNEL