backend_can_zero (struct backend *b, struct connection *conn)
{
  struct b_conn_handle *h = &conn->handles[b->i];
  int r;

  debug ("%s: can_zero", b->name);

  if (h->can_zero == -1) {
    r = backend_can_write (b, conn);
    if (r != 1) {
      h->can_zero = NBDKIT_ZERO_NONE;
      return r; /* Relies on 0 == NBDKIT_ZERO_NONE */
    }
    h->can_zero = b->can_zero (b, conn);
  }
  return h->can_zero;
}
backend_can_zero (struct backend *b, struct connection *conn)
{
  struct b_conn_handle *h = &conn->handles[b->i];
  int r;

  debug ("%s: can_zero", b->name);

  if (h->can_zero == -1) {
    r = backend_can_write (b, conn);
    if (r != 1) {
      h->can_zero = NBDKIT_ZERO_NONE;
      return r;  
    }
    h->can_zero = b->can_zero (b, conn);
  }
  return h->can_zero;
}