Browse Source

ignore _DELETE and _FLUSH for now... this makes ZFS work...

main
John-Mark Gurney 4 months ago
parent
commit
59ddd35512
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      ggated/ggated.c

+ 6
- 2
ggated/ggated.c View File

@@ -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. */


Loading…
Cancel
Save