On Tue, Oct 05, 2021 at 10:31:54AM -0400, Emanuele Giuseppe Esposito wrote: > Similarly to the previous patch, split block.h > in block-io.h and block-global-state.h > > block-common.h contains the structures shared between > the two headers, and the functions that can't be categorized as > I/O or global state.
This is nice from a code organization POV, but it doesn't do all that much from a code reviewer / author POV as I doubt anyone will remember which header file the respective APIs/structures/ constants are in, without having to look it up each time. It would make life easier if we had distinct namning conventions for APIs/struct/contsants in the respective headers. eg instead of "bdrv_" have "bdrv_state_" and "bdrv_io_" as the two naming conventions for -global-state.h and -io.h respectively, nad only use the bare 'bdrv_' for -common.h Yes, this would be major code churn, but I think it'd make the code clearer to understand which will be a win over the long term. NB, I'm not suggesting doing a rename as part of this patch though. Any rename would have to be separate, and likely split over many patches to make it manageable. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|