Deleted Added
full compact
vdev_geom.c (224791) vdev_geom.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

--- 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.
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 * Portions Copyright (c) 2012 Martin Matuska <mm@FreeBSD.org>
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
26 */
27
28#include <sys/zfs_context.h>
29#include <sys/param.h>
30#include <sys/kernel.h>
31#include <sys/bio.h>
32#include <sys/disk.h>
33#include <sys/spa.h>

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

402 }
403 }
404 }
405
406 return (cp);
407}
408
409static int
408vdev_geom_open(vdev_t *vd, uint64_t *psize, uint64_t *ashift)
410vdev_geom_open(vdev_t *vd, uint64_t *psize, uint64_t *max_psize,
411 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 */
412{
413 struct g_provider *pp;
414 struct g_consumer *cp;
415 size_t bufsize;
416 int error;
417
418 /*
419 * We must have a pathname, and it must be absolute.

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

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

--- 164 unchanged lines hidden ---