diff options
author | pjd <pjd@FreeBSD.org> | 2012-07-04 20:16:28 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2012-07-04 20:16:28 +0000 |
commit | 5ef9eb30da6a8c09fc9ae0ae312ccd23e820e006 (patch) | |
tree | abea9b92119e3f02fec250110374237f2f6b3c2a /sys/geom/gate/g_gate.h | |
parent | 8cbf06904c76a2c9ed6b6e796cc669bb7b92e090 (diff) | |
download | FreeBSD-src-5ef9eb30da6a8c09fc9ae0ae312ccd23e820e006.zip FreeBSD-src-5ef9eb30da6a8c09fc9ae0ae312ccd23e820e006.tar.gz |
Extend GEOM Gate class to handle read I/O requests directly within the kernel.
This will allow HAST to read directly from the local component without
even communicating userland daemon.
Sponsored by: Panzura, http://www.panzura.com
MFC after: 1 month
Diffstat (limited to 'sys/geom/gate/g_gate.h')
-rw-r--r-- | sys/geom/gate/g_gate.h | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/sys/geom/gate/g_gate.h b/sys/geom/gate/g_gate.h index 0a57ce3..b0c563b 100644 --- a/sys/geom/gate/g_gate.h +++ b/sys/geom/gate/g_gate.h @@ -41,7 +41,7 @@ #define G_GATE_MOD_NAME "ggate" #define G_GATE_CTL_NAME "ggctl" -#define G_GATE_VERSION 2 +#define G_GATE_VERSION 3 /* * Maximum number of request that can be stored in @@ -64,10 +64,11 @@ #define G_GATE_NAME_GIVEN (-2) #define G_GATE_CMD_CREATE _IOWR('m', 0, struct g_gate_ctl_create) -#define G_GATE_CMD_DESTROY _IOWR('m', 1, struct g_gate_ctl_destroy) -#define G_GATE_CMD_CANCEL _IOWR('m', 2, struct g_gate_ctl_cancel) -#define G_GATE_CMD_START _IOWR('m', 3, struct g_gate_ctl_io) -#define G_GATE_CMD_DONE _IOWR('m', 4, struct g_gate_ctl_io) +#define G_GATE_CMD_MODIFY _IOWR('m', 1, struct g_gate_ctl_modify) +#define G_GATE_CMD_DESTROY _IOWR('m', 2, struct g_gate_ctl_destroy) +#define G_GATE_CMD_CANCEL _IOWR('m', 3, struct g_gate_ctl_cancel) +#define G_GATE_CMD_START _IOWR('m', 4, struct g_gate_ctl_io) +#define G_GATE_CMD_DONE _IOWR('m', 5, struct g_gate_ctl_io) #define G_GATE_INFOSIZE 2048 @@ -88,6 +89,8 @@ struct g_gate_softc { uint32_t sc_queue_count; /* P: sc_queue_mtx */ uint32_t sc_queue_size; /* P: (read-only) */ u_int sc_timeout; /* P: (read-only) */ + struct g_consumer *sc_readcons; /* P: XXX */ + off_t sc_readoffset; /* P: XXX */ struct callout sc_callout; /* P: (modified only from callout thread) */ @@ -131,9 +134,25 @@ struct g_gate_ctl_create { u_int gctl_timeout; char gctl_name[NAME_MAX]; char gctl_info[G_GATE_INFOSIZE]; + char gctl_readprov[NAME_MAX]; + off_t gctl_readoffset; int gctl_unit; /* in/out */ }; +#define GG_MODIFY_MEDIASIZE 0x01 +#define GG_MODIFY_INFO 0x02 +#define GG_MODIFY_READPROV 0x04 +#define GG_MODIFY_READOFFSET 0x08 +struct g_gate_ctl_modify { + u_int gctl_version; + int gctl_unit; + uint32_t gctl_modify; + off_t gctl_mediasize; + char gctl_info[G_GATE_INFOSIZE]; + char gctl_readprov[NAME_MAX]; + off_t gctl_readoffset; +}; + struct g_gate_ctl_destroy { u_int gctl_version; int gctl_unit; |