mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 19:04:45 +03:00
Illumos #3464
3464 zfs synctask code needs restructuring Reviewed by: Dan Kimmel <dan.kimmel@delphix.com> Reviewed by: Adam Leventhal <ahl@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Christopher Siden <christopher.siden@delphix.com> Approved by: Garrett D'Amore <garrett@damore.org> References: https://www.illumos.org/issues/3464 illumos/illumos-gate@3b2aab1880 Ported-by: Tim Chase <tim@chase2k.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #1495
This commit is contained in:
committed by
Brian Behlendorf
parent
6f1ffb0665
commit
13fe019870
@@ -26,6 +26,7 @@
|
||||
#include <sys/nvpair.h>
|
||||
#include <sys/kmem.h>
|
||||
#include <sys/debug.h>
|
||||
#include <sys/param.h>
|
||||
#ifndef _KERNEL
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
@@ -114,6 +115,18 @@ fnvlist_merge(nvlist_t *dst, nvlist_t *src)
|
||||
VERIFY0(nvlist_merge(dst, src, KM_SLEEP));
|
||||
}
|
||||
|
||||
size_t
|
||||
fnvlist_num_pairs(nvlist_t *nvl)
|
||||
{
|
||||
size_t count = 0;
|
||||
nvpair_t *pair;
|
||||
|
||||
for (pair = nvlist_next_nvpair(nvl, 0); pair != NULL;
|
||||
pair = nvlist_next_nvpair(nvl, pair))
|
||||
count++;
|
||||
return (count);
|
||||
}
|
||||
|
||||
void
|
||||
fnvlist_add_boolean(nvlist_t *nvl, const char *name)
|
||||
{
|
||||
@@ -563,5 +576,6 @@ EXPORT_SYMBOL(fnvpair_value_int64);
|
||||
EXPORT_SYMBOL(fnvpair_value_uint64);
|
||||
EXPORT_SYMBOL(fnvpair_value_string);
|
||||
EXPORT_SYMBOL(fnvpair_value_nvlist);
|
||||
EXPORT_SYMBOL(fnvlist_num_pairs);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user