[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH v9 3/9] block: add empty account cookie type
From: |
Alberto Garcia |
Subject: |
Re: [Qemu-block] [PATCH v9 3/9] block: add empty account cookie type |
Date: |
Mon, 09 Sep 2019 16:54:37 +0200 |
User-agent: |
Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) |
On Fri 06 Sep 2019 06:01:14 PM CEST, Anton Nefedov wrote:
> This adds some protection from accounting uninitialized cookie.
> That is, block_acct_failed/done without previous block_acct_start;
> in that case, cookie probably holds values from previous operation.
>
> (Note: it might also be uninitialized holding garbage value and there
> is still "< BLOCK_MAX_IOTYPE" assertion for that. So
> block_acct_failed/done without previous block_acct_start should be
> used with caution.)
>
> Currently this is particularly useful in ide code where it's hard to
> keep track whether the request started accounting or not. For example,
> trim requests do the accounting separately.
Sorry if I'm understanding it wrong, but it sounds like you know that
there's a bug in the ide code (where you call block_acct_done() without
having it initialized it first), and the purpose of the this patch is to
hide the bug ?
Berto
- [Qemu-block] [PATCH v9 0/9] discard blockstats, Anton Nefedov, 2019/09/06
- [Qemu-block] [PATCH v9 1/9] qapi: group BlockDeviceStats fields, Anton Nefedov, 2019/09/06
- [Qemu-block] [PATCH v9 3/9] block: add empty account cookie type, Anton Nefedov, 2019/09/06
- Re: [Qemu-block] [PATCH v9 3/9] block: add empty account cookie type,
Alberto Garcia <=
- [Qemu-block] [PATCH v9 2/9] qapi: add unmap to BlockDeviceStats, Anton Nefedov, 2019/09/06
- [Qemu-block] [PATCH v9 5/9] scsi: store unmap offset and nb_sectors in request struct, Anton Nefedov, 2019/09/06
- [Qemu-block] [PATCH v9 4/9] ide: account UNMAP (TRIM) operations, Anton Nefedov, 2019/09/06
- [Qemu-block] [PATCH v9 6/9] scsi: move unmap error checking to the complete callback, Anton Nefedov, 2019/09/06
- [Qemu-block] [PATCH v9 7/9] scsi: account unmap operations, Anton Nefedov, 2019/09/06
- [Qemu-block] [PATCH v9 9/9] qapi: query-blockstat: add driver specific file-posix stats, Anton Nefedov, 2019/09/06
- [Qemu-block] [PATCH v9 8/9] file-posix: account discard operations, Anton Nefedov, 2019/09/06
- Re: [PATCH v9 0/9] discard blockstats, Max Reitz, 2019/09/23