From d1eb6afd2d375906ecfdc3cc71155c2529dbf1ed Mon Sep 17 00:00:00 2001 From: pjd Date: Sat, 14 Apr 2007 12:23:03 +0000 Subject: MFp4: Add more debug, so we can see if zpool.cache was loaded or why it wasn't loaded. --- .../contrib/opensolaris/uts/common/fs/zfs/spa_config.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'sys/cddl') 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. -- cgit v1.1