All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olaf Hering <olaf@aepfle.de>
To: Kevin Wolf <kwolf@redhat.com>, stefano.stabellini@eu.citrix.com
Cc: qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH] xen_disk: add discard support
Date: Tue, 4 Feb 2014 16:47:37 +0100	[thread overview]
Message-ID: <20140204154737.GA19903@aepfle.de> (raw)
In-Reply-To: <20140203154908.GO3643@dhcp-200-207.str.redhat.com>

On Mon, Feb 03, Kevin Wolf wrote:

> Am 30.01.2014 um 16:02 hat Olaf Hering geschrieben:
> > +++ b/hw/block/xen_disk.c

> > +    case BLKIF_OP_DISCARD:
> > +    {
> > +        struct blkif_request_discard *discard_req = (void *)&ioreq->req;
> > +        bdrv_acct_start(blkdev->bs, &ioreq->acct,
> > +                        discard_req->nr_sectors * BLOCK_SIZE, BDRV_ACCT_WRITE);
> 
> Neither SCSI nor IDE account for discards. I think we should keep the
> behaviour consistent across devices.

Stefano,did you already put this change into your queue?
I will resubmit the patch with the change below.

Olaf


diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c
index e74efc7..69ecc98 100644
--- a/hw/block/xen_disk.c
+++ b/hw/block/xen_disk.c
@@ -527,8 +527,6 @@ static int ioreq_runio_qemu_aio(struct ioreq *ioreq)
     case BLKIF_OP_DISCARD:
     {
         struct blkif_request_discard *discard_req = (void *)&ioreq->req;
-        bdrv_acct_start(blkdev->bs, &ioreq->acct,
-                        discard_req->nr_sectors * BLOCK_SIZE, BDRV_ACCT_WRITE);
         ioreq->aio_inflight++;
         bdrv_aio_discard(blkdev->bs,
                         discard_req->sector_number, discard_req->nr_sectors,

  parent reply	other threads:[~2014-02-04 18:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-30 15:02 [Qemu-devel] [PATCH] xen_disk: add discard support Olaf Hering
2014-01-30 15:22 ` Stefano Stabellini
2014-02-03 15:49 ` Kevin Wolf
2014-02-03 16:03   ` Olaf Hering
2014-02-03 16:21     ` Kevin Wolf
2014-02-03 16:12   ` Paolo Bonzini
2014-02-04 15:47   ` Olaf Hering [this message]
2014-02-04 15:49     ` Stefano Stabellini
2014-02-04 16:15     ` Kevin Wolf
2014-02-04 16:51       ` Olaf Hering
2014-02-04 16:58         ` Olaf Hering
2014-02-05 18:07           ` Stefano Stabellini

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=20140204154737.GA19903@aepfle.de \
    --to=olaf@aepfle.de \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=stefano.stabellini@eu.citrix.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.