All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, pbonzini@redhat.com, kwolf@redhat.com,
	stefanha@redhat.com, Max Reitz <mreitz@redhat.com>,
	Jeff Cody <jcody@redhat.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Anthony Perard <anthony.perard@citrix.com>,
	John Snow <jsnow@redhat.com>,
	"open list:X86" <xen-devel@lists.xensource.com>
Subject: [Qemu-devel] [PATCH v2 05/19] block: Convert BB interface to byte-based discards
Date: Fri, 15 Jul 2016 17:22:54 -0600	[thread overview]
Message-ID: <1468624988-423-6-git-send-email-eblake@redhat.com> (raw)
In-Reply-To: <1468624988-423-1-git-send-email-eblake@redhat.com>

Change sector-based blk_discard(), blk_co_discard(), and
blk_aio_discard() to instead be byte-based blk_pdiscard(),
blk_co_pdiscard(), and blk_aio_pdiscard().  NBD gets a lot
simpler now that ignoring the unaligned portion of a
byte-based discard request is handled under the hood by
the block layer.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

---
v2: tweak commit message for grep'ability
---
 include/sysemu/block-backend.h |  9 ++++-----
 block/block-backend.c          | 25 +++++++++++--------------
 block/mirror.c                 |  5 +++--
 hw/block/xen_disk.c            |  7 ++++---
 hw/ide/core.c                  |  6 ++++--
 hw/scsi/scsi-disk.c            |  8 ++++----
 nbd/server.c                   | 19 +++++--------------
 qemu-io-cmds.c                 |  3 +--
 8 files changed, 36 insertions(+), 46 deletions(-)

diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h
index 3c3e82f..2da4905 100644
--- a/include/sysemu/block-backend.h
+++ b/include/sysemu/block-backend.h
@@ -139,15 +139,14 @@ BlockAIOCB *blk_aio_pwritev(BlockBackend *blk, int64_t offset,
                             BlockCompletionFunc *cb, void *opaque);
 BlockAIOCB *blk_aio_flush(BlockBackend *blk,
                           BlockCompletionFunc *cb, void *opaque);
-BlockAIOCB *blk_aio_discard(BlockBackend *blk,
-                            int64_t sector_num, int nb_sectors,
-                            BlockCompletionFunc *cb, void *opaque);
+BlockAIOCB *blk_aio_pdiscard(BlockBackend *blk, int64_t offset, int count,
+                             BlockCompletionFunc *cb, void *opaque);
 void blk_aio_cancel(BlockAIOCB *acb);
 void blk_aio_cancel_async(BlockAIOCB *acb);
 int blk_ioctl(BlockBackend *blk, unsigned long int req, void *buf);
 BlockAIOCB *blk_aio_ioctl(BlockBackend *blk, unsigned long int req, void *buf,
                           BlockCompletionFunc *cb, void *opaque);
-int blk_co_discard(BlockBackend *blk, int64_t sector_num, int nb_sectors);
+int blk_co_pdiscard(BlockBackend *blk, int64_t offset, int count);
 int blk_co_flush(BlockBackend *blk);
 int blk_flush(BlockBackend *blk);
 int blk_flush_all(void);
