plugins/nbd/nbd.c
/* Trim a portion of the file. */
Trim a portion of the file.
Trim a portion of the file .
static int
nbd_trim (void *handle, uint32_t count, uint64_t offset, uint32_t flags)
{
  struct handle *h = handle;
  int c;
  assert (!(flags & ~NBDKIT_FLAG_FUA));
  c = nbd_request (h, flags & NBDKIT_FLAG_FUA ? NBD_CMD_FLAG_FUA : 0,
                   NBD_CMD_TRIM, offset, count);
  return c < 0 ? c : nbd_reply (h, c);
}
static int nbd_trim ( void * handle , uint32_t count , uint64_t offset , uint32_t flags ) { struct handle * h = handle ; int c ; assert ( ! ( flags & ~ NBDKIT_FLAG_FUA ) ) ; c = nbd_request ( h , flags & NBDKIT_FLAG_FUA ? NBD_CMD_FLAG_FUA : 0 , NBD_CMD_TRIM , offset , count ) ; return c < 0 ? c : nbd_reply ( h , c ) ; }
Trim a portion of the file.
Trim a portion of the file .