Changeset View
Changeset View
Standalone View
Standalone View
sys/geom/mountver/g_mountver.h
Show All 32 Lines | |||||
#define _G_MOUNTVER_H_ | #define _G_MOUNTVER_H_ | ||||
#define G_MOUNTVER_CLASS_NAME "MOUNTVER" | #define G_MOUNTVER_CLASS_NAME "MOUNTVER" | ||||
#define G_MOUNTVER_VERSION 4 | #define G_MOUNTVER_VERSION 4 | ||||
#define G_MOUNTVER_SUFFIX ".mountver" | #define G_MOUNTVER_SUFFIX ".mountver" | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
#define G_MOUNTVER_DEBUG(lvl, ...) do { \ | #include <geom/geom_int.h> | ||||
if (g_mountver_debug >= (lvl)) { \ | |||||
printf("GEOM_MOUNTVER"); \ | #define G_MOUNTVER_DEBUG(lvl, ...) \ | ||||
if (g_mountver_debug > 0) \ | _GEOM_DEBUG("GEOM_MOUNTVER", g_mountver_debug, (lvl), NULL, __VA_ARGS__) | ||||
printf("[%u]", lvl); \ | #define G_MOUNTVER_LOGREQ(bp, ...) \ | ||||
printf(": "); \ | _GEOM_DEBUG("GEOM_MOUNTVER", g_mountver_debug, 2, (bp), __VA_ARGS__) | ||||
printf(__VA_ARGS__); \ | |||||
printf("\n"); \ | |||||
} \ | |||||
} while (0) | |||||
#define G_MOUNTVER_LOGREQ(bp, ...) do { \ | |||||
if (g_mountver_debug >= 2) { \ | |||||
printf("GEOM_MOUNTVER[2]: "); \ | |||||
printf(__VA_ARGS__); \ | |||||
printf(" "); \ | |||||
g_print_bio(bp); \ | |||||
printf("\n"); \ | |||||
} \ | |||||
} while (0) | |||||
struct g_mountver_softc { | struct g_mountver_softc { | ||||
TAILQ_HEAD(, bio) sc_queue; | TAILQ_HEAD(, bio) sc_queue; | ||||
struct mtx sc_mtx; | struct mtx sc_mtx; | ||||
char *sc_provider_name; | char *sc_provider_name; | ||||
char sc_ident[DISK_IDENT_SIZE]; | char sc_ident[DISK_IDENT_SIZE]; | ||||
int sc_orphaned; | int sc_orphaned; | ||||
int sc_shutting_down; | int sc_shutting_down; | ||||
int sc_access_r; | int sc_access_r; | ||||
int sc_access_w; | int sc_access_w; | ||||
int sc_access_e; | int sc_access_e; | ||||
}; | }; | ||||
#endif /* _KERNEL */ | #endif /* _KERNEL */ | ||||
#endif /* _G_MOUNTVER_H_ */ | #endif /* _G_MOUNTVER_H_ */ |