Hi folks.
I've found that get_clones_stat function behaves differently for DEBUG
and non-DEBUG kernels.
As result non-DEBUG kernel never makes up clones list.
The reason is zap_count function being called inside ASSERT0, VERIFY0
should be used instead.
Matt, could you comment, pls? (git blames you).
If you use only "zfs" utility to get zfs properties you will probably
never notice this issue, because it uses workaround for it.
The attached patch solves the issue.
Thanks.
>From cd365a89218c3bfb3a5085a59527f44348f8ee20 Mon Sep 17 00:00:00 2001
From: Alexander Stetsenko <[email protected]>
Date: Thu, 16 Jan 2014 12:32:32 +0400
Subject: [PATCH] get_clones_stat doesn't call zap_count in nondebug
---
usr/src/uts/common/fs/zfs/dsl_dataset.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/usr/src/uts/common/fs/zfs/dsl_dataset.c b/usr/src/uts/common/fs/zfs/dsl_dataset.c
index 5fa408f..c2c5fb1 100644
--- a/usr/src/uts/common/fs/zfs/dsl_dataset.c
+++ b/usr/src/uts/common/fs/zfs/dsl_dataset.c
@@ -1364,7 +1364,7 @@ get_clones_stat(dsl_dataset_t *ds, nvlist_t *nv)
* Only trust it if it has the right number of entries.
*/
if (ds->ds_phys->ds_next_clones_obj != 0) {
- ASSERT0(zap_count(mos, ds->ds_phys->ds_next_clones_obj,
+ VERIFY0(zap_count(mos, ds->ds_phys->ds_next_clones_obj,
&count));
}
if (count != ds->ds_phys->ds_num_children - 1)
--
1.7.3.2
_______________________________________________
developer mailing list
[email protected]
http://lists.open-zfs.org/mailman/listinfo/developer