diff options
author | pjd <pjd@FreeBSD.org> | 2005-02-16 16:12:28 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2005-02-16 16:12:28 +0000 |
commit | a0cee6bbb3a874d29c0bd5cd867bc63877c7b349 (patch) | |
tree | b1f445a764a9a8a3a5157420ef37d43ee2b13711 | |
parent | 471fd11ce3f4096d37c15a3fb298633dd6c22a66 (diff) | |
download | FreeBSD-src-a0cee6bbb3a874d29c0bd5cd867bc63877c7b349.zip FreeBSD-src-a0cee6bbb3a874d29c0bd5cd867bc63877c7b349.tar.gz |
Remove TDP_GEOM flag from thread after ggate device creation.
This flag means "wait for all pending requests before returning to userland".
There are pending events for sure, because we just created new provider and
other classes want to taste it, but we cannot answer on I/O requests until
we're here.
-rw-r--r-- | sys/geom/gate/g_gate.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/geom/gate/g_gate.c b/sys/geom/gate/g_gate.c index 30e2ba3..b1f665f 100644 --- a/sys/geom/gate/g_gate.c +++ b/sys/geom/gate/g_gate.c @@ -463,6 +463,13 @@ g_gate_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, int flags, struct threa G_GATE_CHECK_VERSION(ggio); error = g_gate_create(ggio); + /* + * Reset TDP_GEOM flag. + * There are pending events for sure, because we just created + * new provider and other classes want to taste it, but we + * cannot answer on I/O requests until we're here. + */ + td->td_pflags &= ~TDP_GEOM; return (error); } case G_GATE_CMD_DESTROY: |