Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp3488652pxb; Mon, 4 Apr 2022 18:36:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7rXYxtAavx0tom0H365pnimHGFCjAIueFtwMg4IX0PQDqDa5T5k8q53CB6WCuM3t27LJg X-Received: by 2002:a17:902:d2c6:b0:156:2b2c:ab54 with SMTP id n6-20020a170902d2c600b001562b2cab54mr1019038plc.52.1649122595246; Mon, 04 Apr 2022 18:36:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649122595; cv=none; d=google.com; s=arc-20160816; b=P7MxCybAuytEs+XufL1BSKe+ZzrG+FkQHsu4jvt6Lksnklbbik8/BElxmkW7gRo+Mx GT3Ng1GoK7rQbTWsFJGKaoqBhf6TkaFLKXz7Xa/DZdrStia/neEysHH2KnUi+KJXfZC1 WpSsr3fhrwPurgeARcYfvbwUlSv0u+6Mcrzv60FzbVYupPc+v7ERfmAxiI3QHOYt9T3a ihX7v40KKO/FAAZeQ94ghGYmUysdTtumxypPZDPaI0tG3yXyyArWn3jzZ1vctP/Rf/g+ NNqHsHCJNrafn1sT+sfTHPeE5mypv3lsLRoppMTrbHDBb51UhW/apjldhTRNVLV+tk76 uTSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=oxpdjddWsu965voiUt3RDLYE0ZMWuHvFAPmZcNyp+BY=; b=RLGnNC3ZsQ97Rd85W2/0Zwcl0pKsnaJzJgcnTJDj+cQLTaraoHVX9sYwFifDRRqaJA i81VOS5Q916kPgztCDKwg2FBdPvwttgS6oGmuLwpyHNGL5Yn2vYJzHwx8iZvui9CYikS jyOxkVrjTjlan6hpV/JdgylxzL1srfqDpkBRmn6iQ2xVPEyDCSc75aDlx3qQMKLp4LLu kfVlSHGPRmpVK0Wu9FEMS+kuRCDUDuA1mpWI3Z9QT3h2FK8Qt3OBY0XriH6AFSGmuJV5 4nZedgk1sjAP8jdHK7OduZwZEofgZy9YU85f5I5TIgH7yD2bhL+gWGdHUdNS9OCRf/Up 0mdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LwMTD6tf; spf=softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id q17-20020a17090311d100b0015646baef96si13161562plh.594.2022.04.04.18.36.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Apr 2022 18:36:35 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LwMTD6tf; spf=softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2A8A91FC9D0; Mon, 4 Apr 2022 17:25:54 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345613AbiDAQLa (ORCPT + 99 others); Fri, 1 Apr 2022 12:11:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349490AbiDAQI4 (ORCPT ); Fri, 1 Apr 2022 12:08:56 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id ABDE61A2A30 for ; Fri, 1 Apr 2022 08:32:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1648827156; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=oxpdjddWsu965voiUt3RDLYE0ZMWuHvFAPmZcNyp+BY=; b=LwMTD6tf+Olbxp+GZRS/yrgHB7fEuWZ2nFIEzlNPyAp0VkrDWr5eYfu+nt+pqmGafywtrc +wDWu+5/twcxoO+30s9g64bpp8q/+uzMdf0lImFS5n8C3mSHTUQJzxi9vqwAhkS9pcVLg0 hSYCnLJWEpWYC/ph3UBBTtZKKdRe8Ao= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-26-07JyOUMpM-eQM4ODuZ56Pw-1; Fri, 01 Apr 2022 11:32:33 -0400 X-MC-Unique: 07JyOUMpM-eQM4ODuZ56Pw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9E34A10AF627; Fri, 1 Apr 2022 15:32:32 +0000 (UTC) Received: from nyarly.redhat.com (ovpn-116-139.gru2.redhat.com [10.97.116.139]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5EA277ADD; Fri, 1 Apr 2022 15:32:29 +0000 (UTC) From: Thiago Becker To: linux-nfs@vger.kernel.org Cc: steved@redhat.com, trond.myklebust@hammerspace.com, anna.schumaker@netapp.com, kolga@netapp.com, Thiago Becker Subject: [PATCH v4 2/7] nfsrahead: configure udev Date: Fri, 1 Apr 2022 12:32:03 -0300 Message-Id: <20220401153208.3120851-3-tbecker@redhat.com> In-Reply-To: <20220401153208.3120851-1-tbecker@redhat.com> References: <20220401153208.3120851-1-tbecker@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Set the udev rule to call the readahead utility. Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1946283 Signed-off-by: Thiago Becker --- .gitignore | 1 + tools/nfsrahead/99-nfs.rules.in | 1 + tools/nfsrahead/Makefile.am | 8 ++++++++ 3 files changed, 10 insertions(+) create mode 100644 tools/nfsrahead/99-nfs.rules.in diff --git a/.gitignore b/.gitignore index 38ab1d39..df791a83 100644 --- a/.gitignore +++ b/.gitignore @@ -62,6 +62,7 @@ tools/locktest/testlk tools/getiversion/getiversion tools/nfsconf/nfsconf tools/nfsrahead/nfsrahead +tools/nfsrahead/99-nfs_bdi.rules support/export/mount.h support/export/mount_clnt.c support/export/mount_xdr.c diff --git a/tools/nfsrahead/99-nfs.rules.in b/tools/nfsrahead/99-nfs.rules.in new file mode 100644 index 00000000..7d55b407 --- /dev/null +++ b/tools/nfsrahead/99-nfs.rules.in @@ -0,0 +1 @@ +SUBSYSTEM=="bdi", ACTION=="add", PROGRAM="_libexecdir_/nfsrahead", ATTR{read_ahead_kb}="%c" diff --git a/tools/nfsrahead/Makefile.am b/tools/nfsrahead/Makefile.am index edff7921..58a2ea29 100644 --- a/tools/nfsrahead/Makefile.am +++ b/tools/nfsrahead/Makefile.am @@ -1,3 +1,11 @@ libexec_PROGRAMS = nfsrahead nfsrahead_SOURCES = main.c +udev_rulesdir = /usr/lib/udev/rules.d/ +udev_rules_DATA = 99-nfs.rules + +99-nfs.rules: 99-nfs.rules.in $(builddefs) + $(SED) "s|_libexecdir_|@libexecdir@|g" 99-nfs.rules.in > $@ + +clean-local: + $(RM) 99-nfs.rules -- 2.35.1