On 08.05.20 20:03, Eric Blake wrote: > Upcoming patches want to add some basic bitmap manipulation abilities > to qemu-img. But blockdev.o is too heavyweight to link into qemu-img > (among other things, it would drag in block jobs and transaction > support - qemu-img does offline manipulation, where atomicity is less > important because there are no concurrent modifications to compete > with), so it's time to split off the bare bones of what we will need > into a new file block/monitor/bitmap-qmp-cmds.o. > > This is sufficient to expose 6 QMP commands for use by qemu-img (add, > remove, clear, enable, disable, merge), as well as move the three > helper functions touched in the previous patch. Regarding > MAINTAINERS, the new file is automatically part of block core, but > also makes sense as related to other dirty bitmap files. > > Signed-off-by: Eric Blake <ebl...@redhat.com> > --- > Makefile.objs | 3 +- > block/monitor/bitmap-qmp-cmds.c | 323 ++++++++++++++++++++++++++++++++ > blockdev.c | 284 ---------------------------- > MAINTAINERS | 1 + > block/monitor/Makefile.objs | 1 + > 5 files changed, 326 insertions(+), 286 deletions(-) > create mode 100644 block/monitor/bitmap-qmp-cmds.c > > diff --git a/Makefile.objs b/Makefile.objs > index a7c967633acf..99774cfd2545 100644 > --- a/Makefile.objs > +++ b/Makefile.objs > @@ -13,9 +13,8 @@ chardev-obj-y = chardev/ > > authz-obj-y = authz/ > > -block-obj-y = nbd/ > +block-obj-y = block/ block/monitor/ nbd/ scsi/
This reads weird because it’s precisely the monitor that we don’t want in qemu-img. But I suppose block/monitor is the natural place for block functions that are to be used by the monitor (and maybe other parties like qemu-img). And the monitor itself would never be placed under block/. So I suppose it does make sense and I have no better suggestion. Reviewed-by: Max Reitz <mre...@redhat.com>
signature.asc
Description: OpenPGP digital signature