Changeset View
Changeset View
Standalone View
Standalone View
sys/geom/concat/g_concat.h
Show All 37 Lines | |||||
#define G_CONCAT_MAGIC "GEOM::CONCAT" | #define G_CONCAT_MAGIC "GEOM::CONCAT" | ||||
/* | /* | ||||
* Version history: | * Version history: | ||||
* 1 - Initial version number. | * 1 - Initial version number. | ||||
* 2 - Added 'stop' command to gconcat(8). | * 2 - Added 'stop' command to gconcat(8). | ||||
* 3 - Added md_provider field to metadata and '-h' option to gconcat(8). | * 3 - Added md_provider field to metadata and '-h' option to gconcat(8). | ||||
* 4 - Added md_provsize field to metadata. | * 4 - Added md_provsize field to metadata. | ||||
*/ | */ | ||||
#define G_CONCAT_VERSION 4 | #define G_CONCAT_VERSION 4 | ||||
markj: This version number is for the metadata structure, which doesn't appear to have been updated by… | |||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
#define G_CONCAT_TYPE_MANUAL 0 | #define G_CONCAT_TYPE_MANUAL 0 | ||||
#define G_CONCAT_TYPE_AUTOMATIC 1 | #define G_CONCAT_TYPE_AUTOMATIC 1 | ||||
#define G_CONCAT_DEBUG(lvl, ...) do { \ | #define G_CONCAT_DEBUG(lvl, ...) do { \ | ||||
if (g_concat_debug >= (lvl)) { \ | if (g_concat_debug >= (lvl)) { \ | ||||
printf("GEOM_CONCAT"); \ | printf("GEOM_CONCAT"); \ | ||||
Show All 10 Lines | if (g_concat_debug >= 2) { \ | ||||
printf(__VA_ARGS__); \ | printf(__VA_ARGS__); \ | ||||
printf(" "); \ | printf(" "); \ | ||||
g_print_bio(bp); \ | g_print_bio(bp); \ | ||||
printf("\n"); \ | printf("\n"); \ | ||||
} \ | } \ | ||||
} while (0) | } while (0) | ||||
struct g_concat_disk { | struct g_concat_disk { | ||||
TAILQ_ENTRY(g_concat_disk) d_next; | |||||
struct g_consumer *d_consumer; | struct g_consumer *d_consumer; | ||||
struct g_concat_softc *d_softc; | struct g_concat_softc *d_softc; | ||||
off_t d_start; | off_t d_start; | ||||
off_t d_end; | off_t d_end; | ||||
int d_candelete; | int d_candelete; | ||||
int d_removed; | int d_removed; | ||||
bool d_hardcoded; | |||||
}; | }; | ||||
struct g_concat_softc { | struct g_concat_softc { | ||||
u_int sc_type; /* provider type */ | u_int sc_type; /* provider type */ | ||||
struct g_geom *sc_geom; | struct g_geom *sc_geom; | ||||
struct g_provider *sc_provider; | struct g_provider *sc_provider; | ||||
uint32_t sc_id; /* concat unique ID */ | uint32_t sc_id; /* concat unique ID */ | ||||
struct g_concat_disk *sc_disks; | |||||
uint16_t sc_ndisks; | uint16_t sc_ndisks; | ||||
TAILQ_HEAD(g_concat_disks, g_concat_disk) sc_disks; | |||||
struct mtx sc_lock; | struct mtx sc_lock; | ||||
struct sx sc_lock_append; /* controls modification of sc_disks */ | |||||
markjUnsubmitted Not Done Inline ActionsLet's rename sc_lock to sc_completion_lock and sc_lock_append to sc_disks_lock. markj: Let's rename sc_lock to sc_completion_lock and sc_lock_append to sc_disks_lock. | |||||
}; | }; | ||||
#define sc_name sc_geom->name | #define sc_name sc_geom->name | ||||
#endif /* _KERNEL */ | #endif /* _KERNEL */ | ||||
struct g_concat_metadata { | struct g_concat_metadata { | ||||
char md_magic[16]; /* Magic value. */ | char md_magic[16]; /* Magic value. */ | ||||
uint32_t md_version; /* Version number. */ | uint32_t md_version; /* Version number. */ | ||||
char md_name[16]; /* Concat name. */ | char md_name[16]; /* Concat name. */ | ||||
Show All 33 Lines |
This version number is for the metadata structure, which doesn't appear to have been updated by this diff.