git://git.camperquake.de
/
zfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Illumos #1693: persistent 'comment' field for a zpool
[zfs.git]
/
module
/
zfs
/
spa_config.c
diff --git
a/module/zfs/spa_config.c
b/module/zfs/spa_config.c
index
79664cb
..
d814ae2
100644
(file)
--- a/
module/zfs/spa_config.c
+++ b/
module/zfs/spa_config.c
@@
-21,6
+21,8
@@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
+ * Copyright (c) 2011 by Delphix. All rights reserved.
*/
#include <sys/spa.h>
*/
#include <sys/spa.h>
@@
-179,7
+181,6
@@
spa_config_write(spa_config_dirent_t *dp, nvlist_t *nvl)
(void) vn_rename(temp, dp->scd_path, UIO_SYSSPACE);
}
(void) VOP_CLOSE(vp, oflags, 1, 0, kcred, NULL);
(void) vn_rename(temp, dp->scd_path, UIO_SYSSPACE);
}
(void) VOP_CLOSE(vp, oflags, 1, 0, kcred, NULL);
- VN_RELE(vp);
}
(void) vn_remove(temp, UIO_SYSSPACE, RMFILE);
}
(void) vn_remove(temp, UIO_SYSSPACE, RMFILE);
@@
-345,6
+346,10
@@
spa_config_generate(spa_t *spa, vdev_t *vd, uint64_t txg, int getstats)
txg) == 0);
VERIFY(nvlist_add_uint64(config, ZPOOL_CONFIG_POOL_GUID,
spa_guid(spa)) == 0);
txg) == 0);
VERIFY(nvlist_add_uint64(config, ZPOOL_CONFIG_POOL_GUID,
spa_guid(spa)) == 0);
+ VERIFY(spa->spa_comment == NULL || nvlist_add_string(config,
+ ZPOOL_CONFIG_COMMENT, spa->spa_comment) == 0);
+
+
#ifdef _KERNEL
hostid = zone_get_hostid(NULL);
#else /* _KERNEL */
#ifdef _KERNEL
hostid = zone_get_hostid(NULL);
#else /* _KERNEL */