Changeset View
Changeset View
Standalone View
Standalone View
head/sys/geom/nop/g_nop.h
Show All 28 Lines | |||||
*/ | */ | ||||
#ifndef _G_NOP_H_ | #ifndef _G_NOP_H_ | ||||
#define _G_NOP_H_ | #define _G_NOP_H_ | ||||
#define G_NOP_CLASS_NAME "NOP" | #define G_NOP_CLASS_NAME "NOP" | ||||
#define G_NOP_VERSION 4 | #define G_NOP_VERSION 4 | ||||
#define G_NOP_SUFFIX ".nop" | #define G_NOP_SUFFIX ".nop" | ||||
/* | |||||
* Special flag to instruct gnop to passthrough the underlying provider's | |||||
* physical path | |||||
*/ | |||||
#define G_NOP_PHYSPATH_PASSTHROUGH "\255" | |||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
#define G_NOP_DEBUG(lvl, ...) do { \ | #define G_NOP_DEBUG(lvl, ...) do { \ | ||||
if (g_nop_debug >= (lvl)) { \ | if (g_nop_debug >= (lvl)) { \ | ||||
printf("GEOM_NOP"); \ | printf("GEOM_NOP"); \ | ||||
if (g_nop_debug > 0) \ | if (g_nop_debug > 0) \ | ||||
printf("[%u]", lvl); \ | printf("[%u]", lvl); \ | ||||
printf(": "); \ | printf(": "); \ | ||||
Show All 25 Lines | struct g_nop_softc { | ||||
uintmax_t sc_deletes; | uintmax_t sc_deletes; | ||||
uintmax_t sc_getattrs; | uintmax_t sc_getattrs; | ||||
uintmax_t sc_flushes; | uintmax_t sc_flushes; | ||||
uintmax_t sc_cmd0s; | uintmax_t sc_cmd0s; | ||||
uintmax_t sc_cmd1s; | uintmax_t sc_cmd1s; | ||||
uintmax_t sc_cmd2s; | uintmax_t sc_cmd2s; | ||||
uintmax_t sc_readbytes; | uintmax_t sc_readbytes; | ||||
uintmax_t sc_wrotebytes; | uintmax_t sc_wrotebytes; | ||||
char* sc_physpath; | |||||
struct mtx sc_lock; | struct mtx sc_lock; | ||||
}; | }; | ||||
#endif /* _KERNEL */ | #endif /* _KERNEL */ | ||||
#endif /* _G_NOP_H_ */ | #endif /* _G_NOP_H_ */ |