Changeset View
Changeset View
Standalone View
Standalone View
sys/geom/raid/g_raid.h
Show First 20 Lines • Show All 149 Lines • ▼ Show 20 Lines | |||||
#define G_RAID_DISK_S_ACTIVE 0x07 /* Operational. */ | #define G_RAID_DISK_S_ACTIVE 0x07 /* Operational. */ | ||||
#define G_RAID_DISK_E_DISCONNECTED 0x01 | #define G_RAID_DISK_E_DISCONNECTED 0x01 | ||||
struct g_raid_disk { | struct g_raid_disk { | ||||
struct g_raid_softc *d_softc; /* Back-pointer to softc. */ | struct g_raid_softc *d_softc; /* Back-pointer to softc. */ | ||||
struct g_consumer *d_consumer; /* GEOM disk consumer. */ | struct g_consumer *d_consumer; /* GEOM disk consumer. */ | ||||
void *d_md_data; /* Disk's metadata storage. */ | void *d_md_data; /* Disk's metadata storage. */ | ||||
struct g_kerneldump d_kd; /* Kernel dumping method/args. */ | |||||
int d_candelete; /* BIO_DELETE supported. */ | int d_candelete; /* BIO_DELETE supported. */ | ||||
uint64_t d_flags; /* Additional flags. */ | uint64_t d_flags; /* Additional flags. */ | ||||
u_int d_state; /* Disk state. */ | u_int d_state; /* Disk state. */ | ||||
u_int d_load; /* Disk average load. */ | u_int d_load; /* Disk average load. */ | ||||
off_t d_last_offset; /* Last head offset. */ | off_t d_last_offset; /* Last head offset. */ | ||||
int d_read_errs; /* Count of the read errors */ | int d_read_errs; /* Count of the read errors */ | ||||
TAILQ_HEAD(, g_raid_subdisk) d_subdisks; /* List of subdisks. */ | TAILQ_HEAD(, g_raid_subdisk) d_subdisks; /* List of subdisks. */ | ||||
TAILQ_ENTRY(g_raid_disk) d_next; /* Next disk in the node. */ | TAILQ_ENTRY(g_raid_disk) d_next; /* Next disk in the node. */ | ||||
struct g_kerneldump d_kd; /* Kernel dumping method/args. */ | |||||
cem: This eliminated a spurious warning/error about having a variable length array in the middle of… | |||||
}; | }; | ||||
#define G_RAID_SUBDISK_S_NONE 0x00 /* Absent. */ | #define G_RAID_SUBDISK_S_NONE 0x00 /* Absent. */ | ||||
#define G_RAID_SUBDISK_S_FAILED 0x01 /* Failed. */ | #define G_RAID_SUBDISK_S_FAILED 0x01 /* Failed. */ | ||||
#define G_RAID_SUBDISK_S_NEW 0x02 /* Blank. */ | #define G_RAID_SUBDISK_S_NEW 0x02 /* Blank. */ | ||||
#define G_RAID_SUBDISK_S_REBUILD 0x03 /* Blank + rebuild. */ | #define G_RAID_SUBDISK_S_REBUILD 0x03 /* Blank + rebuild. */ | ||||
#define G_RAID_SUBDISK_S_UNINITIALIZED 0x04 /* Disk of the new volume. */ | #define G_RAID_SUBDISK_S_UNINITIALIZED 0x04 /* Disk of the new volume. */ | ||||
#define G_RAID_SUBDISK_S_STALE 0x05 /* Dirty. */ | #define G_RAID_SUBDISK_S_STALE 0x05 /* Dirty. */ | ||||
▲ Show 20 Lines • Show All 297 Lines • Show Last 20 Lines |
This eliminated a spurious warning/error about having a variable length array in the middle of the structure (struct dumperinfo, via g_kerneldump::di). In practice, I don't think anyone outside of kern_shutdown.c is accessing or manipulating di_devname, and kern_shutdown mallocs its own large-enough structures for the name.
It would be equally acceptable IMO to drop this g_raid_disk change and simply change dumperinfo::di_devname[] to dumperinfo::di_devname[0] (or [1]). If you feel strongly one way or the other, let me know.