From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52202) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDFkR-0000VG-DN for qemu-devel@nongnu.org; Wed, 15 Jun 2016 14:41:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDFkP-0002wG-8C for qemu-devel@nongnu.org; Wed, 15 Jun 2016 14:41:06 -0400 From: Colin Lord Date: Wed, 15 Jun 2016 14:40:53 -0400 Message-Id: <1466016055-31351-1-git-send-email-clord@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 0/2] Dynamic module loading for block drivers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, qemu-block@nongnu.org, mreitz@redhat.com, Colin Lord This is a repost of some previous patches written by Marc Mar=C3=AD which were also reposted by Richard Jones a few months ago. The original series and reposted series are here: https://lists.gnu.org/archive/html/qemu-devel/2015-09/msg01995.html https://lists.nongnu.org/archive/html/qemu-devel/2016-04/msg01994.html I've tried to take some of the previous feedback and integrate it into this series. There are also a few things I haven't touched that were previously mentioned though: 1) Denis Lunev suggested having block_module_load_one return the loaded driver to reduce duplicated for loops in many of the functions in block.c. I'd be happy to do this but wasn't completely sure how error handling would happen in that case since currently the return value is an integer error code. Would I switch to using the error handling mechanisms provided in util/error.c? 2) In the past some debate was had about the design of the modules. I haven't made any changes in this regard because it didn't seem a conclusion had been reached. Some links for background: Fam Zheng suggested a simpler parser: https://lists.gnu.org/archive/html/qemu-devel/2015-09/msg02201.html Denis Lunev suggested a design more similar to Linux kernel modules: https://lists.gnu.org/archive/html/qemu-devel/2015-09/msg05331.html Richard Jones suggested reasons to keep things as is: https://lists.nongnu.org/archive/html/qemu-devel/2016-04/msg01994.html Marc Mari (2): blockdev: Add dynamic generation of module_block.h blockdev: Add dynamic module loading for block drivers .gitignore | 1 + Makefile | 11 +++- block.c | 86 +++++++++++++++++++++++--- include/qemu/module.h | 3 + scripts/modules/module_block.py | 134 ++++++++++++++++++++++++++++++++++= ++++++ util/module.c | 37 +++-------- 6 files changed, 233 insertions(+), 39 deletions(-) create mode 100644 scripts/modules/module_block.py --=20 2.5.5