summaryrefslogtreecommitdiffstats
path: root/sys/cddl
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2007-04-14 12:23:03 +0000
committerpjd <pjd@FreeBSD.org>2007-04-14 12:23:03 +0000
commitd1eb6afd2d375906ecfdc3cc71155c2529dbf1ed (patch)
tree899563e59581c7342f9eced1314346ad9cc2d8a1 /sys/cddl
parent5f8b118000131b3d6cf34c820c85818bfd78ac43 (diff)
downloadFreeBSD-src-d1eb6afd2d375906ecfdc3cc71155c2529dbf1ed.zip
FreeBSD-src-d1eb6afd2d375906ecfdc3cc71155c2529dbf1ed.tar.gz
MFp4: Add more debug, so we can see if zpool.cache was loaded or why it
wasn't loaded.
Diffstat (limited to 'sys/cddl')
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c
index 0f023d6..3bb8863 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c
@@ -85,19 +85,25 @@ spa_config_load(void)
spa_config_dir, ZPOOL_CACHE_FILE);
file = kobj_open_file(pathname);
- if (file == (struct _buf *)-1)
+ if (file == (struct _buf *)-1) {
+ ZFS_LOG(1, "Cannot open %s.", pathname);
return;
+ }
- if (kobj_get_filesize(file, &fsize) != 0)
+ if (kobj_get_filesize(file, &fsize) != 0) {
+ ZFS_LOG(1, "Cannot get size of %s.", pathname);
goto out;
+ }
buf = kmem_alloc(fsize, KM_SLEEP);
/*
* Read the nvlist from the file.
*/
- if (kobj_read_file(file, buf, fsize, 0) < 0)
+ if (kobj_read_file(file, buf, fsize, 0) < 0) {
+ ZFS_LOG(1, "Cannot read %s.", pathname);
goto out;
+ }
/*
* Unpack the nvlist.
@@ -105,6 +111,8 @@ spa_config_load(void)
if (nvlist_unpack(buf, fsize, &nvlist, KM_SLEEP) != 0)
goto out;
+ ZFS_LOG(1, "File %s loaded.", pathname);
+
/*
* Iterate over all elements in the nvlist, creating a new spa_t for
* each one with the specified configuration.
OpenPOWER on IntegriCloud