qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH v2 3/8] ide: account UNMAP (TRIM) operations


From: Anton Nefedov
Subject: Re: [Qemu-block] [PATCH v2 3/8] ide: account UNMAP (TRIM) operations
Date: Tue, 23 Jan 2018 13:39:08 +0300
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2



On 22/1/2018 11:48 PM, Eric Blake wrote:
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?

Quite easy, they already are :)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]