Deleted Added
full compact
vdev.c (240415) vdev.c (240868)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 28 unchanged lines hidden (view full) ---

37#include <sys/metaslab_impl.h>
38#include <sys/space_map.h>
39#include <sys/zio.h>
40#include <sys/zap.h>
41#include <sys/fs/zfs.h>
42#include <sys/arc.h>
43#include <sys/zil.h>
44#include <sys/dsl_scan.h>
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 28 unchanged lines hidden (view full) ---

37#include <sys/metaslab_impl.h>
38#include <sys/space_map.h>
39#include <sys/zio.h>
40#include <sys/zap.h>
41#include <sys/fs/zfs.h>
42#include <sys/arc.h>
43#include <sys/zil.h>
44#include <sys/dsl_scan.h>
45#include <sys/trim_map.h>
45
46SYSCTL_DECL(_vfs_zfs);
47SYSCTL_NODE(_vfs_zfs, OID_AUTO, vdev, CTLFLAG_RW, 0, "ZFS VDEV");
48
49/*
50 * Virtual device management.
51 */
52

--- 1137 unchanged lines hidden (view full) ---

1190 }
1191
1192 /*
1193 * For hole or missing vdevs we just return success.
1194 */
1195 if (vd->vdev_ishole || vd->vdev_ops == &vdev_missing_ops)
1196 return (0);
1197
46
47SYSCTL_DECL(_vfs_zfs);
48SYSCTL_NODE(_vfs_zfs, OID_AUTO, vdev, CTLFLAG_RW, 0, "ZFS VDEV");
49
50/*
51 * Virtual device management.
52 */
53

--- 1137 unchanged lines hidden (view full) ---

1191 }
1192
1193 /*
1194 * For hole or missing vdevs we just return success.
1195 */
1196 if (vd->vdev_ishole || vd->vdev_ops == &vdev_missing_ops)
1197 return (0);
1198
1199 if (vd->vdev_ops->vdev_op_leaf) {
1200 vd->vdev_notrim = B_FALSE;
1201 trim_map_create(vd);
1202 }
1203
1198 for (int c = 0; c < vd->vdev_children; c++) {
1199 if (vd->vdev_child[c]->vdev_state != VDEV_STATE_HEALTHY) {
1200 vdev_set_state(vd, B_TRUE, VDEV_STATE_DEGRADED,
1201 VDEV_AUX_NONE);
1202 break;
1203 }
1204 }
1205

--- 228 unchanged lines hidden (view full) ---

1434 */
1435 if (pvd != NULL && pvd->vdev_reopening)
1436 vd->vdev_reopening = (pvd->vdev_reopening && !vd->vdev_offline);
1437
1438 vd->vdev_ops->vdev_op_close(vd);
1439
1440 vdev_cache_purge(vd);
1441
1204 for (int c = 0; c < vd->vdev_children; c++) {
1205 if (vd->vdev_child[c]->vdev_state != VDEV_STATE_HEALTHY) {
1206 vdev_set_state(vd, B_TRUE, VDEV_STATE_DEGRADED,
1207 VDEV_AUX_NONE);
1208 break;
1209 }
1210 }
1211

--- 228 unchanged lines hidden (view full) ---

1440 */
1441 if (pvd != NULL && pvd->vdev_reopening)
1442 vd->vdev_reopening = (pvd->vdev_reopening && !vd->vdev_offline);
1443
1444 vd->vdev_ops->vdev_op_close(vd);
1445
1446 vdev_cache_purge(vd);
1447
1448 if (vd->vdev_ops->vdev_op_leaf)
1449 trim_map_destroy(vd);
1450
1442 /*
1443 * We record the previous state before we close it, so that if we are
1444 * doing a reopen(), we don't generate FMA ereports if we notice that
1445 * it's still faulted.
1446 */
1447 vd->vdev_prevstate = vd->vdev_state;
1448
1449 if (vd->vdev_offline)

--- 1716 unchanged lines hidden ---
1451 /*
1452 * We record the previous state before we close it, so that if we are
1453 * doing a reopen(), we don't generate FMA ereports if we notice that
1454 * it's still faulted.
1455 */
1456 vd->vdev_prevstate = vd->vdev_state;
1457
1458 if (vd->vdev_offline)

--- 1716 unchanged lines hidden ---