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

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

571 }
572 }
573
574 return (cp);
575}
576
577static int
578vdev_geom_open(vdev_t *vd, uint64_t *psize, uint64_t *max_psize,
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

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

571 }
572 }
573
574 return (cp);
575}
576
577static int
578vdev_geom_open(vdev_t *vd, uint64_t *psize, uint64_t *max_psize,
579 uint64_t *ashift)
579 uint64_t *logical_ashift, uint64_t *physical_ashift)
580{
581 struct g_provider *pp;
582 struct g_consumer *cp;
583 size_t bufsize;
584 int error;
585
586 /*
587 * We must have a pathname, and it must be absolute.

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

657 pp = cp->provider;
658
659 /*
660 * Determine the actual size of the device.
661 */
662 *max_psize = *psize = pp->mediasize;
663
664 /*
580{
581 struct g_provider *pp;
582 struct g_consumer *cp;
583 size_t bufsize;
584 int error;
585
586 /*
587 * We must have a pathname, and it must be absolute.

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

657 pp = cp->provider;
658
659 /*
660 * Determine the actual size of the device.
661 */
662 *max_psize = *psize = pp->mediasize;
663
664 /*
665 * Determine the device's minimum transfer size.
665 * Determine the device's minimum transfer size and preferred
666 * transfer size.
666 */
667 */
667 *ashift = highbit(MAX(pp->sectorsize, SPA_MINBLOCKSIZE)) - 1;
668 *logical_ashift = highbit(MAX(pp->sectorsize, SPA_MINBLOCKSIZE)) - 1;
669 *physical_ashift = 0;
670 if (pp->stripesize)
671 *physical_ashift = highbit(pp->stripesize) - 1;
668
669 /*
670 * Clear the nowritecache settings, so that on a vdev_reopen()
671 * we will try again.
672 */
673 vd->vdev_nowritecache = B_FALSE;
674
675 if (vd->vdev_physpath != NULL)

--- 183 unchanged lines hidden ---
672
673 /*
674 * Clear the nowritecache settings, so that on a vdev_reopen()
675 * we will try again.
676 */
677 vd->vdev_nowritecache = B_FALSE;
678
679 if (vd->vdev_physpath != NULL)

--- 183 unchanged lines hidden ---