[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] xen_disk: add discard support
From: |
Olaf Hering |
Subject: |
Re: [Qemu-devel] [PATCH] xen_disk: add discard support |
Date: |
Mon, 3 Feb 2014 17:03:25 +0100 |
User-agent: |
Mutt/1.5.22.rev6346 (2013-10-29) |
On Mon, Feb 03, Kevin Wolf wrote:
> Am 30.01.2014 um 16:02 hat Olaf Hering geschrieben:
> > + 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.
>
> If we do want to introduce accounting for discards, I'm not sure whether
> counting them as writes or giving them their own category makes more
> sense.
This line was just copied. I have to look how virtio does it, maybe I
copied it from there. No problem with removing it from my side.
But I think in the end a discard is also a write, isnt it?
Olaf