Skip to contentSkip to conversation

Modularize NFS Block Driver and Makefile Cleanup

PATCH In review Colin Lord 2 participants 4 messages Jul 27, 2016

Subsystems (2)
lore
Share & tools
lore

Colin Lord

author
#0 lore raw

cover Modularize NFS Block Driver and Makefile Cleanup

Some very short patches as a followup to my last patches to add dynamic loading of block driver modules. The first patch removes some leftover lines from the Makefile which should have been deleted, and the other patch modularizes the NFS block driver. The NFS block driver is the only remaining protocol block driver that links to external libraries that has not been modularized (once my last patch set is applied).

Colin Lord (2):
blockdev: Remove unnecessary lines from Makefile
blockdev: Modularize nfs block driver

 Makefile            | 3 ---
 block/Makefile.objs | 1 +
 configure           | 4 ++--
 3 files changed, 3 insertions(+), 5 deletions(-)
Signature · 1 line
2.5.5
author
#1 lore raw

PATCH 1/2 blockdev: Remove unnecessary lines from Makefile

Removes some superfluous lines from the Makefile which should have been removed as part of the patch series to add dynamic loading for block driver modules.

---
 Makefile | 3 ---
 1 file changed, 3 deletions(-)
Makefile +0 -3
index 4b9384e..c7aa8cd 100644
@@ -247,9 +247,6 @@ Makefile: $(version-obj-y) $(version-lobj-y)
 libqemustub.a: $(stub-obj-y)
 libqemuutil.a: $(util-obj-y)
 
-block-modules = $(foreach o,$(block-obj-m),"$(basename $(subst /,-,$o))",) NULL
-util/module.o-cflags = -D'CONFIG_BLOCK_MODULES=$(block-modules)'
-
 ######################################################################
 
 qemu-img.o: qemu-img-cmds.h
Signature · 1 line
2.5.5
author
#3 lore raw

PATCH 2/2 blockdev: Modularize nfs block driver

In reply to Colin Lord

Modularizes the nfs block driver so that it gets dynamically loaded.

---
 block/Makefile.objs | 1 +
 configure           | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)
block/Makefile.objs +1 -0
index 595f366..fa4d8b8 100644
@@ -28,6 +28,7 @@ block-obj-y += crypto.o
 common-obj-y += stream.o
 common-obj-y += backup.o
 
+nfs.o-libs         := $(LIBNFS_LIBS)
 iscsi.o-cflags     := $(LIBISCSI_CFLAGS)
 iscsi.o-libs       := $(LIBISCSI_LIBS)
 curl.o-cflags      := $(CURL_CFLAGS)
configure +2 -2
index 879324b..6086d2e 100755
@@ -4558,7 +4558,6 @@ if test "$libnfs" != "no" ; then
   if $pkg_config --atleast-version=1.9.3 libnfs; then
     libnfs="yes"
     libnfs_libs=$($pkg_config --libs libnfs)
-    LIBS="$LIBS $libnfs_libs"
   else
     if test "$libnfs" = "yes" ; then
       feature_not_found "libnfs" "Install libnfs devel >= 1.9.3"
@@ -5317,7 +5316,8 @@ if test "$libiscsi" = "yes" ; then
 fi
 
 if test "$libnfs" = "yes" ; then
-  echo "CONFIG_LIBNFS=y" >> $config_host_mak
+  echo "CONFIG_LIBNFS=m" >> $config_host_mak
+  echo "LIBNFS_LIBS=$libnfs_libs" >> $config_host_mak
 fi
 
 if test "$seccomp" = "yes"; then
Signature · 1 line
2.5.5
#2 lore raw

Re: [Qemu-devel] [PATCH 1/2] blockdev: Remove unnecessary lines from Makefile

In reply to Colin Lord
Quoted 3 lines · Colin Lord

Removes some superfluous lines from the Makefile which should have been removed as part of the patch series to add dynamic loading for block driver modules.

If that series has not been merged to master yet, it may be better to just squash this into that patch; maybe the maintainer can do that, but it may also be easiest to just send another version of that series.

Signature · 2 lines
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org