HomeFreeBSD

Provide more flexible object allocation interface

Description

Provide more flexible object allocation interface

Object allocation performance can be improved for complex operations
by providing an interface which returns the newly allocated dnode.
This allows the caller to immediately use the dnode without incurring
the expense of looking up the dnode by object number.

The functions dmu_object_alloc_hold(), zap_create_hold(), and
dmu_bonus_hold_by_dnode() were added for this purpose.

The zap_create_* functions have been updated to take advantage of
this new functionality. The dmu_bonus_hold_impl() function should
really have never been included in sys/dmu.h and was removed.
It's sole caller was converted to use dmu_bonus_hold_by_dnode().

The new symbols have been exported for use by Lustre.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #8015

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Jan 10 2019, 10:37 PM
GitHub <noreply@github.com>Committed on Jan 10 2019, 10:37 PM
Parents
rG58769a4ebd46: Don't allow dnode allocation if dn_holds != 0
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rG6955b40138b9: Provide more flexible object allocation interface (authored by Brian Behlendorf <behlendorf1@llnl.gov>).Jan 10 2019, 10:37 PM