equal
deleted
inserted
replaced
16 * fields enclosed by brackets "[]" replaced with your own identifying |
16 * fields enclosed by brackets "[]" replaced with your own identifying |
17 * information: Portions Copyright [yyyy] [name of copyright owner] |
17 * information: Portions Copyright [yyyy] [name of copyright owner] |
18 * |
18 * |
19 * CDDL HEADER END |
19 * CDDL HEADER END |
20 */ |
20 */ |
|
21 |
21 /* |
22 /* |
22 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. |
23 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. |
23 * Copyright (c) 2012 by Delphix. All rights reserved. |
24 * Copyright (c) 2012 by Delphix. All rights reserved. |
24 */ |
25 */ |
25 |
26 |
139 * Label routines |
140 * Label routines |
140 */ |
141 */ |
141 struct uberblock; |
142 struct uberblock; |
142 extern uint64_t vdev_label_offset(uint64_t psize, int l, uint64_t offset); |
143 extern uint64_t vdev_label_offset(uint64_t psize, int l, uint64_t offset); |
143 extern int vdev_label_number(uint64_t psise, uint64_t offset); |
144 extern int vdev_label_number(uint64_t psise, uint64_t offset); |
144 extern nvlist_t *vdev_label_read_config(vdev_t *vd); |
145 extern nvlist_t *vdev_label_read_config(vdev_t *vd, int label); |
145 extern void vdev_uberblock_load(zio_t *zio, vdev_t *vd, struct uberblock *ub); |
146 extern void vdev_uberblock_load(vdev_t *, struct uberblock *, nvlist_t **); |
146 |
147 |
147 typedef enum { |
148 typedef enum { |
148 VDEV_LABEL_CREATE, /* create/add a new device */ |
149 VDEV_LABEL_CREATE, /* create/add a new device */ |
149 VDEV_LABEL_REPLACE, /* replace an existing device */ |
150 VDEV_LABEL_REPLACE, /* replace an existing device */ |
150 VDEV_LABEL_SPARE, /* add a new hot spare */ |
151 VDEV_LABEL_SPARE, /* add a new hot spare */ |