Date: Thu, 13 Dec 2007 23:39:06 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 130823 for review Message-ID: <200712132339.lBDNd6l3015414@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=130823 Change 130823 by jb@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712132339.lBDNd6l3015414>