+int blk_make_zero(BlockBackend *blk, BdrvRequestFlags flags);
+int64_t blk_nb_sectors(BlockBackend *blk);

I’d have considered this an I/O function, and blk_getlength() is classified as such.  Why not this?

This one by itself is only invoked under BQL. I believe in facts that in migration/block.c is always wrapped by qemu_mutex_{lock/unlock}_iothread()
pairs.

But on the other side, as you said, semantically maybe it makes more sense to put it as I/O. Also its bdrv_ counterpart, bdrv_nb_sectors, is an I/O so you are right.

+int blk_probe_geometry(BlockBackend *blk, HDGeometry *geo);
+BlockAIOCB *blk_abort_aio_request(BlockBackend *blk,
+                                  BlockCompletionFunc *cb,
+                                  void *opaque, int ret);

This sounds more like an I/O function to me.


Semantically might make sense as an I/O. Functionally I don't see any iothread using it.

I agree with the rest of the comments.

Thank you,
Emanuele


Reply via email to