engines/glfs_async: add trim support

If available.

Signed-off-by: Jens Axboe <axboe@fb.com>
diff --git a/engines/glusterfs_async.c b/engines/glusterfs_async.c
index cf6ea70..f2b9818 100644
--- a/engines/glusterfs_async.c
+++ b/engines/glusterfs_async.c
@@ -120,6 +120,11 @@
 		r = glfs_pwrite_async(g->fd, io_u->xfer_buf, io_u->xfer_buflen,
 				      io_u->offset, 0, gf_async_cb,
 				      (void *)io_u);
+#if defined(CONFIG_GF_TRIM)
+	else if (io_u->ddir == DDIR_TRIM)
+		r = glfs_discard_async(g->fd, io_u->offset, io_u->xfer_buflen,
+				       gf_async_cb, io_u);
+#endif
 	else if (io_u->ddir == DDIR_SYNC) {
 		r = glfs_fsync_async(g->fd, gf_async_cb, (void *)io_u);
 	} else {