Deleted Added
sdiff udiff text old ( 224791 ) new ( 236155 )
full compact
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

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

16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21/*
22 * Copyright (c) 2006 Pawel Jakub Dawidek <pjd@FreeBSD.org>
23 * All rights reserved.
24 */
25
26#include <sys/zfs_context.h>
27#include <sys/param.h>
28#include <sys/kernel.h>
29#include <sys/bio.h>
30#include <sys/disk.h>
31#include <sys/spa.h>

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

400 }
401 }
402 }
403
404 return (cp);
405}
406
407static int
408vdev_geom_open(vdev_t *vd, uint64_t *psize, uint64_t *ashift)
409{
410 struct g_provider *pp;
411 struct g_consumer *cp;
412 size_t bufsize;
413 int error;
414
415 /*
416 * We must have a pathname, and it must be absolute.

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

483
484 cp->private = vd;
485 vd->vdev_tsd = cp;
486 pp = cp->provider;
487
488 /*
489 * Determine the actual size of the device.
490 */
491 *psize = pp->mediasize;
492
493 /*
494 * Determine the device's minimum transfer size.
495 */
496 *ashift = highbit(MAX(pp->sectorsize, SPA_MINBLOCKSIZE)) - 1;
497
498 /*
499 * Clear the nowritecache bit, so that on a vdev_reopen() we will

--- 164 unchanged lines hidden ---