From patchwork Wed Aug 8 09:38:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Aur=C3=A9lien_Aptel?= X-Patchwork-Id: 10559697 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E02B813B4 for ; Wed, 8 Aug 2018 09:38:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF8512A9E8 for ; Wed, 8 Aug 2018 09:38:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C3A222AA05; Wed, 8 Aug 2018 09:38:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4C38B2A9E8 for ; Wed, 8 Aug 2018 09:38:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726793AbeHHL5R (ORCPT ); Wed, 8 Aug 2018 07:57:17 -0400 Received: from mx2.suse.de ([195.135.220.15]:46632 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726726AbeHHL5R (ORCPT ); Wed, 8 Aug 2018 07:57:17 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 63036ADB0; Wed, 8 Aug 2018 09:38:23 +0000 (UTC) From: Aurelien Aptel To: linux-cifs@vger.kernel.org Cc: piastryyy@gmail.com, Aurelien Aptel Subject: [cifs-utils PATCH v1 1/2] checkopts: report duplicated options in man page Date: Wed, 8 Aug 2018 11:38:15 +0200 Message-Id: <20180808093816.22773-2-aaptel@suse.com> X-Mailer: git-send-email 2.13.7 In-Reply-To: <20180808093816.22773-1-aaptel@suse.com> References: <20180808093816.22773-1-aaptel@suse.com> Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Aurelien Aptel --- checkopts | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/checkopts b/checkopts index 26ca271..88e70b1 100755 --- a/checkopts +++ b/checkopts @@ -98,9 +98,12 @@ def extract_man_opts(fn): state = STATE_BASE rx = RX() opts = {} + ln = 0 with open(fn) as f: for s in f.readlines(): + ln += 1 + if state == STATE_EXIT: break @@ -113,7 +116,9 @@ def extract_man_opts(fn): s = chomp(s) names = extract_canonical_opts(s) for name in names: - opts[name] = s + if name not in opts: + opts[name] = [] + opts[name].append({'ln':ln, 'fmt':s}) elif rx.search(r'^[A-Z]+', s): state = STATE_EXIT return opts @@ -174,6 +179,14 @@ def main(): def opt_is_doc(o): return o in manopts + print('DUPLICATED DOC OPTIONS') + print('======================') + + for opt in sortedset(man_opts_set): + if len(manopts[opt]) > 1: + lines = ", ".join([str(x['ln']) for x in manopts[opt]]) + print("OPTION %-20.20s (lines %s)"%(opt, lines)) + print() print('UNDOCUMENTED OPTIONS') print('====================') @@ -208,8 +221,8 @@ def main(): unex_opts = man_opts_set - kernel_opts_set # group opts and their negations together for opt in sortedset(unex_opts): - fmt = manopts[opt] - print('OPTION %s ("%s")' % (opt, fmt)) + man = manopts[opt][0] + print('OPTION %s ("%s") line %d' % (opt, man['fmt'], man['ln'])) print('') From patchwork Wed Aug 8 09:38:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Aur=C3=A9lien_Aptel?= X-Patchwork-Id: 10559699 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C73B613B4 for ; Wed, 8 Aug 2018 09:38:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B58222A9E8 for ; Wed, 8 Aug 2018 09:38:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A9B362AA05; Wed, 8 Aug 2018 09:38:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 261F72A9E8 for ; Wed, 8 Aug 2018 09:38:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726893AbeHHL5U (ORCPT ); Wed, 8 Aug 2018 07:57:20 -0400 Received: from mx2.suse.de ([195.135.220.15]:46648 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726726AbeHHL5U (ORCPT ); Wed, 8 Aug 2018 07:57:20 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 033B4AE17; Wed, 8 Aug 2018 09:38:26 +0000 (UTC) From: Aurelien Aptel To: linux-cifs@vger.kernel.org Cc: piastryyy@gmail.com, Aurelien Aptel Subject: [cifs-utils PATCH v1 2/2] mount.cifs.rst: more cleanups Date: Wed, 8 Aug 2018 11:38:16 +0200 Message-Id: <20180808093816.22773-3-aaptel@suse.com> X-Mailer: git-send-email 2.13.7 In-Reply-To: <20180808093816.22773-1-aaptel@suse.com> References: <20180808093816.22773-1-aaptel@suse.com> Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP * remove duplicates (netbiosname, rdma) * remove snapshot * document nostrictsync, domain, domainauto better * point to vers= when talking about version requirements * typos Signed-off-by: Aurelien Aptel --- mount.cifs.rst | 61 ++++++++++++++++++++++++++++------------------------------ 1 file changed, 29 insertions(+), 32 deletions(-) diff --git a/mount.cifs.rst b/mount.cifs.rst index 13b3a1e..3504477 100644 --- a/mount.cifs.rst +++ b/mount.cifs.rst @@ -138,25 +138,20 @@ port=arg try to connect on port 445 first and then port 139 if that fails. Return an error if both fail. - netbiosname=arg - Specify the client netbios name (RFC1001 name) to use when attempting - to setup a session to the server. Although rarely needed for mounting + When mounting to servers via port 139, specifies the RFC1001 source + name to use to represent the client netbios machine during the netbios + session initialization. + +servern=arg + Similar to ``netbiosname`` except it specifies the netbios name of + the server instead of the client. Although rarely needed for mounting to newer servers, this option is needed for mounting to some older servers (such as OS/2 or Windows 98 and Windows ME) since when connecting over port 139 they, unlike most newer servers, do not support a default server name. A server name can be up to 15 characters long and is usually uppercased. -servern=arg - Similarl to ``netbiosname`` except it specifies the netbios name of - the server instead of the client. - -netbiosname=arg - When mounting to servers via port 139, specifies the RFC1001 source - name to use to represent the client netbios machine name when doing - the RFC1001 netbios session initialize. - file_mode=arg If the server does not support the CIFS Unix extensions this overrides the default file mode. @@ -171,11 +166,14 @@ ip=arg|addr=arg rarely needs to be specified by the user. domain=arg|dom=arg|workgroup=arg - sets the domain (workgroup) of the user. + Sets the domain (workgroup) of the user. If no domains are given, + the empty domain will be used. Use ``domainauto`` to automatically + guess the domain of the server you are connecting to. domainauto - When using NTLMv2 authentification and not providing a domain via + When using NTLM authentication and not providing a domain via ``domain``, guess the domain from the server NTLM challenge. + This behavior used to be the default on kernels older than 2.6.36. guest don't prompt for a password. @@ -249,7 +247,14 @@ cache=arg default is ``strict``. nostrictsync - Do not flush to the server on fsync(). + Do not ask the server to flush on fsync(). + Some servers perform non-buffered writes by default in which case + flushing is redundant. In workloads where a client is performing a + lot of small write + fsync combinations and where network latency is + much higher than the server latency, this brings a 2x performance + improvement. + This option is also a good candidate in scenarios where we want + performance over consistency. handlecache (default) In SMB2 and above, the client often has to open the root @@ -359,15 +364,16 @@ sec=arg automatically if it's enabled in */proc/fs/cifs/SecurityFlags*. seal - Request encryption at the SMB layer. Encryption is only supported in - SMBv3 and above. The encryption algorithm used is AES-128-CCM. + Request encryption at the SMB layer. The encryption algorithm used + is AES-128-CCM. Requires SMB3 or above (see ``vers``). rdma - Connect directly to the server using SMB Direct via a RDMA adapter. + Connect directly to the server using SMB Direct via a RDMA + adapter. Requires SMB3 or above (see ``vers``). resilienthandles Enable resilient handles. If the server supports it, keep opened - files across reconenctions. Requires SMB2.1. + files across reconnections. Requires SMB2.1 (see ``vers``). noresilienthandles (default) Disable resilient handles. @@ -375,16 +381,12 @@ noresilienthandles persistenthandles Enable persistent handles. If the server supports it, keep opened files across reconnections. Persistent handles are also valid across - servers in a cluser and have stronger guarantees than resilient - handles. Requires SMB3 or above. + servers in a cluster and have stronger guarantees than resilient + handles. Requires SMB3 or above (see ``vers``). nopersistenthandles (default) Disable persistent handles. -snapshot=time - Mount a specific snapshot of the remote share. ``time`` must be a - positive integer identifying the snapshot requested. - nobrl Do not send byte range lock requests to the server. This is necessary for certain applications that break with cifs style mandatory byte @@ -396,7 +398,7 @@ forcemandatorylock extensions. Always use cifs style mandatory locks. locallease - Check cache leases locally instead of querying the server. + Check cached leases locally instead of querying the server. sfu When the CIFS Unix Extensions are not negotiated, attempt to create @@ -425,11 +427,6 @@ echo_interval=n If this option is not given then the default value of 60 seconds is used. The minimum tunable value is 1 second and maximum can go up to 600 seconds. -rdma - Use to connect to SMB Direct, only applicable when specified with - vers=3 or vers=3.x. - Here 3.x can be 3.0, 3.02 or 3.1.1. - serverino Use inode numbers (unique persistent file identifiers) returned by the server instead of automatically generating temporary inode numbers on @@ -471,7 +468,7 @@ nouser_xattr support it otherwise. The default is for xattr support to be enabled. nodfs - Do not follow Distributed FileSystem referals. IO on a file not + Do not follow Distributed FileSystem referrals. IO on a file not stored on the server will fail instead of connecting to the target server transparently.