diff options
author | pjd <pjd@FreeBSD.org> | 2008-11-17 20:49:29 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2008-11-17 20:49:29 +0000 |
commit | bbe899b96e388a8b82439f81ed3707e0d9c6070d (patch) | |
tree | 81b89fa4ac6467771d5aa291a97f4665981a6108 /cddl/contrib/opensolaris/lib/libuutil/common/uu_avl.c | |
parent | d2f579595c362ce27b4d87e2c40e1c4e09b929e3 (diff) | |
download | FreeBSD-src-bbe899b96e388a8b82439f81ed3707e0d9c6070d.zip FreeBSD-src-bbe899b96e388a8b82439f81ed3707e0d9c6070d.tar.gz |
Update ZFS from version 6 to 13 and bring some FreeBSD-specific changes.
This bring huge amount of changes, I'll enumerate only user-visible changes:
- Delegated Administration
Allows regular users to perform ZFS operations, like file system
creation, snapshot creation, etc.
- L2ARC
Level 2 cache for ZFS - allows to use additional disks for cache.
Huge performance improvements mostly for random read of mostly
static content.
- slog
Allow to use additional disks for ZFS Intent Log to speed up
operations like fsync(2).
- vfs.zfs.super_owner
Allows regular users to perform privileged operations on files stored
on ZFS file systems owned by him. Very careful with this one.
- chflags(2)
Not all the flags are supported. This still needs work.
- ZFSBoot
Support to boot off of ZFS pool. Not finished, AFAIK.
Submitted by: dfr
- Snapshot properties
- New failure modes
Before if write requested failed, system paniced. Now one
can select from one of three failure modes:
- panic - panic on write error
- wait - wait for disk to reappear
- continue - serve read requests if possible, block write requests
- Refquota, refreservation properties
Just quota and reservation properties, but don't count space consumed
by children file systems, clones and snapshots.
- Sparse volumes
ZVOLs that don't reserve space in the pool.
- External attributes
Compatible with extattr(2).
- NFSv4-ACLs
Not sure about the status, might not be complete yet.
Submitted by: trasz
- Creation-time properties
- Regression tests for zpool(8) command.
Obtained from: OpenSolaris
Diffstat (limited to 'cddl/contrib/opensolaris/lib/libuutil/common/uu_avl.c')
-rw-r--r-- | cddl/contrib/opensolaris/lib/libuutil/common/uu_avl.c | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/cddl/contrib/opensolaris/lib/libuutil/common/uu_avl.c b/cddl/contrib/opensolaris/lib/libuutil/common/uu_avl.c index 93feea9..308e920 100644 --- a/cddl/contrib/opensolaris/lib/libuutil/common/uu_avl.c +++ b/cddl/contrib/opensolaris/lib/libuutil/common/uu_avl.c @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2008 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -120,7 +120,8 @@ uu_avl_pool_destroy(uu_avl_pool_t *pp) UU_PTR_ENCODE(&pp->uap_null_avl)) { uu_panic("uu_avl_pool_destroy: Pool \"%.*s\" (%p) has " "outstanding avls, or is corrupt.\n", - sizeof (pp->uap_name), pp->uap_name, pp); + (int)sizeof (pp->uap_name), pp->uap_name, + (void *)pp); } } (void) pthread_mutex_lock(&uu_apool_list_lock); @@ -142,14 +143,14 @@ uu_avl_node_init(void *base, uu_avl_node_t *np, uu_avl_pool_t *pp) if (offset + sizeof (*np) > pp->uap_objsize) { uu_panic("uu_avl_node_init(%p, %p, %p (\"%s\")): " "offset %ld doesn't fit in object (size %ld)\n", - base, np, pp, pp->uap_name, offset, - pp->uap_objsize); + base, (void *)np, (void *)pp, pp->uap_name, + (long)offset, (long)pp->uap_objsize); } if (offset != pp->uap_nodeoffset) { uu_panic("uu_avl_node_init(%p, %p, %p (\"%s\")): " "offset %ld doesn't match pool's offset (%ld)\n", - base, np, pp, pp->uap_name, offset, - pp->uap_objsize); + base, (void *)np, (void *)pp, pp->uap_name, + (long)offset, (long)pp->uap_objsize); } } @@ -166,12 +167,12 @@ uu_avl_node_fini(void *base, uu_avl_node_t *np, uu_avl_pool_t *pp) if (na[0] == DEAD_MARKER && na[1] == DEAD_MARKER) { uu_panic("uu_avl_node_fini(%p, %p, %p (\"%s\")): " "node already finied\n", - base, np, pp, pp->uap_name); + base, (void *)np, (void *)pp, pp->uap_name); } if (na[0] != POOL_TO_MARKER(pp) || na[1] != 0) { uu_panic("uu_avl_node_fini(%p, %p, %p (\"%s\")): " "node corrupt, in tree, or in different pool\n", - base, np, pp, pp->uap_name); + base, (void *)np, (void *)pp, pp->uap_name); } } @@ -251,12 +252,13 @@ uu_avl_destroy(uu_avl_t *ap) if (ap->ua_debug) { if (avl_numnodes(&ap->ua_tree) != 0) { - uu_panic("uu_avl_destroy(%p): tree not empty\n", ap); + uu_panic("uu_avl_destroy(%p): tree not empty\n", + (void *)ap); } if (ap->ua_null_walk.uaw_next != &ap->ua_null_walk || ap->ua_null_walk.uaw_prev != &ap->ua_null_walk) { uu_panic("uu_avl_destroy(%p): outstanding walkers\n", - ap); + (void *)ap); } } (void) pthread_mutex_lock(&pp->uap_lock); @@ -441,7 +443,7 @@ uu_avl_remove(uu_avl_t *ap, void *elem) (void) _avl_walk_advance(wp, ap); } else if (wp->uaw_next_result != NULL) { uu_panic("uu_avl_remove(%p, %p): active non-robust " - "walker\n", ap, elem); + "walker\n", (void *)ap, elem); } } @@ -497,19 +499,19 @@ uu_avl_insert(uu_avl_t *ap, void *elem, uu_avl_index_t idx) if (na[1] != 0) uu_panic("uu_avl_insert(%p, %p, %p): node already " "in tree, or corrupt\n", - ap, elem, idx); + (void *)ap, elem, (void *)idx); if (na[0] == 0) uu_panic("uu_avl_insert(%p, %p, %p): node not " "initialized\n", - ap, elem, idx); + (void *)ap, elem, (void *)idx); if (na[0] != POOL_TO_MARKER(pp)) uu_panic("uu_avl_insert(%p, %p, %p): node from " "other pool, or corrupt\n", - ap, elem, idx); + (void *)ap, elem, (void *)idx); if (!INDEX_VALID(ap, idx)) uu_panic("uu_avl_insert(%p, %p, %p): %s\n", - ap, elem, idx, + (void *)ap, elem, (void *)idx, INDEX_CHECK(idx)? "outdated index" : "invalid index"); @@ -526,8 +528,8 @@ uu_avl_nearest_next(uu_avl_t *ap, uu_avl_index_t idx) { if (ap->ua_debug && !INDEX_VALID(ap, idx)) uu_panic("uu_avl_nearest_next(%p, %p): %s\n", - ap, idx, INDEX_CHECK(idx)? "outdated index" : - "invalid index"); + (void *)ap, (void *)idx, INDEX_CHECK(idx)? + "outdated index" : "invalid index"); return (avl_nearest(&ap->ua_tree, INDEX_DECODE(idx), AVL_AFTER)); } @@ -536,8 +538,8 @@ uu_avl_nearest_prev(uu_avl_t *ap, uu_avl_index_t idx) { if (ap->ua_debug && !INDEX_VALID(ap, idx)) uu_panic("uu_avl_nearest_prev(%p, %p): %s\n", - ap, idx, INDEX_CHECK(idx)? "outdated index" : - "invalid index"); + (void *)ap, (void *)idx, INDEX_CHECK(idx)? + "outdated index" : "invalid index"); return (avl_nearest(&ap->ua_tree, INDEX_DECODE(idx), AVL_BEFORE)); } |