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 <behlendorf1@llnl.gov>
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Closes #5385
This commit is contained in:
jxiong 2016-11-09 13:51:12 -08:00 committed by Brian Behlendorf
parent 0420c126ce
commit 126ae9f4e9
2 changed files with 11 additions and 8 deletions

View File

@ -184,17 +184,10 @@ boolean_t dmu_objset_userused_enabled(objset_t *os);
int dmu_objset_userspace_upgrade(objset_t *os); int dmu_objset_userspace_upgrade(objset_t *os);
boolean_t dmu_objset_userspace_present(objset_t *os); boolean_t dmu_objset_userspace_present(objset_t *os);
boolean_t dmu_objset_userobjused_enabled(objset_t *os); boolean_t dmu_objset_userobjused_enabled(objset_t *os);
boolean_t dmu_objset_userobjspace_upgradable(objset_t *os);
void dmu_objset_userobjspace_upgrade(objset_t *os); void dmu_objset_userobjspace_upgrade(objset_t *os);
boolean_t dmu_objset_userobjspace_present(objset_t *os); boolean_t dmu_objset_userobjspace_present(objset_t *os);
static inline 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));
}
int dmu_fsname(const char *snapname, char *buf); int dmu_fsname(const char *snapname, char *buf);
void dmu_objset_evict_done(objset_t *os); void dmu_objset_evict_done(objset_t *os);

View File

@ -1771,6 +1771,15 @@ dmu_objset_userobjspace_upgrade(objset_t *os)
dmu_objset_upgrade(os, dmu_objset_userobjspace_upgrade_cb); 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 void
dmu_objset_space(objset_t *os, uint64_t *refdbytesp, uint64_t *availbytesp, dmu_objset_space(objset_t *os, uint64_t *refdbytesp, uint64_t *availbytesp,
uint64_t *usedobjsp, uint64_t *availobjsp) 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_userspace_present);
EXPORT_SYMBOL(dmu_objset_userobjused_enabled); EXPORT_SYMBOL(dmu_objset_userobjused_enabled);
EXPORT_SYMBOL(dmu_objset_userobjspace_upgrade); EXPORT_SYMBOL(dmu_objset_userobjspace_upgrade);
EXPORT_SYMBOL(dmu_objset_userobjspace_upgradable);
EXPORT_SYMBOL(dmu_objset_userobjspace_present); EXPORT_SYMBOL(dmu_objset_userobjspace_present);
#endif #endif