@@ -207,7 +206,7 @@ int coroutine_fn blk_co_pwrite_zeroes(BlockBackend *blk, int64_t offset,
 int blk_write_compressed(BlockBackend *blk, int64_t sector_num,
                          const uint8_t *buf, int nb_sectors);
 int blk_truncate(BlockBackend *blk, int64_t offset);
-int blk_discard(BlockBackend *blk, int64_t sector_num, int nb_sectors);
+int blk_pdiscard(BlockBackend *blk, int64_t offset, int count);
 int blk_save_vmstate(BlockBackend *blk, const uint8_t *buf,
                      int64_t pos, int size);
 int blk_load_vmstate(BlockBackend *blk, uint8_t *buf, int64_t pos, int size);
diff --git a/block/block-backend.c b/block/block-backend.c
index 8b16b95..effa038 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -1065,17 +1065,16 @@ BlockAIOCB *blk_aio_flush(BlockBackend *blk,
     return bdrv_aio_flush(blk_bs(blk), cb, opaque);
 }

-BlockAIOCB *blk_aio_discard(BlockBackend *blk,
-                            int64_t sector_num, int nb_sectors,
-                            BlockCompletionFunc *cb, void *opaque)
+BlockAIOCB *blk_aio_pdiscard(BlockBackend *blk,
+                             int64_t offset, int count,
+                             BlockCompletionFunc *cb, void *opaque)
 {
-    int ret = blk_check_request(blk, sector_num, nb_sectors);
+    int ret = blk_check_byte_request(blk, offset, count);
     if (ret < 0) {
         return blk_abort_aio_request(blk, cb, opaque, ret);
     }

-    return bdrv_aio_pdiscard(blk_bs(blk), sector_num << BDRV_SECTOR_BITS,
-                             nb_sectors << BDRV_SECTOR_BITS, cb, opaque);
+    return bdrv_aio_pdiscard(blk_bs(blk), offset, count, cb, opaque);
 }

 void blk_aio_cancel(BlockAIOCB *acb)
@@ -1107,15 +1106,14 @@ BlockAIOCB *blk_aio_ioctl(BlockBackend *blk, unsigned long int req, void *buf,
     return bdrv_aio_ioctl(blk_bs(blk), req, buf, cb, opaque);
 }

-int blk_co_discard(BlockBackend *blk, int64_t sector_num, int nb_sectors)
+int blk_co_pdiscard(BlockBackend *blk, int64_t offset, int count)
 {
-    int ret = blk_check_request(blk, sector_num, nb_sectors);
+    int ret = blk_check_byte_request(blk, offset, count);
     if (ret < 0) {
         return ret;
     }

-    return bdrv_co_pdiscard(blk_bs(blk), sector_num << BDRV_SECTOR_BITS,
-                            nb_sectors << BDRV_SECTOR_BITS);
+    return bdrv_co_pdiscard(blk_bs(blk), offset, count);
 }

 int blk_co_flush(BlockBackend *blk)
@@ -1506,15 +1504,14 @@ int blk_truncate(BlockBackend *blk, int64_t offset)
     return bdrv_truncate(blk_bs(blk), offset);
 }

