[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 3/8] ide: account UNMAP (TRIM) operations
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2 3/8] ide: account UNMAP (TRIM) operations |
Date: |
Mon, 22 Jan 2018 14:48:55 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 |
On 01/19/2018 06:50 AM, Anton Nefedov wrote:
> Signed-off-by: Anton Nefedov <address@hidden>
> ---
> hw/ide/core.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> @@ -460,10 +468,15 @@ static void ide_issue_trim_cb(void *opaque, int ret)
> }
>
> if (!ide_sect_range_ok(s, sector, count)) {
> + block_acct_invalid(blk_get_stats(s->blk),
> + BLOCK_ACCT_UNMAP);
> iocb->is_invalid = true;
> goto done;
> }
>
> + block_acct_start(blk_get_stats(s->blk), &s->acct,
> + count << BDRV_SECTOR_BITS,
> BLOCK_ACCT_UNMAP);
We're still mixing bytes- and block-based reporting; how easy or hard
would it be to flip block_acct_start() and friends to be byte-based?
But not the subject of this series, per se.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v2 0/8] discard blockstats, Anton Nefedov, 2018/01/19
- [Qemu-devel] [PATCH v2 1/8] qapi: group BlockDeviceStats fields, Anton Nefedov, 2018/01/19
- [Qemu-devel] [PATCH v2 2/8] qapi: add unmap to BlockDeviceStats, Anton Nefedov, 2018/01/19
- [Qemu-devel] [PATCH v2 4/8] scsi: store unmap offset and nb_sectors in request struct, Anton Nefedov, 2018/01/19
- [Qemu-devel] [PATCH v2 3/8] ide: account UNMAP (TRIM) operations, Anton Nefedov, 2018/01/19
- Re: [Qemu-devel] [PATCH v2 3/8] ide: account UNMAP (TRIM) operations,
Eric Blake <=
- [Qemu-devel] [PATCH v2 5/8] scsi: move unmap error checking to the complete callback, Anton Nefedov, 2018/01/19
- [Qemu-devel] [PATCH v2 6/8] scsi: account unmap operations, Anton Nefedov, 2018/01/19
- [Qemu-devel] [PATCH v2 8/8] qapi: query-blockstat: add driver specific file-posix stats, Anton Nefedov, 2018/01/19
- [Qemu-devel] [PATCH v2 7/8] file-posix: account discard operations, Anton Nefedov, 2018/01/19