Deleted Added
full compact
vdev_root.c (219089) vdev_root.c (236155)
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

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

18 *
19 * CDDL HEADER END
20 */
21/*
22 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 */
25
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

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

18 *
19 * CDDL HEADER END
20 */
21/*
22 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 */
25
26/*
27 * Copyright (c) 2012 by Delphix. All rights reserved.
28 */
29
26#include <sys/zfs_context.h>
27#include <sys/spa.h>
28#include <sys/vdev_impl.h>
29#include <sys/zio.h>
30#include <sys/fs/zfs.h>
31
32/*
33 * Virtual device vector for the pool's root vdev.

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

45static int
46too_many_errors(vdev_t *vd, int numerrors)
47{
48 ASSERT3U(numerrors, <=, vd->vdev_children);
49 return (numerrors > 0);
50}
51
52static int
30#include <sys/zfs_context.h>
31#include <sys/spa.h>
32#include <sys/vdev_impl.h>
33#include <sys/zio.h>
34#include <sys/fs/zfs.h>
35
36/*
37 * Virtual device vector for the pool's root vdev.

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

49static int
50too_many_errors(vdev_t *vd, int numerrors)
51{
52 ASSERT3U(numerrors, <=, vd->vdev_children);
53 return (numerrors > 0);
54}
55
56static int
53vdev_root_open(vdev_t *vd, uint64_t *asize, uint64_t *ashift)
57vdev_root_open(vdev_t *vd, uint64_t *asize, uint64_t *max_asize,
58 uint64_t *ashift)
54{
55 int lasterror = 0;
56 int numerrors = 0;
57
58 if (vd->vdev_children == 0) {
59 vd->vdev_stat.vs_aux = VDEV_AUX_BAD_LABEL;
60 return (EINVAL);
61 }

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

72 }
73
74 if (too_many_errors(vd, numerrors)) {
75 vd->vdev_stat.vs_aux = VDEV_AUX_NO_REPLICAS;
76 return (lasterror);
77 }
78
79 *asize = 0;
59{
60 int lasterror = 0;
61 int numerrors = 0;
62
63 if (vd->vdev_children == 0) {
64 vd->vdev_stat.vs_aux = VDEV_AUX_BAD_LABEL;
65 return (EINVAL);
66 }

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

77 }
78
79 if (too_many_errors(vd, numerrors)) {
80 vd->vdev_stat.vs_aux = VDEV_AUX_NO_REPLICAS;
81 return (lasterror);
82 }
83
84 *asize = 0;
85 *max_asize = 0;
80 *ashift = 0;
81
82 return (0);
83}
84
85static void
86vdev_root_close(vdev_t *vd)
87{

--- 29 unchanged lines hidden ---
86 *ashift = 0;
87
88 return (0);
89}
90
91static void
92vdev_root_close(vdev_t *vd)
93{

--- 29 unchanged lines hidden ---