Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1198516pxb; Sat, 17 Apr 2021 09:32:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjxudw9R36xWDGXIf2tJ6bkp4vUbscymyYNKgxEcFWNzmUO+FpLq8HsvxQT2aNjp7DDQpl X-Received: by 2002:a50:fe81:: with SMTP id d1mr16735749edt.308.1618677119878; Sat, 17 Apr 2021 09:31:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618677119; cv=none; d=google.com; s=arc-20160816; b=MOgaXDe4D8ZBX0Gx6K1KHiRE1dXKgSvA/D0+8GJagh8EUtF3q7zCD0ZURG++JoRZ4f 5uc+MvnQqwK8cnRT/WPbI4vGVkOnAF0FZZ2CmN/UFqe3dZFiFaIPnFnTXsMjbrK6xthl A/qdg6aB0IITnraXCUc7cPPRHFkDWt0P0RWXDeKTGwb39ASQpXfclJlA2J4cuG1OBSL3 frX//P3hqU60X4x0f9xdJvvvxA+hc4Wf+6DZoXonCH+SeDD3i5DflwWAqmw3ITlc0sdP Hmd+KJwUnf6KeY7yD6cRXg0MiTJBGvVbj3MiGkOVGPnSuwbSfaXsCClxZNiE/et417dk z5AQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=K8/Cq1J4/JKmN0fYcjLI1U0HghpWXZUcAGZ64qt/dKU=; b=qbmNyXULfUscT+ZhGcStcDlFwAOz+PLqXU9D97foGWLhRfX9BlM7gFQN39BPEwDAhv bznw11wRwbZbOm5zjsrSUgZrSToaPgIv1Msq+I9nUKMKyhNS98iTUuMh3WtDSaJ0c2Ly mLrBTYFQkTftWcQzeRj2Zj1jAF/wjNsNRMCs4SuLifJeHXJqXhseU43u+C9pA2i6cJp+ n6RxHdFpLwEOhlUdTSaAlmvbe4DmwjiT3V6uQ8KtCBByZ0IxlO7BVFy7JdrJUlNy01d+ IRwrx5TpFWKgFJdZ7cBh+CtC8hj+6h0IAOqjGO/ygg9MzLImxj9l2dny0mwP9pmsl1be 1XiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="EjdvR2y/"; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m20si7910089eja.616.2021.04.17.09.31.28; Sat, 17 Apr 2021 09:31:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="EjdvR2y/"; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236537AbhDQQbx (ORCPT + 99 others); Sat, 17 Apr 2021 12:31:53 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:32609 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236535AbhDQQbw (ORCPT ); Sat, 17 Apr 2021 12:31:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618677085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=K8/Cq1J4/JKmN0fYcjLI1U0HghpWXZUcAGZ64qt/dKU=; b=EjdvR2y/o+P47SDYd6d68UKcjO/NiCsvU5EY4b5MvcFBQ/ltSX8SpLodVd9SzYYl6nLdaP eCVm6uaBfEJ1A35lgZp+cU1O93E3Y+o9345Q+mlHgXcRmh787KE+HCKlLdzXg+OOE6t2eJ tGhYO49OiEZsbXv6zo92R08LXRbOCqo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-169-JV_kygFIMfOsTmmtyRKzNQ-1; Sat, 17 Apr 2021 12:31:23 -0400 X-MC-Unique: JV_kygFIMfOsTmmtyRKzNQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 97D40114; Sat, 17 Apr 2021 16:31:22 +0000 (UTC) Received: from madhat.boston.devel.redhat.com (ovpn-112-83.phx2.redhat.com [10.3.112.83]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0DAF919CAB; Sat, 17 Apr 2021 16:31:21 +0000 (UTC) Subject: Re: [PATCH 0/3] Enable the setting of a kernel module parameter from nfs.conf To: Trond Myklebust , "ajmitchell@redhat.com" , "chuck.lever@oracle.com" Cc: "linux-nfs@vger.kernel.org" References: <20210414181040.7108-1-steved@redhat.com> <5adff402-5636-3153-2d9f-d912d83038fc@RedHat.com> <366FA143-AB3E-4320-8329-7EA247ADB22B@oracle.com> From: Steve Dickson Message-ID: Date: Sat, 17 Apr 2021 12:33:41 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Hey! On 4/15/21 8:40 PM, Trond Myklebust wrote: > Here is a skeleton example: > > [root@leira rules.d]# cat /etc/udev/rules.d/50-nfs4.rules > ACTION=="add" KERNEL=="nfs_client" ATTR{identifier}=="(null)" PROGRAM="/usr/sbin/nfs4_uuid" ATTR{identifier}="%c" > > [root@leira rules.d]# cat /usr/sbin/nfs4_uuid > #!/bin/bash > # > if [ ! -f /etc/nfs4_uuid ] > then > uuid="$(uuidgen -r)" > echo -n ${uuid} > /etc/nfs4_uuid > else > uuid="$(cat /etc/nfs4_uuid)" > fi > echo ${uuid} > > > Obviously, the /usr/sbin/nfs4_uuid would need to be fleshed out a > little more to ensure that the file /etc/nfs4_uuid actually contains a > uuid in the right format, but you get the gist... > > With the above additions, I end up with a repeatable > > [root@leira rules.d]# modprobe nfs4 > [root@leira rules.d]# cat /sys/fs/nfs/net/nfs_client/identifier > 7f9f211b-0253-4ef8-a970-b1b0f600af02 > [root@leira rules.d]# cat /etc/nfs4_uuid > 7f9f211b-0253-4ef8-a970-b1b0f600af02 I see that this example does populate nfs_client/identifier and I'm sure we could beef up the mechanism but the may question is this.... How does populating nfs_client/identifier via udev actually setting the nfs4_unique_id parameter which is used to set the unique id? I look and i've must have missed it... If the answer is we need to change the client to look a the nfs_client/identifier... then we should get rid of the nfs4_unique_id param all together... steved.