md_promise.c (265669) | md_promise.c (279878) |
---|---|
1/*- 2 * Copyright (c) 2011 Alexander Motin <mav@FreeBSD.org> 3 * Copyright (c) 2000 - 2008 S��ren Schmidt <sos@FreeBSD.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2011 Alexander Motin <mav@FreeBSD.org> 3 * Copyright (c) 2000 - 2008 S��ren Schmidt <sos@FreeBSD.org> 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 12 unchanged lines hidden (view full) --- 21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25 * SUCH DAMAGE. 26 */ 27 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: stable/10/sys/geom/raid/md_promise.c 265669 2014-05-08 12:07:40Z mav $"); | 29__FBSDID("$FreeBSD: stable/10/sys/geom/raid/md_promise.c 279878 2015-03-11 09:50:31Z mav $"); |
30 31#include <sys/param.h> 32#include <sys/bio.h> 33#include <sys/endian.h> 34#include <sys/kernel.h> 35#include <sys/kobj.h> 36#include <sys/limits.h> 37#include <sys/lock.h> --- 1062 unchanged lines hidden (view full) --- 1100 char name[16]; 1101 uint16_t vendor; 1102 1103 G_RAID_DEBUG(1, "Tasting Promise on %s", cp->provider->name); 1104 pp = cp->provider; 1105 1106 /* Read metadata from device. */ 1107 meta = NULL; | 30 31#include <sys/param.h> 32#include <sys/bio.h> 33#include <sys/endian.h> 34#include <sys/kernel.h> 35#include <sys/kobj.h> 36#include <sys/limits.h> 37#include <sys/lock.h> --- 1062 unchanged lines hidden (view full) --- 1100 char name[16]; 1101 uint16_t vendor; 1102 1103 G_RAID_DEBUG(1, "Tasting Promise on %s", cp->provider->name); 1104 pp = cp->provider; 1105 1106 /* Read metadata from device. */ 1107 meta = NULL; |
1108 vendor = 0xffff; | |
1109 g_topology_unlock(); | 1108 g_topology_unlock(); |
1110 len = 2; | 1109 vendor = 0xffff; 1110 len = sizeof(vendor); |
1111 if (pp->geom->rank == 1) 1112 g_io_getattr("GEOM::hba_vendor", cp, &len, &vendor); 1113 subdisks = promise_meta_read(cp, metaarr); 1114 g_topology_lock(); 1115 if (subdisks == 0) { 1116 if (g_raid_aggressive_spare) { 1117 if (vendor == 0x105a || vendor == 0x1002) { 1118 G_RAID_DEBUG(1, --- 883 unchanged lines hidden --- | 1111 if (pp->geom->rank == 1) 1112 g_io_getattr("GEOM::hba_vendor", cp, &len, &vendor); 1113 subdisks = promise_meta_read(cp, metaarr); 1114 g_topology_lock(); 1115 if (subdisks == 0) { 1116 if (g_raid_aggressive_spare) { 1117 if (vendor == 0x105a || vendor == 0x1002) { 1118 G_RAID_DEBUG(1, --- 883 unchanged lines hidden --- |