From patchwork Wed Oct 3 22:13:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [3/3] runqemu: allow multiple unfs instances to run simultaneously Date: Wed, 03 Oct 2012 22:13:53 -0000 From: Scott Garman X-Patchwork-Id: 37737 Message-Id: <32da4081eb3b416d2df06e7d9087ecac1f62a78f.1349302333.git.scott.a.garman@intel.com> To: openembedded-core@lists.openembedded.org 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 --- scripts/runqemu-export-rootfs | 4 ++-- scripts/runqemu-internal | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/runqemu-export-rootfs b/scripts/runqemu-export-rootfs index 90edc8a..bbdaf5b 100755 --- a/scripts/runqemu-export-rootfs +++ b/scripts/runqemu-export-rootfs @@ -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 diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal index 0f07bad..7ca00f8 100755 --- a/scripts/runqemu-internal +++ b/scripts/runqemu-internal @@ -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