svn commit: r252308 - in stable/9: cddl/contrib/opensolaris/cmd/zpool sys/cddl/compat/opensolaris/sys sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Steven Hartland
smh at FreeBSD.org
Thu Jun 27 18:20:20 UTC 2013
Author: smh
Date: Thu Jun 27 18:20:19 2013
New Revision: 252308
URL: http://svnweb.freebsd.org/changeset/base/252308
Log:
MFC r252056:
Fix destroyed ZFS pools failing to import
MFC r252059:
Fix ZFS zpool freeze (debug command) not processing due to invalid ioctl call syntax.
MFC r252060:
Fix intermittent ZFS lock panic
MFC r252061:
Switch ZFS mutex_owner macro to use sx_xholder as its now exported via sx.h
Modified:
stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
stable/9/sys/cddl/compat/opensolaris/sys/mutex.h
stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
Directory Properties:
stable/9/cddl/contrib/opensolaris/ (props changed)
stable/9/sys/ (props changed)
stable/9/sys/cddl/contrib/opensolaris/ (props changed)
Modified: stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
==============================================================================
--- stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Thu Jun 27 17:33:04 2013 (r252307)
+++ stable/9/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Thu Jun 27 18:20:19 2013 (r252308)
@@ -5322,10 +5322,9 @@ main(int argc, char **argv)
* 'freeze' is a vile debugging abomination, so we treat
* it as such.
*/
- char buf[16384];
- int fd = open(ZFS_DEV, O_RDWR);
- (void) strcpy((void *)buf, argv[2]);
- return (!!ioctl(fd, ZFS_IOC_POOL_FREEZE, buf));
+ zfs_cmd_t zc = { 0 };
+ (void) strlcpy(zc.zc_name, argv[2], sizeof (zc.zc_name));
+ return (!!zfs_ioctl(g_zfs, ZFS_IOC_POOL_FREEZE, &zc));
} else {
(void) fprintf(stderr, gettext("unrecognized "
"command '%s'\n"), cmdname);
Modified: stable/9/sys/cddl/compat/opensolaris/sys/mutex.h
==============================================================================
--- stable/9/sys/cddl/compat/opensolaris/sys/mutex.h Thu Jun 27 17:33:04 2013 (r252307)
+++ stable/9/sys/cddl/compat/opensolaris/sys/mutex.h Thu Jun 27 18:20:19 2013 (r252308)
@@ -71,8 +71,7 @@ typedef struct sx kmutex_t;
#define mutex_tryenter(lock) sx_try_xlock(lock)
#define mutex_exit(lock) sx_xunlock(lock)
#define mutex_owned(lock) sx_xlocked(lock)
-/* TODO: Change to sx_xholder() once it is moved from kern_sx.c to sx.h. */
-#define mutex_owner(lock) ((lock)->sx_lock & SX_LOCK_SHARED ? NULL : (struct thread *)SX_OWNER((lock)->sx_lock))
+#define mutex_owner(lock) sx_xholder(lock)
#endif /* _KERNEL */
Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
==============================================================================
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Thu Jun 27 17:33:04 2013 (r252307)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Thu Jun 27 18:20:19 2013 (r252308)
@@ -1834,6 +1834,7 @@ vdev_dtl_sync(vdev_t *vd, uint64_t txg)
vdev_config_dirty(vd->vdev_top);
}
+ bzero(&smlock, sizeof (smlock));
mutex_init(&smlock, NULL, MUTEX_DEFAULT, NULL);
space_map_create(&smsync, sm->sm_start, sm->sm_size, sm->sm_shift,
Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
==============================================================================
--- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Thu Jun 27 17:33:04 2013 (r252307)
+++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c Thu Jun 27 18:20:19 2013 (r252308)
@@ -270,8 +270,7 @@ vdev_geom_read_config(struct g_consumer
continue;
if (nvlist_lookup_uint64(*config, ZPOOL_CONFIG_POOL_STATE,
- &state) != 0 || state == POOL_STATE_DESTROYED ||
- state > POOL_STATE_L2CACHE) {
+ &state) != 0 || state > POOL_STATE_L2CACHE) {
nvlist_free(*config);
*config = NULL;
continue;
More information about the svn-src-stable-9
mailing list