g_raid3.h (133808) | g_raid3.h (134124) |
---|---|
1/*- 2 * Copyright (c) 2004 Pawel Jakub Dawidek <pjd@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 2004 Pawel Jakub Dawidek <pjd@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sys/geom/raid3/g_raid3.h 133808 2004-08-16 06:23:14Z pjd $ | 26 * $FreeBSD: head/sys/geom/raid3/g_raid3.h 134124 2004-08-21 18:11:46Z pjd $ |
27 */ 28 29#ifndef _G_RAID3_H_ 30#define _G_RAID3_H_ 31 32#include <sys/endian.h> 33#include <sys/md5.h> 34 35#define G_RAID3_CLASS_NAME "RAID3" 36 37#define G_RAID3_MAGIC "GEOM::RAID3" | 27 */ 28 29#ifndef _G_RAID3_H_ 30#define _G_RAID3_H_ 31 32#include <sys/endian.h> 33#include <sys/md5.h> 34 35#define G_RAID3_CLASS_NAME "RAID3" 36 37#define G_RAID3_MAGIC "GEOM::RAID3" |
38#define G_RAID3_VERSION 0 | 38#define G_RAID3_VERSION 1 |
39 40#define G_RAID3_DISK_FLAG_DIRTY 0x0000000000000001ULL 41#define G_RAID3_DISK_FLAG_SYNCHRONIZING 0x0000000000000002ULL 42#define G_RAID3_DISK_FLAG_FORCE_SYNC 0x0000000000000004ULL 43#define G_RAID3_DISK_FLAG_HARDCODED 0x0000000000000008ULL 44#define G_RAID3_DISK_FLAG_MASK (G_RAID3_DISK_FLAG_DIRTY | \ 45 G_RAID3_DISK_FLAG_SYNCHRONIZING | \ 46 G_RAID3_DISK_FLAG_FORCE_SYNC) 47 48#define G_RAID3_DEVICE_FLAG_NOAUTOSYNC 0x0000000000000001ULL | 39 40#define G_RAID3_DISK_FLAG_DIRTY 0x0000000000000001ULL 41#define G_RAID3_DISK_FLAG_SYNCHRONIZING 0x0000000000000002ULL 42#define G_RAID3_DISK_FLAG_FORCE_SYNC 0x0000000000000004ULL 43#define G_RAID3_DISK_FLAG_HARDCODED 0x0000000000000008ULL 44#define G_RAID3_DISK_FLAG_MASK (G_RAID3_DISK_FLAG_DIRTY | \ 45 G_RAID3_DISK_FLAG_SYNCHRONIZING | \ 46 G_RAID3_DISK_FLAG_FORCE_SYNC) 47 48#define G_RAID3_DEVICE_FLAG_NOAUTOSYNC 0x0000000000000001ULL |
49#define G_RAID3_DEVICE_FLAG_MASK (G_RAID3_DEVICE_FLAG_NOAUTOSYNC) | 49#define G_RAID3_DEVICE_FLAG_ROUND_ROBIN 0x0000000000000002ULL 50#define G_RAID3_DEVICE_FLAG_MASK (G_RAID3_DEVICE_FLAG_NOAUTOSYNC | \ 51 G_RAID3_DEVICE_FLAG_ROUND_ROBIN) |
50 51#ifdef _KERNEL 52extern u_int g_raid3_debug; 53 54#define G_RAID3_DEBUG(lvl, ...) do { \ 55 if (g_raid3_debug >= (lvl)) { \ 56 printf("GEOM_RAID3"); \ 57 if (g_raid3_debug > 0) \ --- 99 unchanged lines hidden (view full) --- 157 uint32_t sc_id; /* Device unique ID. */ 158 159 struct bio_queue_head sc_queue; 160 struct mtx sc_queue_mtx; 161 struct proc *sc_worker; 162 163 struct g_raid3_disk *sc_disks; 164 u_int sc_ndisks; /* Number of disks. */ | 52 53#ifdef _KERNEL 54extern u_int g_raid3_debug; 55 56#define G_RAID3_DEBUG(lvl, ...) do { \ 57 if (g_raid3_debug >= (lvl)) { \ 58 printf("GEOM_RAID3"); \ 59 if (g_raid3_debug > 0) \ --- 99 unchanged lines hidden (view full) --- 159 uint32_t sc_id; /* Device unique ID. */ 160 161 struct bio_queue_head sc_queue; 162 struct mtx sc_queue_mtx; 163 struct proc *sc_worker; 164 165 struct g_raid3_disk *sc_disks; 166 u_int sc_ndisks; /* Number of disks. */ |
167 u_int sc_round_robin; |
|
165 struct g_raid3_disk *sc_syncdisk; 166 167 uma_zone_t sc_zone_64k; 168 uma_zone_t sc_zone_16k; 169 uma_zone_t sc_zone_4k; 170 171 u_int sc_syncid; /* Synchronization ID. */ 172 int sc_bump_syncid; --- 103 unchanged lines hidden (view full) --- 276 printf("sectorsize: %u\n", (u_int)md->md_sectorsize); 277 printf("syncoffset: %jd\n", (intmax_t)md->md_sync_offset); 278 printf(" mflags:"); 279 if (md->md_mflags == 0) 280 printf(" NONE"); 281 else { 282 if ((md->md_mflags & G_RAID3_DEVICE_FLAG_NOAUTOSYNC) != 0) 283 printf(" NOAUTOSYNC"); | 168 struct g_raid3_disk *sc_syncdisk; 169 170 uma_zone_t sc_zone_64k; 171 uma_zone_t sc_zone_16k; 172 uma_zone_t sc_zone_4k; 173 174 u_int sc_syncid; /* Synchronization ID. */ 175 int sc_bump_syncid; --- 103 unchanged lines hidden (view full) --- 279 printf("sectorsize: %u\n", (u_int)md->md_sectorsize); 280 printf("syncoffset: %jd\n", (intmax_t)md->md_sync_offset); 281 printf(" mflags:"); 282 if (md->md_mflags == 0) 283 printf(" NONE"); 284 else { 285 if ((md->md_mflags & G_RAID3_DEVICE_FLAG_NOAUTOSYNC) != 0) 286 printf(" NOAUTOSYNC"); |
287 if ((md->md_mflags & G_RAID3_DEVICE_FLAG_ROUND_ROBIN) != 0) 288 printf(" ROUND-ROBIN"); |
|
284 } 285 printf("\n"); 286 printf(" dflags:"); 287 if (md->md_dflags == 0) 288 printf(" NONE"); 289 else { 290 if ((md->md_dflags & G_RAID3_DISK_FLAG_DIRTY) != 0) 291 printf(" DIRTY"); --- 15 unchanged lines hidden --- | 289 } 290 printf("\n"); 291 printf(" dflags:"); 292 if (md->md_dflags == 0) 293 printf(" NONE"); 294 else { 295 if ((md->md_dflags & G_RAID3_DISK_FLAG_DIRTY) != 0) 296 printf(" DIRTY"); --- 15 unchanged lines hidden --- |