]> code.ossystems Code Review - openembedded-core.git/commitdiff
runqemu: allow multiple unfs instances to run simultaneously
authorScott Garman <scott.a.garman@intel.com>
Wed, 3 Oct 2012 22:13:53 +0000 (15:13 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 4 Oct 2012 13:10:40 +0000 (14:10 +0100)
A miscalculation in the way the port numbers of mountd and nfsd
are created was causing conflicts when starting multiple instances
of qemu using userspace nfs.

Thanks to Rudolf Streif for proposing this fix!

Fixes [YOCTO #1969]

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/runqemu-export-rootfs
scripts/runqemu-internal

index 90edc8a2169930eee0228d0c3063906615e22ac4..bbdaf5ba0f883bf738fc2caed2dbd1189fbde3a3 100755 (executable)
@@ -82,9 +82,9 @@ NFS_MOUNTPROG=$[ 21111 + $NFS_INSTANCE ]
 # rpc.nfsd RPC port
 NFS_NFSPROG=$[ 11111 + $NFS_INSTANCE ]
 # NFS port number
-NFS_PORT=$[ 3049 + $NFS_INSTANCE ]
+NFS_PORT=$[ 3049 + 2 * $NFS_INSTANCE ]
 # mountd port number
-MOUNT_PORT=$[ 3048 + $NFS_INSTANCE ]
+MOUNT_PORT=$[ 3048 + 2 * $NFS_INSTANCE ]
 
 ## For debugging you would additionally add
 ## --debug all
index 0f07bad9700c6ca6101f02883f432355895eb1ed..7ca00f8fa090efc1a7ece354a4ea42420f765033 100755 (executable)
@@ -277,8 +277,8 @@ if [ "$FSTYPE" = "nfs" ]; then
     NFS_DIR=`echo $ROOTFS | sed 's/^[^:]*:\(.*\)/\1/'`
     MOUNTD_RPCPORT=$[ 21111 + $NFS_INSTANCE ]
     NFSD_RPCPORT=$[ 11111 + $NFS_INSTANCE ]
-    NFSD_PORT=$[ 3049 + $NFS_INSTANCE ]
-    MOUNTD_PORT=$[ 3048 + $NFS_INSTANCE ]
+    NFSD_PORT=$[ 3049 + 2 * $NFS_INSTANCE ]
+    MOUNTD_PORT=$[ 3048 + 2 * $NFS_INSTANCE ]
     UNFS_OPTS="nfsvers=2,mountprog=$MOUNTD_RPCPORT,nfsprog=$NFSD_RPCPORT,udp,port=$NFSD_PORT,mountport=$MOUNTD_PORT"
 
     PSEUDO_LOCALSTATEDIR=~/.runqemu-sdk/pseudo