qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v4 04/25] include/sysemu/block-backend: split header into I/O


From: Emanuele Giuseppe Esposito
Subject: Re: [PATCH v4 04/25] include/sysemu/block-backend: split header into I/O and global state (GS) API
Date: Tue, 16 Nov 2021 11:16:38 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0


+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

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