فهرست منبع

runqemu: allow multiple unfs instances to run simultaneously

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]

(From OE-Core rev: 94eef772c283170d19ba92c8de0054cd093fc487)

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Scott Garman 12 سال پیش
والد
کامیت
ee76b805f9
2فایلهای تغییر یافته به همراه4 افزوده شده و 4 حذف شده
  1. 2 2
      scripts/runqemu-export-rootfs
  2. 2 2
      scripts/runqemu-internal

+ 2 - 2
scripts/runqemu-export-rootfs

@@ -82,9 +82,9 @@ NFS_MOUNTPROG=$[ 21111 + $NFS_INSTANCE ]
 # rpc.nfsd RPC port
 # rpc.nfsd RPC port
 NFS_NFSPROG=$[ 11111 + $NFS_INSTANCE ]
 NFS_NFSPROG=$[ 11111 + $NFS_INSTANCE ]
 # NFS port number
 # NFS port number
-NFS_PORT=$[ 3049 + $NFS_INSTANCE ]
+NFS_PORT=$[ 3049 + 2 * $NFS_INSTANCE ]
 # mountd port number
 # mountd port number
-MOUNT_PORT=$[ 3048 + $NFS_INSTANCE ]
+MOUNT_PORT=$[ 3048 + 2 * $NFS_INSTANCE ]
 
 
 ## For debugging you would additionally add
 ## For debugging you would additionally add
 ## --debug all
 ## --debug all

+ 2 - 2
scripts/runqemu-internal

@@ -277,8 +277,8 @@ if [ "$FSTYPE" = "nfs" ]; then
     NFS_DIR=`echo $ROOTFS | sed 's/^[^:]*:\(.*\)/\1/'`
     NFS_DIR=`echo $ROOTFS | sed 's/^[^:]*:\(.*\)/\1/'`
     MOUNTD_RPCPORT=$[ 21111 + $NFS_INSTANCE ]
     MOUNTD_RPCPORT=$[ 21111 + $NFS_INSTANCE ]
     NFSD_RPCPORT=$[ 11111 + $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"
     UNFS_OPTS="nfsvers=2,mountprog=$MOUNTD_RPCPORT,nfsprog=$NFSD_RPCPORT,udp,port=$NFSD_PORT,mountport=$MOUNTD_PORT"
 
 
     PSEUDO_LOCALSTATEDIR=~/.runqemu-sdk/pseudo
     PSEUDO_LOCALSTATEDIR=~/.runqemu-sdk/pseudo