-int blk_discard(BlockBackend *blk, int64_t sector_num, int nb_sectors)
+int blk_pdiscard(BlockBackend *blk, int64_t offset, int count)
 {
-    int ret = blk_check_request(blk, sector_num, nb_sectors);
+    int ret = blk_check_byte_request(blk, offset, count);
     if (ret < 0) {
         return ret;
     }

-    return bdrv_pdiscard(blk_bs(blk), sector_num << BDRV_SECTOR_BITS,
-                         nb_sectors << BDRV_SECTOR_BITS);
+    return bdrv_pdiscard(blk_bs(blk), offset, count);
 }

 int blk_save_vmstate(BlockBackend *blk, const uint8_t *buf,
diff --git a/block/mirror.c b/block/mirror.c
index b1e633e..617bb18 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -303,8 +303,9 @@ static void mirror_do_zero_or_discard(MirrorBlockJob *s,
     s->in_flight++;
     s->sectors_in_flight += nb_sectors;
     if (is_discard) {
-        blk_aio_discard(s->target, sector_num, op->nb_sectors,
-                        mirror_write_complete, op);
+        blk_aio_pdiscard(s->target, sector_num << BDRV_SECTOR_BITS,
+                         op->nb_sectors << BDRV_SECTOR_BITS,
+                         mirror_write_complete, op);
     } else {
         blk_aio_pwrite_zeroes(s->target, sector_num * BDRV_SECTOR_SIZE,
                               op->nb_sectors * BDRV_SECTOR_SIZE,
diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c
index 90aca73..3b8ad33 100644
--- a/hw/block/xen_disk.c
+++ b/hw/block/xen_disk.c
@@ -574,9 +574,10 @@ static int ioreq_runio_qemu_aio(struct ioreq *ioreq)
     {
         struct blkif_request_discard *discard_req = (void *)&ioreq->req;
         ioreq->aio_inflight++;
-        blk_aio_discard(blkdev->blk,
-                        discard_req->sector_number, discard_req->nr_sectors,
-                        qemu_aio_complete, ioreq);
+        blk_aio_pdiscard(blkdev->blk,
+                         discard_req->sector_number << BDRV_SECTOR_BITS,
+                         discard_req->nr_sectors << BDRV_SECTOR_BITS,
+                         qemu_aio_complete, ioreq);
         break;
     }
     default:
diff --git a/hw/ide/core.c b/hw/ide/core.c
index f2d131b..894c4c8 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -423,8 +423,10 @@ static void ide_issue_trim_cb(void *opaque, int ret)
                 }

                 /* Got an entry! Submit and exit.  */
-                iocb->aiocb = blk_aio_discard(iocb->blk, sector, count,
-                                              ide_issue_trim_cb, opaque);
+                iocb->aiocb = blk_aio_pdiscard(iocb->blk,
+                                               sector << BDRV_SECTOR_BITS,
+                                               count << BDRV_SECTOR_BITS,
+                                               ide_issue_trim_cb, opaque);
                 return;
             }

diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
index 8dbfc10..836a155 100644
--- a/hw/scsi/scsi-disk.c
+++ b/hw/scsi/scsi-disk.c
@@ -1609,10 +1609,10 @@ static void scsi_unmap_complete_noio(UnmapCBData *data, int ret)
             goto done;
         }

-        r->req.aiocb = blk_aio_discard(s->qdev.conf.blk,
-                                       sector_num * (s->qdev.blocksize / 512),
-                                       nb_sectors * (s->qdev.blocksize / 512),
-                                       scsi_unmap_complete, data);
+        r->req.aiocb = blk_aio_pdiscard(s->qdev.conf.blk,
+                                        sector_num * s->qdev.blocksize,
+                                        nb_sectors * s->qdev.blocksize,
+                                        scsi_unmap_complete, data);
         data->count--;
         data->inbuf += 16;
         return;
diff --git a/nbd/server.c b/nbd/server.c
index fbc82de..29e2099 100644
--- a/nbd/server.c
+++ b/nbd/server.c
@@ -1182,20 +1182,11 @@ static void nbd_trip(void *opaque)
         break;
     case NBD_CMD_TRIM:
         TRACE("Request type is TRIM");
-        /* Ignore unaligned head or tail, until block layer adds byte
-         * interface */
-        if (request.len >= BDRV_SECTOR_SIZE) {
-            request.len -= (request.from + request.len) % BDRV_SECTOR_SIZE;
-            ret = blk_co_discard(exp->blk,
-                                 DIV_ROUND_UP(request.from + exp->dev_offset,
-                                              BDRV_SECTOR_SIZE),
-                                 request.len / BDRV_SECTOR_SIZE);
-            if (ret < 0) {
-                LOG("discard failed");
-                reply.error = -ret;
-            }
-        } else {
-            TRACE("trim request too small, ignoring");
+        ret = blk_co_pdiscard(exp->blk, request.from + exp->dev_offset,
+                              request.len);
+        if (ret < 0) {
+            LOG("discard failed");
+            reply.error = -ret;
         }
         if (nbd_co_send_reply(req, &reply, 0) < 0) {
             goto out;
diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c
index 6e29edb..25954f5 100644
--- a/qemu-io-cmds.c
+++ b/qemu-io-cmds.c
@@ -1696,8 +1696,7 @@ static int discard_f(BlockBackend *blk, int argc, char **argv)
     }

     gettimeofday(&t1, NULL);
-    ret = blk_discard(blk, offset >> BDRV_SECTOR_BITS,
-                      count >> BDRV_SECTOR_BITS);
+    ret = blk_pdiscard(blk, offset, count);
     gettimeofday(&t2, NULL);

     if (ret < 0) {
-- 
2.5.5

WARNING: multiple messages have this Message-ID (diff)
From: Eric Blake <eblake@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, Stefano Stabellini <sstabellini@kernel.org>,
	qemu-block@nongnu.org, Jeff Cody <jcody@redhat.com>,
	Max Reitz <mreitz@redhat.com>,
	"open list:X86" <xen-devel@lists.xensource.com>,
	stefanha@redhat.com, Anthony Perard <anthony.perard@citrix.com>,
	pbonzini@redhat.com, John Snow <jsnow@redhat.com>
Subject: [PATCH v2 05/19] block: Convert BB interface to byte-based discards
Date: Fri, 15 Jul 2016 17:22:54 -0600	[thread overview]
Message-ID: <1468624988-423-6-git-send-email-eblake@redhat.com> (raw)
In-Reply-To: <1468624988-423-1-git-send-email-eblake@redhat.com>

Change sector-based blk_discard(), blk_co_discard(), and
blk_aio_discard() to instead be byte-based blk_pdiscard(),
blk_co_pdiscard(), and blk_aio_pdiscard().  NBD gets a lot
simpler now that ignoring the unaligned portion of a
byte-based discard request is handled under the hood by
the block layer.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

---
v2: tweak commit message for grep'ability
---
 include/sysemu/block-backend.h |  9 ++++-----
 block/block-backend.c          | 25 +++++++++++--------------
 block/mirror.c                 |  5 +++--
 hw/block/xen_disk.c            |  7 ++++---
 hw/ide/core.c                  |  6 ++++--
 hw/scsi/scsi-disk.c            |  8 ++++----
 nbd/server.c                   | 19 +++++--------------
 qemu-io-cmds.c                 |  3 +--
 8 files changed, 36 insertions(+), 46 deletions(-)

diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h
index 3c3e82f..2da4905 100644
--- a/include/sysemu/block-backend.h
+++ b/include/sysemu/block-backend.h
@@ -139,15 +139,14 @@ BlockAIOCB *blk_aio_pwritev(BlockBackend *blk, int64_t offset,
                             BlockCompletionFunc *cb, void *opaque);
 BlockAIOCB *blk_aio_flush(BlockBackend *blk,
                           BlockCompletionFunc *cb, void *opaque);
-BlockAIOCB *blk_aio_discard(BlockBackend *blk,
-                            int64_t sector_num, int nb_sectors,
-                            BlockCompletionFunc *cb, void *opaque);
+BlockAIOCB *blk_aio_pdiscard(BlockBackend *blk, int64_t offset, int count,
+                             BlockCompletionFunc *cb, void *opaque);
 void blk_aio_cancel(BlockAIOCB *acb);
 void blk_aio_cancel_async(BlockAIOCB *acb);
 int blk_ioctl(BlockBackend *blk, unsigned long int req, void *buf);
 BlockAIOCB *blk_aio_ioctl(BlockBackend *blk, unsigned long int req, void *buf,
                           BlockCompletionFunc *cb, void *opaque);
-int blk_co_discard(BlockBackend *blk, int64_t sector_num, int nb_sectors);
+int blk_co_pdiscard(BlockBackend *blk, int64_t offset, int count);
 int blk_co_flush(BlockBackend *blk);
 int blk_flush(BlockBackend *blk);
 int blk_flush_all(void);
@@ -207,7 +206,7 @@ int coroutine_fn blk_co_pwrite_zeroes(BlockBackend *blk, int64_t offset,
 int blk_write_compressed(BlockBackend *blk, int64_t sector_num,
                          const uint8_t *buf, int nb_sectors);
 int blk_truncate(BlockBackend *blk, int64_t offset);
-int blk_discard(BlockBackend *blk, int64_t sector_num, int nb_sectors);
+int blk_pdiscard(BlockBackend *blk, int64_t offset, int count);
 int blk_save_vmstate(BlockBackend *blk, const uint8_t *buf,
                      int64_t pos, int size);
 int blk_load_vmstate(BlockBackend *blk, uint8_t *buf, int64_t pos, int size);
diff --git a/block/block-backend.c b/block/block-backend.c
index 8b16b95..effa038 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -1065,17 +1065,16 @@ BlockAIOCB *blk_aio_flush(BlockBackend *blk,
     return bdrv_aio_flush(blk_bs(blk), cb, opaque);
 }

-BlockAIOCB *blk_aio_discard(BlockBackend *blk,
-                            int64_t sector_num, int nb_sectors,
-                            BlockCompletionFunc *cb, void *opaque)
+BlockAIOCB *blk_aio_pdiscard(BlockBackend *blk,
+                             int64_t offset, int count,
+                             BlockCompletionFunc *cb, void *opaque)
 {
-    int ret = blk_check_request(blk, sector_num, nb_sectors);
+    int ret = blk_check_byte_request(blk, offset, count);
     if (ret < 0) {
         return blk_abort_aio_request(blk, cb, opaque, ret);
     }

-    return bdrv_aio_pdiscard(blk_bs(blk), sector_num << BDRV_SECTOR_BITS,
-                             nb_sectors << BDRV_SECTOR_BITS, cb, opaque);
+    return bdrv_aio_pdiscard(blk_bs(blk), offset, count, cb, opaque);
 }

 void blk_aio_cancel(BlockAIOCB *acb)
@@ -1107,15 +1106,14 @@ BlockAIOCB *blk_aio_ioctl(BlockBackend *blk, unsigned long int req, void *buf,
     return bdrv_aio_ioctl(blk_bs(blk), req, buf, cb, opaque);
 }

-int blk_co_discard(BlockBackend *blk, int64_t sector_num, int nb_sectors)
+int blk_co_pdiscard(BlockBackend *blk, int64_t offset, int count)
 {
-    int ret = blk_check_request(blk, sector_num, nb_sectors);
+    int ret = blk_check_byte_request(blk, offset, count);
     if (ret < 0) {
         return ret;
     }

-    return bdrv_co_pdiscard(blk_bs(blk), sector_num << BDRV_SECTOR_BITS,
-                            nb_sectors << BDRV_SECTOR_BITS);
+    return bdrv_co_pdiscard(blk_bs(blk), offset, count);
 }

 int blk_co_flush(BlockBackend *blk)
@@ -1506,15 +1504,14 @@ int blk_truncate(BlockBackend *blk, int64_t offset)
     return bdrv_truncate(blk_bs(blk), offset);
 }

-int blk_discard(BlockBackend *blk, int64_t sector_num, int nb_sectors)
+int blk_pdiscard(BlockBackend *blk, int64_t offset, int count)
 {
-    int ret = blk_check_request(blk, sector_num, nb_sectors);
+    int ret = blk_check_byte_request(blk, offset, count);
     if (ret < 0) {
         return ret;
     }

-    return bdrv_pdiscard(blk_bs(blk), sector_num << BDRV_SECTOR_BITS,
-                         nb_sectors << BDRV_SECTOR_BITS);
+    return bdrv_pdiscard(blk_bs(blk), offset, count);
 }

 int blk_save_vmstate(BlockBackend *blk, const uint8_t *buf,
diff --git a/block/mirror.c b/block/mirror.c
index b1e633e..617bb18 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -303,8 +303,9 @@ static void mirror_do_zero_or_discard(MirrorBlockJob *s,
     s->in_flight++;
     s->sectors_in_flight += nb_sectors;
     if (is_discard) {
-        blk_aio_discard(s->target, sector_num, op->nb_sectors,
-                        mirror_write_complete, op);
+        blk_aio_pdiscard(s->target, sector_num << BDRV_SECTOR_BITS,
+                         op->nb_sectors << BDRV_SECTOR_BITS,
+                         mirror_write_complete, op);
     } else {
         blk_aio_pwrite_zeroes(s->target, sector_num * BDRV_SECTOR_SIZE,
                               op->nb_sectors * BDRV_SECTOR_SIZE,
diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c
index 90aca73..3b8ad33 100644
--- a/hw/block/xen_disk.c
+++ b/hw/block/xen_disk.c
@@ -574,9 +574,10 @@ static int ioreq_runio_qemu_aio(struct ioreq *ioreq)
     {
         struct blkif_request_discard *discard_req = (void *)&ioreq->req;
         ioreq->aio_inflight++;
-        blk_aio_discard(blkdev->blk,
-                        discard_req->sector_number, discard_req->nr_sectors,
-                        qemu_aio_complete, ioreq);
+        blk_aio_pdiscard(blkdev->blk,
+                         discard_req->sector_number << BDRV_SECTOR_BITS,
+                         discard_req->nr_sectors << BDRV_SECTOR_BITS,
+                         qemu_aio_complete, ioreq);
         break;
     }
     default:
diff --git a/hw/ide/core.c b/hw/ide/core.c
index f2d131b..894c4c8 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -423,8 +423,10 @@ static void ide_issue_trim_cb(void *opaque, int ret)
                 }

                 /* Got an entry! Submit and exit.  */
-                iocb->aiocb = blk_aio_discard(iocb->blk, sector, count,
-                                              ide_issue_trim_cb, opaque);
+                iocb->aiocb = blk_aio_pdiscard(iocb->blk,
+                                               sector << BDRV_SECTOR_BITS,
+                                               count << BDRV_SECTOR_BITS,
+                                               ide_issue_trim_cb, opaque);
                 return;
             }

diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
index 8dbfc10..836a155 100644
--- a/hw/scsi/scsi-disk.c
+++ b/hw/scsi/scsi-disk.c
@@ -1609,10 +1609,10 @@ static void scsi_unmap_complete_noio(UnmapCBData *data, int ret)
             goto done;
         }

-        r->req.aiocb = blk_aio_discard(s->qdev.conf.blk,
-                                       sector_num * (s->qdev.blocksize / 512),
-                                       nb_sectors * (s->qdev.blocksize / 512),
-                                       scsi_unmap_complete, data);
+        r->req.aiocb = blk_aio_pdiscard(s->qdev.conf.blk,
+                                        sector_num * s->qdev.blocksize,
+                                        nb_sectors * s->qdev.blocksize,
+                                        scsi_unmap_complete, data);
         data->count--;
         data->inbuf += 16;
         return;
diff --git a/nbd/server.c b/nbd/server.c
index fbc82de..29e2099 100644
--- a/nbd/server.c
+++ b/nbd/server.c
@@ -1182,20 +1182,11 @@ static void nbd_trip(void *opaque)
         break;
     case NBD_CMD_TRIM:
         TRACE("Request type is TRIM");
-        /* Ignore unaligned head or tail, until block layer adds byte
-         * interface */
-        if (request.len >= BDRV_SECTOR_SIZE) {
-            request.len -= (request.from + request.len) % BDRV_SECTOR_SIZE;
-            ret = blk_co_discard(exp->blk,
-                                 DIV_ROUND_UP(request.from + exp->dev_offset,
-                                              BDRV_SECTOR_SIZE),
-                                 request.len / BDRV_SECTOR_SIZE);
-            if (ret < 0) {
-                LOG("discard failed");
-                reply.error = -ret;
-            }
-        } else {
-            TRACE("trim request too small, ignoring");
+        ret = blk_co_pdiscard(exp->blk, request.from + exp->dev_offset,
+                              request.len);
+        if (ret < 0) {
+            LOG("discard failed");
+            reply.error = -ret;
         }
         if (nbd_co_send_reply(req, &reply, 0) < 0) {
             goto out;
diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c
index 6e29edb..25954f5 100644
--- a/qemu-io-cmds.c
+++ b/qemu-io-cmds.c
@@ -1696,8 +1696,7 @@ static int discard_f(BlockBackend *blk, int argc, char **argv)
     }

     gettimeofday(&t1, NULL);
-    ret = blk_discard(blk, offset >> BDRV_SECTOR_BITS,
-                      count >> BDRV_SECTOR_BITS);
+    ret = blk_pdiscard(blk, offset, count);
     gettimeofday(&t2, NULL);

     if (ret < 0) {
-- 
2.5.5

  parent reply	other threads:[~2016-07-15 23:23 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-15 23:22 [Qemu-devel] [PATCH for-2.7 v2 00/19] byte-based block discard Eric Blake
2016-07-15 23:22 ` [Qemu-devel] [PATCH v2 01/19] block: Convert bdrv_co_discard() to byte-based Eric Blake
2016-07-15 23:22 ` [Qemu-devel] [PATCH v2 02/19] block: Convert bdrv_discard() " Eric Blake
2016-07-15 23:22 ` [Qemu-devel] [PATCH v2 03/19] block: Switch BlockRequest " Eric Blake
2016-07-15 23:22 ` [Qemu-devel] [PATCH v2 04/19] block: Convert bdrv_aio_discard() " Eric Blake
2016-07-15 23:22 ` Eric Blake [this message]
2016-07-15 23:22   ` [PATCH v2 05/19] block: Convert BB interface to byte-based discards Eric Blake
2016-07-15 23:22 ` [Qemu-devel] [PATCH v2 06/19] raw-posix: Switch paio_submit() to byte-based Eric Blake
2016-07-15 23:22 ` [Qemu-devel] [PATCH v2 07/19] rbd: Switch rbd_start_aio() " Eric Blake
2016-07-15 23:22 ` [Qemu-devel] [PATCH v2 08/19] block: Convert .bdrv_aio_discard() " Eric Blake
2016-07-15 23:22 ` [Qemu-devel] [PATCH v2 09/19] block: Add .bdrv_co_pdiscard() driver callback Eric Blake
2016-07-15 23:22 ` [Qemu-devel] [PATCH v2 10/19] blkreplay: Switch .bdrv_co_discard() to byte-based Eric Blake
2016-07-15 23:23 ` [Qemu-devel] [PATCH v2 11/19] gluster: " Eric Blake
2016-07-15 23:23 ` [Qemu-devel] [PATCH v2 12/19] iscsi: " Eric Blake
2016-07-15 23:23 ` [Qemu-devel] [PATCH v2 13/19] nbd: " Eric Blake
2016-07-15 23:23 ` [Qemu-devel] [PATCH v2 14/19] qcow2: " Eric Blake
2016-07-15 23:23 ` [Qemu-devel] [PATCH v2 15/19] raw_bsd: " Eric Blake
2016-07-15 23:23 ` [Qemu-devel] [PATCH v2 16/19] sheepdog: " Eric Blake
2016-07-15 23:23 ` [Qemu-devel] [PATCH v2 17/19] block: Kill .bdrv_co_discard() Eric Blake
2016-07-15 23:23 ` [Qemu-devel] [PATCH v2 18/19] nbd: Convert to byte-based interface Eric Blake
2016-07-15 23:23 ` [Qemu-devel] [PATCH v2 19/19] raw_bsd: " Eric Blake
2016-07-19 16:12 ` [Qemu-devel] [Qemu-block] [PATCH for-2.7 v2 00/19] byte-based block discard Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1468624988-423-6-git-send-email-eblake@redhat.com \
    --to=eblake@redhat.com \
    --cc=anthony.perard@citrix.com \
    --cc=jcody@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sstabellini@kernel.org \
    --cc=stefanha@redhat.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.