summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/fs/zfs/zap_micro.c
diff options
context:
space:
mode:
authorTom Erickson <Tom.Erickson@Sun.COM>2009-11-09 20:45:32 -0800
committerTom Erickson <Tom.Erickson@Sun.COM>2009-11-09 20:45:32 -0800
commit92241e0b80813d0b83c08e730a29b9d1831794fc (patch)
treeae911ea5f6928508430420730ad8dba20b5b3aa2 /usr/src/uts/common/fs/zfs/zap_micro.c
parent8d4cf8d8d2965ea43bccdc838f15c18634fee02d (diff)
downloadillumos-joyent-92241e0b80813d0b83c08e730a29b9d1831794fc.tar.gz
PSARC 2009/510 ZFS received properties
6850025 want to preserve local properties for zfs_recv 6839260 want zfs send with properties 6855486 zfs_receive should keep trying to set properties even after some fail 6850030 snapshots on read-only dataset shouldn't affect zfs_receive
Diffstat (limited to 'usr/src/uts/common/fs/zfs/zap_micro.c')
-rw-r--r--usr/src/uts/common/fs/zfs/zap_micro.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/usr/src/uts/common/fs/zfs/zap_micro.c b/usr/src/uts/common/fs/zfs/zap_micro.c
index bac479ffcf..c5ae34a163 100644
--- a/usr/src/uts/common/fs/zfs/zap_micro.c
+++ b/usr/src/uts/common/fs/zfs/zap_micro.c
@@ -816,6 +816,16 @@ zap_lookup_uint64(objset_t *os, uint64_t zapobj, const uint64_t *key,
}
int
+zap_contains(objset_t *os, uint64_t zapobj, const char *name)
+{
+ int err = (zap_lookup_norm(os, zapobj, name, 0,
+ 0, NULL, MT_EXACT, NULL, 0, NULL));
+ if (err == EOVERFLOW || err == EINVAL)
+ err = 0; /* found, but skipped reading the value */
+ return (err);
+}
+
+int
zap_length(objset_t *os, uint64_t zapobj, const char *name,
uint64_t *integer_size, uint64_t *num_integers)
{