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 <behlendorf1@llnl.gov>
This commit is contained in:
Ricardo M. Correia 2010-10-04 10:19:17 -07:00 committed by Brian Behlendorf
parent 858219cc4e
commit 0151834d65

View File

@ -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