From 0151834d65bb05f02a43c7f1b6128030aa3e76c4 Mon Sep 17 00:00:00 2001 From: "Ricardo M. Correia" Date: Mon, 4 Oct 2010 10:19:17 -0700 Subject: [PATCH] Register the space accounting callback even when we don't have the ZPL. This callback is needed for properly accounting the per-uid and per-gid space usage. Even if we don't have the ZPL, we still need this callback in order to have proper on-disk ZPL compatibility and to be able to use Lustre quotas. Fortunately, the callback doesn't have any ZPL/VFS dependencies so we can just move it out of #ifdef HAVE_ZPL. Signed-off-by: Brian Behlendorf --- module/zfs/zfs_vfsops.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/module/zfs/zfs_vfsops.c b/module/zfs/zfs_vfsops.c index 7e4e82f5e..77bef009b 100644 --- a/module/zfs/zfs_vfsops.c +++ b/module/zfs/zfs_vfsops.c @@ -561,6 +561,7 @@ unregister: return (error); } +#endif /* HAVE_ZPL */ static int zfs_space_delta_cb(dmu_object_type_t bonustype, void *data, @@ -611,6 +612,7 @@ zfs_space_delta_cb(dmu_object_type_t bonustype, void *data, return (error); } +#ifdef HAVE_ZPL static void fuidstr_to_sid(zfsvfs_t *zfsvfs, const char *fuidstr, char *domainbuf, int buflen, uid_t *ridp) @@ -2143,9 +2145,9 @@ zfs_init(void) * Initialize znode cache, vnode ops, etc... */ zfs_znode_init(); +#endif /* HAVE_ZPL */ dmu_objset_register_type(DMU_OST_ZFS, zfs_space_delta_cb); -#endif /* HAVE_ZPL */ } void