[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 1/9] block: add bdrv_measure() API
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH v5 1/9] block: add bdrv_measure() API |
Date: |
Thu, 20 Apr 2017 11:49:02 +0100 |
User-agent: |
Mutt/1.8.0 (2017-02-23) |
On Wed, Apr 19, 2017 at 08:32:06AM -0500, Eric Blake wrote:
> On 04/19/2017 08:27 AM, Stefan Hajnoczi wrote:
>
> >>
> >> I know we haven't done a good job in the past, but should we start
> >> trying to do better at documenting callback constraints of new things
> >> added in this header?
> >
> > .bdrv_measure() is a 1:1 pass-through of the public bdrv_measure()
> > function. All the public function does is to dereference
> > drv->bdrv_measure.
> >
> > I think that's why many of the other callbacks also have no
> > documentation - they inherit semantics from the public function. We
> > don't need to duplicate the doc comments.
>
> Sometimes, though, there are slightly different semantics (for example,
> we guarantee that the parameters to the driver code have already been
> validated against image size, properly sliced-and-diced to match block
> limits, and so on), so that the drivers don't have to do as much work.
> Documenting these contract guarantees would be useful.
Fair enough.
> But as I said, it's not something we have to solve in this series.
Okay.
signature.asc
Description: PGP signature
[Qemu-devel] [PATCH v5 2/9] raw-format: add bdrv_measure() support, Stefan Hajnoczi, 2017/04/18
[Qemu-devel] [PATCH v5 4/9] qcow2: make refcount size calculation conservative, Stefan Hajnoczi, 2017/04/18
[Qemu-devel] [PATCH v5 3/9] qcow2: extract preallocation calculation function, Stefan Hajnoczi, 2017/04/18
[Qemu-devel] [PATCH v5 5/9] qcow2: extract image creation option parsing, Stefan Hajnoczi, 2017/04/18
[Qemu-devel] [PATCH v5 6/9] qcow2: add bdrv_measure() support, Stefan Hajnoczi, 2017/04/18
[Qemu-devel] [PATCH v5 7/9] qemu-img: add measure subcommand, Stefan Hajnoczi, 2017/04/18
[Qemu-devel] [PATCH v5 8/9] qemu-iotests: support per-format golden output files, Stefan Hajnoczi, 2017/04/18
[Qemu-devel] [PATCH v5 9/9] iotests: add test 178 for qemu-img measure, Stefan Hajnoczi, 2017/04/18