diff options
author | jxiong <[email protected]> | 2016-11-09 13:51:12 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-11-09 13:51:12 -0800 |
commit | 126ae9f4e9a8e39f65fcd55e3e1cf90d4e9c6f56 (patch) | |
tree | 7406f971070d407a514484a5910244a8efd1e1db /module | |
parent | 0420c126ce11432590bce1da651334ca07223185 (diff) |
Export symbol dmu_objset_userobjspace_upgradable
It's used by Lustre to determine if the objset can be upgraded.
The inline version doesn't work because dmu_objset_is_snapshot()
is not exported.
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Jinshan Xiong <[email protected]>
Closes #5385
Diffstat (limited to 'module')
-rw-r--r-- | module/zfs/dmu_objset.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/module/zfs/dmu_objset.c b/module/zfs/dmu_objset.c index c1f2d8430..65aff9550 100644 --- a/module/zfs/dmu_objset.c +++ b/module/zfs/dmu_objset.c @@ -1771,6 +1771,15 @@ dmu_objset_userobjspace_upgrade(objset_t *os) dmu_objset_upgrade(os, dmu_objset_userobjspace_upgrade_cb); } +boolean_t +dmu_objset_userobjspace_upgradable(objset_t *os) +{ + return (dmu_objset_type(os) == DMU_OST_ZFS && + !dmu_objset_is_snapshot(os) && + dmu_objset_userobjused_enabled(os) && + !dmu_objset_userobjspace_present(os)); +} + void dmu_objset_space(objset_t *os, uint64_t *refdbytesp, uint64_t *availbytesp, uint64_t *usedobjsp, uint64_t *availobjsp) @@ -2334,5 +2343,6 @@ EXPORT_SYMBOL(dmu_objset_userspace_upgrade); EXPORT_SYMBOL(dmu_objset_userspace_present); EXPORT_SYMBOL(dmu_objset_userobjused_enabled); EXPORT_SYMBOL(dmu_objset_userobjspace_upgrade); +EXPORT_SYMBOL(dmu_objset_userobjspace_upgradable); EXPORT_SYMBOL(dmu_objset_userobjspace_present); #endif |