Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp746000pxp; Fri, 11 Mar 2022 14:02:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJzLB6SbQ9kJfrs7OCtpYAdSogA4iAjDYyBPG6367nHDXgcjGet1gaMphbSAzqrFYv9PkVQ7 X-Received: by 2002:a17:90a:8987:b0:1be:dde1:c672 with SMTP id v7-20020a17090a898700b001bedde1c672mr13001416pjn.208.1647036173509; Fri, 11 Mar 2022 14:02:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1647036173; cv=none; d=google.com; s=arc-20160816; b=zxOe0OPHH6z4Gpk2ZYMNm6ywaZ0wYDXkNjT70NsIX9/54QIYOmvrK5aK/5oAsBMZ6Q zkrk6KpQslEvwXirZMt9C0tHpTt+QXs7R6TGNd0XH0IA4/2fpBshs5Qvmt294E4RDYCb t7LOvwb6EjRFzictEO7/J47CUxG/JYVa+LDqHI1TpaQZLuXd9yAdYtr7whFk9L9bThq6 UFtubZbsowPJBJ0bXCBUyxR8DjVrnJ6MovrVwio72vof0lkAYNXxIk83ad8QjvhNtLMN Gd+Si9zCS5Bp4SwqUKoFfRaWkWU5ges3GSxpDAWbBiwDEvk4e/gTymWVyC5lVPpSNK5C eshQ== 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=aDKX0WZ52rP/HykjpKnFRpyuaJa1s0f5xox0oENgJEA=; b=h4JorHjUY/ObkeyqhJ/l2FAlwQlxE3vIEcCFH0zES4wy9p6EQPIef3kEgHnDbZTv5G gV071wGLrLbCUzx90T4D28xaJhjHjE9iRIuztMNM9gW/Hrx7vz4Y2/ETWEo3VKzPjPIZ 5Ko9blcmlHw/lT83I7CXK7tnCOKllbItN22DFj28u5BK/z6EENGeoIO4kW78m7QTS14d 87XG2r+jDkLaiawuIgRGD1mkTuuxaHUp0kncGDv6GeZx/oZnhEwnMGPVDyzUmOc+pzIz EyrqHRKy+ro4FL+WV18mdUr4M2MUjy6AhWcVeWtJIGDnCFE7zkLucPhp+gueuDIfaTuq QyKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TrjFt+Rl; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id bf27-20020a656d1b000000b00378b8f423a7si9963768pgb.421.2022.03.11.14.02.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Mar 2022 14:02:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=TrjFt+Rl; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 29863207A15; Fri, 11 Mar 2022 13:18:10 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351026AbiCKTHs (ORCPT + 99 others); Fri, 11 Mar 2022 14:07:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1351024AbiCKTHs (ORCPT ); Fri, 11 Mar 2022 14:07:48 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CED681AE66C for ; Fri, 11 Mar 2022 11:06:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1647025604; 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=aDKX0WZ52rP/HykjpKnFRpyuaJa1s0f5xox0oENgJEA=; b=TrjFt+RlGvC4HDXevKWGQxKiquR4gQhMbxeGTZPNWf/Wa6ZOaQdaAPu3jkKhkw/BnqK59r lg+O2NZ/P1rBZTbAxc24CEIB6aRfzCpBhpCVSOkqhx7iwv1Bo2cX8gqDnVCtNlbC/DjgbC RoaLutcJkyDtmdirqVREK25ZZ373Ijw= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-259--BZsfN4wNZ2-TAU9bdGcuQ-1; Fri, 11 Mar 2022 14:06:40 -0500 X-MC-Unique: -BZsfN4wNZ2-TAU9bdGcuQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 74136801AFE; Fri, 11 Mar 2022 19:06:39 +0000 (UTC) Received: from nyarly.rlyeh.local (ovpn-116-72.gru2.redhat.com [10.97.116.72]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6989C60BF4; Fri, 11 Mar 2022 19:06:34 +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: [RFC v2 PATCH 2/7] readahead: configure udev Date: Fri, 11 Mar 2022 16:06:12 -0300 Message-Id: <20220311190617.3294919-3-tbecker@redhat.com> In-Reply-To: <20220311190617.3294919-1-tbecker@redhat.com> References: <20220311190617.3294919-1-tbecker@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Spam-Status: No, score=-2.4 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=unavailable 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 --- tools/nfs-readahead-udev/99-nfs_bdi.rules.in | 1 + tools/nfs-readahead-udev/Makefile.am | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 tools/nfs-readahead-udev/99-nfs_bdi.rules.in diff --git a/tools/nfs-readahead-udev/99-nfs_bdi.rules.in b/tools/nfs-readahead-udev/99-nfs_bdi.rules.in new file mode 100644 index 00000000..15f8a995 --- /dev/null +++ b/tools/nfs-readahead-udev/99-nfs_bdi.rules.in @@ -0,0 +1 @@ +SUBSYSTEM=="bdi", ACTION=="add", PROGRAM="_libexecdir_/nfs-readahead-udev", ATTR{read_ahead_kb}="%c" diff --git a/tools/nfs-readahead-udev/Makefile.am b/tools/nfs-readahead-udev/Makefile.am index 5455e954..873cc175 100644 --- a/tools/nfs-readahead-udev/Makefile.am +++ b/tools/nfs-readahead-udev/Makefile.am @@ -1,3 +1,11 @@ libexec_PROGRAMS = nfs-readahead-udev nfs_readahead_udev_SOURCES = main.c +udev_rulesdir = /etc/udev/rules.d +udev_rules_DATA = 99-nfs_bdi.rules + +99-nfs_bdi.rules: 99-nfs_bdi.rules.in $(builddefs) + $(SED) "s|_libexecdir_|@libexecdir@|g" 99-nfs_bdi.rules.in > $@ + +clean-local: + $(RM) 99-nfs_bdi.rules -- 2.35.1