PERFORCE change 130823 for review
John Birrell
jb at FreeBSD.org
Thu Dec 13 15:39:08 PST 2007
http://perforce.freebsd.org/chv.cgi?CH=130823
Change 130823 by jb at jb_freebsd1 on 2007/12/13 23:38:12
Fix a couple of mismerges.
Affected files ...
.. //depot/projects/dtrace7/src/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h#3 edit
.. //depot/projects/dtrace7/src/sys/contrib/opensolaris/uts/common/fs/zfs/vdev.c#3 edit
Differences ...
==== //depot/projects/dtrace7/src/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h#3 (text+ko) ====
@@ -470,8 +470,6 @@
#define gethrestime_sec() time(NULL)
-#define open64(...) open(__VA_ARGS__)
-#define pread64(d, p, n, o) pread(d, p, n, o)
#define pwrite64(d, p, n, o) pwrite(d, p, n, o)
#define readdir64(d) readdir(d)
#define SIGPENDING(td) (0)
==== //depot/projects/dtrace7/src/sys/contrib/opensolaris/uts/common/fs/zfs/vdev.c#3 (text+ko) ====
@@ -1846,7 +1846,17 @@
vd->vdev_state = state;
vd->vdev_stat.vs_aux = aux;
+ /*
+ * If we are setting the vdev state to anything but an open state, then
+ * always close the underlying device. Otherwise, we keep accessible
+ * but invalid devices open forever. We don't call vdev_close() itself,
+ * because that implies some extra checks (offline, etc) that we don't
+ * want here. This is limited to leaf devices, because otherwise
+ * closing the device will affect other children.
+ */
if (vdev_is_dead(vd) && vd->vdev_ops->vdev_op_leaf)
+ vd->vdev_ops->vdev_op_close(vd);
+
if (state == VDEV_STATE_CANT_OPEN) {
/*
* If we fail to open a vdev during an import, we mark it as
More information about the p4-projects
mailing list