From 59ddd35512af0fe87a5e92a748b0cb6e4649a1f8 Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Sun, 14 Jun 2020 00:04:38 -0700 Subject: [PATCH] ignore _DELETE and _FLUSH for now... this makes ZFS work... --- ggated/ggated.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ggated/ggated.c b/ggated/ggated.c index e516af0..badba44 100644 --- a/ggated/ggated.c +++ b/ggated/ggated.c @@ -540,7 +540,7 @@ connection_launch(struct ggd_connection *conn) g_gate_log(LOG_ERR, "Cannot fork: %s.", strerror(errno)); return; } - g_gate_log(LOG_DEBUG, "Process created [%s].", conn->c_path); + g_gate_log(LOG_DEBUG, "Process created [%s], pid: %d.", conn->c_path, getpid()); /* * Create condition variables and mutexes for in-queue and out-queue @@ -723,7 +723,7 @@ disk_thread(void *arg) /* * Check the request. */ - assert(req->r_cmd == GGATE_CMD_READ || req->r_cmd == GGATE_CMD_WRITE); + assert(req->r_cmd == GGATE_CMD_READ || req->r_cmd == GGATE_CMD_WRITE || req->r_cmd == GGATE_CMD_DELETE || req->r_cmd == GGATE_CMD_FLUSH); assert(req->r_offset + req->r_length <= (uintmax_t)conn->c_mediasize); assert((req->r_offset % conn->c_sectorsize) == 0); assert((req->r_length % conn->c_sectorsize) == 0); @@ -747,6 +747,10 @@ disk_thread(void *arg) free(req->r_data); req->r_data = NULL; break; + case GGATE_CMD_DELETE: + case GGATE_CMD_FLUSH: + /* do nothing for now */ + break; } if (data != (ssize_t)req->r_length) { /* Report short reads/writes as I/O errors. */