Changeset View
Changeset View
Standalone View
Standalone View
sys/geom/gate/g_gate.h
Show All 31 Lines | |||||
#define _G_GATE_H_ | #define _G_GATE_H_ | ||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/lock.h> | #include <sys/lock.h> | ||||
#include <sys/mutex.h> | #include <sys/mutex.h> | ||||
#include <sys/queue.h> | #include <sys/queue.h> | ||||
#include <geom/geom.h> | #include <geom/geom.h> | ||||
#ifdef _KERNEL | |||||
#include <geom/geom_int.h> | |||||
#endif | |||||
#define G_GATE_CLASS_NAME "GATE" | #define G_GATE_CLASS_NAME "GATE" | ||||
#define G_GATE_PROVIDER_NAME "ggate" | #define G_GATE_PROVIDER_NAME "ggate" | ||||
#define G_GATE_MOD_NAME "ggate" | #define G_GATE_MOD_NAME "ggate" | ||||
#define G_GATE_CTL_NAME "ggctl" | #define G_GATE_CTL_NAME "ggctl" | ||||
#define G_GATE_VERSION 3 | #define G_GATE_VERSION 3 | ||||
▲ Show 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | struct callout sc_callout; /* P: (modified only | ||||
thread) */ | thread) */ | ||||
uintptr_t sc_seq; /* P: (modified only | uintptr_t sc_seq; /* P: (modified only | ||||
from g_down | from g_down | ||||
thread) */ | thread) */ | ||||
LIST_ENTRY(g_gate_softc) sc_next; /* P: g_gate_list_mtx */ | LIST_ENTRY(g_gate_softc) sc_next; /* P: g_gate_list_mtx */ | ||||
char sc_info[G_GATE_INFOSIZE]; /* P: (read-only) */ | char sc_info[G_GATE_INFOSIZE]; /* P: (read-only) */ | ||||
}; | }; | ||||
#define G_GATE_DEBUG(lvl, ...) do { \ | #define G_GATE_DEBUG(lvl, ...) \ | ||||
if (g_gate_debug >= (lvl)) { \ | _GEOM_DEBUG("GEOM_GATE", g_gate_debug, (lvl), NULL, __VA_ARGS__) | ||||
printf("GEOM_GATE"); \ | #define G_GATE_LOGREQ(lvl, bp, ...) \ | ||||
if (g_gate_debug > 0) \ | _GEOM_DEBUG("GEOM_GATE", g_gate_debug, (lvl), (bp), __VA_ARGS__) | ||||
printf("[%u]", lvl); \ | |||||
printf(": "); \ | |||||
printf(__VA_ARGS__); \ | |||||
printf("\n"); \ | |||||
} \ | |||||
} while (0) | |||||
#define G_GATE_LOGREQ(lvl, bp, ...) do { \ | |||||
if (g_gate_debug >= (lvl)) { \ | |||||
printf("GEOM_GATE"); \ | |||||
if (g_gate_debug > 0) \ | |||||
printf("[%u]", lvl); \ | |||||
printf(": "); \ | |||||
printf(__VA_ARGS__); \ | |||||
printf(" "); \ | |||||
g_print_bio(bp); \ | |||||
printf("\n"); \ | |||||
} \ | |||||
} while (0) | |||||
#endif /* !_KERNEL */ | #endif /* !_KERNEL */ | ||||
struct g_gate_ctl_create { | struct g_gate_ctl_create { | ||||
u_int gctl_version; | u_int gctl_version; | ||||
off_t gctl_mediasize; | off_t gctl_mediasize; | ||||
u_int gctl_sectorsize; | u_int gctl_sectorsize; | ||||
u_int gctl_flags; | u_int gctl_flags; | ||||
u_int gctl_maxcount; | u_int gctl_maxcount; | ||||
▲ Show 20 Lines • Show All 47 Lines • Show Last 20 Lines |