summaryrefslogtreecommitdiffstats
path: root/sys/cddl
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2007-04-22 21:18:40 +0000
committerpjd <pjd@FreeBSD.org>2007-04-22 21:18:40 +0000
commit328ad8c39b7fe076c817f11235241bfd1a53e8ba (patch)
tree800868c879e23932ba13138798bf5e6f0201f3a6 /sys/cddl
parent6af3e597936be3c34972fd161387a7f922dd340a (diff)
downloadFreeBSD-src-328ad8c39b7fe076c817f11235241bfd1a53e8ba.zip
FreeBSD-src-328ad8c39b7fe076c817f11235241bfd1a53e8ba.tar.gz
Fix 'zpool status -v'. To get object number we should use ZFS_DIRENT_OBJ()
macro, as za_first_integer field also contains type. This should be fixed in ZFS itself, but this bug is not visible on Solaris, because there, type is not stored in za_first_integer. On the other hand it will be visible on MacOS X. Reported by: Barry Pederson <bp@barryp.org>
Diffstat (limited to 'sys/cddl')
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c
index fe1294b..4246ec0 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c
@@ -48,6 +48,7 @@
#include <sys/refcount.h>
#include <sys/zap_impl.h>
#include <sys/zap_leaf.h>
+#include <sys/zfs_znode.h>
int fzap_default_block_shift = 14; /* 16k blocksize */
@@ -907,7 +908,7 @@ zap_value_search(objset_t *os, uint64_t zapobj, uint64_t value, char *name)
for (zap_cursor_init(&zc, os, zapobj);
(err = zap_cursor_retrieve(&zc, za)) == 0;
zap_cursor_advance(&zc)) {
- if (za->za_first_integer == value) {
+ if (ZFS_DIRENT_OBJ(za->za_first_integer) == value) {
(void) strcpy(name, za->za_name);
break;
}
OpenPOWER on IntegriCloud