From patchwork Thu Dec 10 19:34:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: universe II X-Patchwork-Id: 555311 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 31FB5140213 for ; Fri, 11 Dec 2015 06:34:32 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id C1BB395AD7; Thu, 10 Dec 2015 19:34:31 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Sv0dUsAm1zDu; Thu, 10 Dec 2015 19:34:30 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id CA4E795AD4; Thu, 10 Dec 2015 19:34:30 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 87A491CF40C for ; Thu, 10 Dec 2015 19:34:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 8307192951 for ; Thu, 10 Dec 2015 19:34:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WAqkdvNqLN9t for ; Thu, 10 Dec 2015 19:34:28 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by whitealder.osuosl.org (Postfix) with ESMTPS id 8D1C392942 for ; Thu, 10 Dec 2015 19:34:27 +0000 (UTC) Received: from [192.168.1.101] ([2.174.202.134]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0LfjlS-1aa95W0uzK-00pKfc for ; Thu, 10 Dec 2015 20:34:24 +0100 To: buildroot@busybox.net From: Andreas Ehmanns Message-ID: <5669D3BF.2070207@gmx.de> Date: Thu, 10 Dec 2015 20:34:23 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 X-Provags-ID: V03:K0:LN8zMZ44Zg69oOHX3EO7eyfDNHqZIT1z0VG4I4YenCORa12pexV IJ5k0X9h5zU8SfgNAxRjH2lEu0O1WEvvlkLdsJC5zJboZdJDO/rMMbzZkC6FJmOGup6scI+ plDbqVWpV2kt/8uD8PeZYiDtKuNP/oZPFOZZ5F09/sD9RSOMJaCDQrNUHLh/Ja9kj25IMZ+ DzvkB33GsOTjbcM6NRSxg== X-UI-Out-Filterresults: notjunk:1; V01:K0:rfsBTxexU7s=:Yt6LdVvfzIkYu6UvOgrczr zzKtHUvIMItT81Ve8vz8Kcf7I76xdR54yBykM4U/x1tDtaYCVYYJ8SZ10cfIEBRGTUGsSlGYk JER1m3r3L8Dcp2WiZPx0avQrYI4mJrpUcBlHNVAwboalFBHQg0SeZgExzN5Oiu1rltF9RCcVO aQphabISy2WzKtHXNjyHVzC6Ol8nNLt13nPiuXWG7xSgymdCvrCiMF/BQ+c1BlgiDngILfmvR pFPRv7WMu/et+95UjgzSlC1N0y8vJ+cI6DeVRqeEZvYNI57ueV0U6N0LMKsmtjiOH3oD4WOZ/ jq3JN6mKE+HGrL8YIuKzYv7GkCHSooWTtcfJ6Ps4s8Ge0LgIjMAVddkcqaFh2bgeD9M5NPJuR 2zTdhjTMyFgBNjt0Ox606CsqAXos05TyMAPcg1ZGDMFDHiHcu8/tpyZyMyzyTQlEXDrmzTLMt IWgAKRJktdunSKRy0TdFRjjbw//1ZAt4rxFQRzZQk5v/YM6XthzqiQM76RXW0vF23a2dFGIe6 2S9xQ+WAi6ayAPbqxy5OSlP775VmiRdvSOMrNIu6o2yxai1TYkRTmEquYcuLnIb3xUW9NTpi9 +Fd1kqz1wUWLoXC8gGjqk2Qtiaoya57UZteg9E0M7LZlCSQ5YbmVXYrnxjAofmb5TXGQZxT+J O1SphyZuzCaijYbAh9dOnZ+/lSKzm9lv+kEPNvCYwUtzsT8SAwcEnoXuMhszre7qAiJaEf3Do b516ceG/+FyIZ75ysp0I11JyARWwcTWP35+NAXUkryU1hkav9AeaWcYZ6HM= Subject: [Buildroot] Add config to nfsd to set number of threads X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Dear All, actually the nfs-utils package provides an NFS server together with an init script. The number of threads the NFS server shall use is hard-coded in the init script. The attached patch moves this parameter to a config file under /etc which is read by the init script. Additionally the return value of the init script in case of an not existing file has been changed from 0 to 2 to indicate an error condition. What do you think? Regards, Andreas From f1eae31bb357587c3491a1b45891dda8c6c0dbff Mon Sep 17 00:00:00 2001 From: Andreas Ehmanns Date: Thu, 10 Dec 2015 15:51:23 +0100 Subject: [PATCH 1/1] Make number of nfsd threads configurable Signed-off-by: Andreas Ehmanns --- package/nfs-utils/S60nfs | 13 ++++++++----- package/nfs-utils/nfs-utils.mk | 2 ++ package/nfs-utils/nfsd.conf | 8 ++++++++ 3 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 package/nfs-utils/nfsd.conf diff --git a/package/nfs-utils/S60nfs b/package/nfs-utils/S60nfs index ec7c909..ddc472e 100755 --- a/package/nfs-utils/S60nfs +++ b/package/nfs-utils/S60nfs @@ -3,10 +3,13 @@ # nfs This shell script takes care of starting and stopping # the NFS services. Stolen from RedHat FC5. -[ -x /usr/sbin/rpc.statd ] || exit 0 -[ -x /usr/sbin/rpc.nfsd ] || exit 0 -[ -x /usr/sbin/rpc.mountd ] || exit 0 -[ -x /usr/sbin/exportfs ] || exit 0 +[ -x /usr/sbin/rpc.statd ] || exit 2 +[ -x /usr/sbin/rpc.nfsd ] || exit 2 +[ -x /usr/sbin/rpc.mountd ] || exit 2 +[ -x /usr/sbin/exportfs ] || exit 2 +[ -r /etc/nfsd.conf ] || exit 2 + +. /etc/nfsd.conf mkdir -p /var/lock/subsys mkdir -p /run/nfs/sm @@ -25,7 +28,7 @@ start() { echo "done" printf "Starting NFS daemon: " - rpc.nfsd 2 + rpc.nfsd $NFSD_NR_OF_THREADS echo "done" printf "Starting NFS mountd: " diff --git a/package/nfs-utils/nfs-utils.mk b/package/nfs-utils/nfs-utils.mk index 30f12fd..a26c626 100644 --- a/package/nfs-utils/nfs-utils.mk +++ b/package/nfs-utils/nfs-utils.mk @@ -51,6 +51,8 @@ endif define NFS_UTILS_INSTALL_INIT_SYSV $(INSTALL) -D -m 0755 package/nfs-utils/S60nfs \ $(TARGET_DIR)/etc/init.d/S60nfs + $(INSTALL) -m 644 package/nfs-utils/nfsd.conf \ + $(TARGET_DIR)/etc/nfsd.conf endef define NFS_UTILS_INSTALL_INIT_SYSTEMD diff --git a/package/nfs-utils/nfsd.conf b/package/nfs-utils/nfsd.conf new file mode 100644 index 0000000..65ed577 --- /dev/null +++ b/package/nfs-utils/nfsd.conf @@ -0,0 +1,8 @@ +# Configuration file for NFS server daemon +# File: /etc/nfsd.conf + +# Number of NFS server processes to be started +# Type: Integer +# Default: 2 +NFSD_NR_OF_THREADS=2 + -- 2.1.2