From: Eric Blake <eblake@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, kwolf@redhat.com,
Jeff Cody <jcody@redhat.com>, Max Reitz <mreitz@redhat.com>
Subject: [Qemu-devel] [PATCH 11/17] gluster: Switch .bdrv_co_discard() to byte-based
Date: Wed, 22 Jun 2016 09:51:08 -0600 [thread overview]
Message-ID: <1466610674-23157-12-git-send-email-eblake@redhat.com> (raw)
In-Reply-To: <1466610674-23157-1-git-send-email-eblake@redhat.com>
Another step towards killing off sector-based block APIs.
Signed-off-by: Eric Blake <eblake@redhat.com>
---
block/gluster.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/block/gluster.c b/block/gluster.c
index d361d8e..1ddf85d 100644
--- a/block/gluster.c
+++ b/block/gluster.c
@@ -670,14 +670,12 @@ error:
}
#ifdef CONFIG_GLUSTERFS_DISCARD
-static coroutine_fn int qemu_gluster_co_discard(BlockDriverState *bs,
- int64_t sector_num, int nb_sectors)
+static coroutine_fn int qemu_gluster_co_pdiscard(BlockDriverState *bs,
+ int64_t offset, int size)
{
int ret;
GlusterAIOCB acb;
BDRVGlusterState *s = bs->opaque;
- size_t size = nb_sectors * BDRV_SECTOR_SIZE;
- off_t offset = sector_num * BDRV_SECTOR_SIZE;
acb.size = 0;
acb.ret = 0;
@@ -764,7 +762,7 @@ static BlockDriver bdrv_gluster = {
.bdrv_co_flush_to_disk = qemu_gluster_co_flush_to_disk,
.bdrv_has_zero_init = qemu_gluster_has_zero_init,
#ifdef CONFIG_GLUSTERFS_DISCARD
- .bdrv_co_discard = qemu_gluster_co_discard,
+ .bdrv_co_pdiscard = qemu_gluster_co_pdiscard,
#endif
#ifdef CONFIG_GLUSTERFS_ZEROFILL
.bdrv_co_pwrite_zeroes = qemu_gluster_co_pwrite_zeroes,
@@ -791,7 +789,7 @@ static BlockDriver bdrv_gluster_tcp = {
.bdrv_co_flush_to_disk = qemu_gluster_co_flush_to_disk,
.bdrv_has_zero_init = qemu_gluster_has_zero_init,
#ifdef CONFIG_GLUSTERFS_DISCARD
- .bdrv_co_discard = qemu_gluster_co_discard,
+ .bdrv_co_pdiscard = qemu_gluster_co_pdiscard,
#endif
#ifdef CONFIG_GLUSTERFS_ZEROFILL
.bdrv_co_pwrite_zeroes = qemu_gluster_co_pwrite_zeroes,
@@ -818,7 +816,7 @@ static BlockDriver bdrv_gluster_unix = {
.bdrv_co_flush_to_disk = qemu_gluster_co_flush_to_disk,
.bdrv_has_zero_init = qemu_gluster_has_zero_init,
#ifdef CONFIG_GLUSTERFS_DISCARD
- .bdrv_co_discard = qemu_gluster_co_discard,
+ .bdrv_co_pdiscard = qemu_gluster_co_pdiscard,
#endif
#ifdef CONFIG_GLUSTERFS_ZEROFILL
.bdrv_co_pwrite_zeroes = qemu_gluster_co_pwrite_zeroes,
@@ -845,7 +843,7 @@ static BlockDriver bdrv_gluster_rdma = {
.bdrv_co_flush_to_disk = qemu_gluster_co_flush_to_disk,
.bdrv_has_zero_init = qemu_gluster_has_zero_init,
#ifdef CONFIG_GLUSTERFS_DISCARD
- .bdrv_co_discard = qemu_gluster_co_discard,
+ .bdrv_co_pdiscard = qemu_gluster_co_pdiscard,
#endif
#ifdef CONFIG_GLUSTERFS_ZEROFILL
.bdrv_co_pwrite_zeroes = qemu_gluster_co_pwrite_zeroes,
--
2.5.5
next prev parent reply other threads:[~2016-06-22 15:51 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-22 15:50 [Qemu-devel] [PATCH 00/17] byte-based block discard Eric Blake
2016-06-22 15:50 ` [Qemu-devel] [PATCH 01/17] block: Convert bdrv_co_discard() to byte-based Eric Blake
2016-07-14 12:15 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2016-07-15 21:42 ` [Qemu-devel] " Eric Blake
2016-06-22 15:50 ` [Qemu-devel] [PATCH 02/17] block: Convert bdrv_discard() " Eric Blake
2016-07-14 12:15 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2016-06-22 15:51 ` [Qemu-devel] [PATCH 03/17] block: Switch BlockRequest " Eric Blake
2016-07-14 12:15 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2016-07-14 12:33 ` Eric Blake
2016-06-22 15:51 ` [Qemu-devel] [PATCH 04/17] block: Convert bdrv_aio_discard() " Eric Blake
2016-07-14 12:16 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2016-06-22 15:51 ` [Qemu-devel] [PATCH 05/17] block: Convert BB interface to byte-based discards Eric Blake
2016-07-14 12:16 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2016-06-22 15:51 ` [Qemu-devel] [PATCH 06/17] raw-posix: Switch paio_submit() to byte-based Eric Blake
2016-07-14 12:16 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2016-06-22 15:51 ` [Qemu-devel] [PATCH 07/17] rbd: Switch rbd_start_aio() " Eric Blake
2016-07-14 12:16 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2016-06-22 15:51 ` [Qemu-devel] [PATCH 08/17] block: Convert .bdrv_aio_discard() " Eric Blake
2016-07-14 12:16 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2016-06-22 15:51 ` [Qemu-devel] [PATCH 09/17] block: Add .bdrv_co_pdiscard() driver callback Eric Blake
2016-07-14 12:16 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2016-06-22 15:51 ` [Qemu-devel] [PATCH 10/17] blkreplay: Switch .bdrv_co_discard() to byte-based Eric Blake
2016-07-14 12:16 ` Stefan Hajnoczi
2016-06-22 15:51 ` Eric Blake [this message]
2016-07-14 12:16 ` [Qemu-devel] [Qemu-block] [PATCH 11/17] gluster: " Stefan Hajnoczi
2016-06-22 15:51 ` [Qemu-devel] [PATCH 12/17] iscsi: " Eric Blake
2016-07-14 12:16 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2016-06-22 15:51 ` [Qemu-devel] [PATCH 13/17] nbd: " Eric Blake
2016-07-14 12:16 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2016-06-22 15:51 ` [Qemu-devel] [PATCH 14/17] qcow2: " Eric Blake
2016-07-14 12:16 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2016-06-22 15:51 ` [Qemu-devel] [PATCH 15/17] raw_bsd: " Eric Blake
2016-07-14 12:16 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2016-06-22 15:51 ` [Qemu-devel] [PATCH 16/17] sheepdog: " Eric Blake
2016-07-14 12:16 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2016-06-22 15:51 ` [Qemu-devel] [PATCH 17/17] block: Kill .bdrv_co_discard() Eric Blake
2016-07-14 12:16 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2016-07-14 12:30 ` [Qemu-devel] [PATCH 00/17] byte-based block discard Eric Blake
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=1466610674-23157-12-git-send-email-eblake@redhat.com \
--to=eblake@redhat.com \
--cc=jcody@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).