]> git.proxmox.com Git - mirror_zfs.git/commit
Provide more flexible object allocation interface
authorBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 10 Jan 2019 22:37:43 +0000 (14:37 -0800)
committerGitHub <noreply@github.com>
Thu, 10 Jan 2019 22:37:43 +0000 (14:37 -0800)
commit6955b40138b959af724a332df32ae64c872d876b
tree14a0e26473d758f2533e2a1c4c81f4ac9e167a86
parent58769a4ebd462461131f19cccf25c3d19a4dbfb5
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
include/sys/dmu.h
include/sys/zap.h
module/zfs/dmu.c
module/zfs/dmu_object.c
module/zfs/dmu_recv.c
module/zfs/zap_micro.c