Browse Source

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

tags/ggatessh-v1.0.0
John-Mark Gurney 4 years 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)); g_gate_log(LOG_ERR, "Cannot fork: %s.", strerror(errno));
return; 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 * Create condition variables and mutexes for in-queue and out-queue
@@ -723,7 +723,7 @@ disk_thread(void *arg)
/* /*
* Check the request. * 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 + req->r_length <= (uintmax_t)conn->c_mediasize);
assert((req->r_offset % conn->c_sectorsize) == 0); assert((req->r_offset % conn->c_sectorsize) == 0);
assert((req->r_length % conn->c_sectorsize) == 0); assert((req->r_length % conn->c_sectorsize) == 0);
@@ -747,6 +747,10 @@ disk_thread(void *arg)
free(req->r_data); free(req->r_data);
req->r_data = NULL; req->r_data = NULL;
break; break;
case GGATE_CMD_DELETE:
case GGATE_CMD_FLUSH:
/* do nothing for now */
break;
} }
if (data != (ssize_t)req->r_length) { if (data != (ssize_t)req->r_length) {
/* Report short reads/writes as I/O errors. */ /* Report short reads/writes as I/O errors. */


Loading…
Cancel
Save