Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp849163pxk; Thu, 1 Oct 2020 15:46:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdVBrQC88itfru4kfCH6dnyrmc8MC/cMWY8yUEEWsyXXolMqPzGKalCyAJhml8tpR+G/UR X-Received: by 2002:a17:906:c015:: with SMTP id e21mr10267043ejz.432.1601592363615; Thu, 01 Oct 2020 15:46:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601592363; cv=none; d=google.com; s=arc-20160816; b=nTyJQiEOhAk3Gfja2A8ppWE8ICQHX5MClCVqXNkPJdNAblYbjHZoPKSPJQZoHuwF3A sdK0Uwv5qW66C5zCwSVmtFi07cnf2HHL8HuGvt9YM8IUXGcEDSaut3uxJtsGk3UiFDTV 666NiuyhyyerKXxQx5iQm/gz6JPWrxPbuU0O+I0CeliBVklW1dCdjnK3cIPwmFAxFqm3 tfonyv3jtw2BlmGezXbIpReP79D4NVOnBifYfC5zZHn4kk/qPMfMwq1aomEkNUuNgdhk W3kItvLNtB+Aa5mlhjitf9Pk1jv47AiTroDMTtcUb+Etyg96/Lu6op5g6TOvboHeLPY2 UIbQ== 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 :message-id:date:subject:cc:to:from; bh=4UmiMa5+65rn92Pb5tiRXFetQx5vUZvC8lpatLKDrIg=; b=iT6hfDH+MlX1LGfLiyoKPbJTBsCcB5L/T5AKdeBeShdYp2rR52FvFB1YFPzhMaxuXD eeCzuMlSuB4bu0oFEH3E/IRYazzjpm2zYZrtG6oZntFrZlA6FVrRkhjFAv3sBb+Q0OVt VlLwz80xxMegk4fsLPERkKNdNetnIXZ2S/SU1ZJN0WUmIpg9lUnOcGkdrJ7i21UmHeTf zREGOhIw6uMqYB9OQfaU9K04geJyTcVpoV9b4a2Abx7+NgOKCnWMjj9qr/loaPVMOz4H mrU2wtOrsH+pGihoRE2GgKDTYJaofwiprjxSgbZqLPUxwLA1CU/H20x4mIgyJfXc21V9 Fegg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t17si4884446ejs.679.2020.10.01.15.45.41; Thu, 01 Oct 2020 15:46:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733168AbgJAWo2 (ORCPT + 99 others); Thu, 1 Oct 2020 18:44:28 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:60877 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726741AbgJAWo0 (ORCPT ); Thu, 1 Oct 2020 18:44:26 -0400 Received: from mail-qv1-f70.google.com ([209.85.219.70]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kO7JJ-0000ba-Ab for linux-kernel@vger.kernel.org; Thu, 01 Oct 2020 22:44:25 +0000 Received: by mail-qv1-f70.google.com with SMTP id t7so213180qvz.5 for ; Thu, 01 Oct 2020 15:44:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4UmiMa5+65rn92Pb5tiRXFetQx5vUZvC8lpatLKDrIg=; b=VFdTnBjXpKp315trczN9FP+RIGFZno5mzzhAeWSnUFEf78sfrfAynvv3JhzTh8eAqz AAonLTBxA+3T1P5HjkUj3U4y+r7p6VI8ZZFH6g2kgdVkC+EJLYcvxbePcmT8uXypMRbg 5APgxLGAfbKSQbmEeoshtBAGZM1JD1R96hHxkgWZITcJqUlvButC+6SAHnZlJaL7CVzV cbc88msWPq/Q6dyrlpu8UTG/CGYGx94Bd+0WKUmqOwBqPlIMKtl3j6uZezkMT1B52phW 5kWr6ONK/oOA1gKXXLSSlpJzqwjF6QJS9aIKAVolf+C3dvK5B8Vue4Qh28PI+Ca43Az4 ypbg== X-Gm-Message-State: AOAM530P4ozNrL4FFsiEbJFca5AMDy4IMCg1yybh83WTRdhuplQHs2lM 9k1Sx0A/0FtApwBz402sbkcDQj6UpRadFLcbI26cTOSS6PkqloenAD93LMfwQWvksZ4C2p6xtA7 9C8SR8COzciDhnWE6YYTLv1UNxihe2tI4jyzWpbyYOw== X-Received: by 2002:ac8:44a7:: with SMTP id a7mr10192755qto.173.1601592263821; Thu, 01 Oct 2020 15:44:23 -0700 (PDT) X-Received: by 2002:ac8:44a7:: with SMTP id a7mr10192737qto.173.1601592263554; Thu, 01 Oct 2020 15:44:23 -0700 (PDT) Received: from localhost.localdomain ([201.82.49.101]) by smtp.gmail.com with ESMTPSA id f24sm7321148qkk.136.2020.10.01.15.44.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Oct 2020 15:44:22 -0700 (PDT) From: Mauricio Faria de Oliveira To: linux-kernel@vger.kernel.org, ocfs2-devel@oss.oracle.com Cc: Mark Fasheh , Joel Becker , Joseph Qi Subject: [PATCH] ocfs2: ratelimit the 'max lookup times reached' notice Date: Thu, 1 Oct 2020 19:44:17 -0300 Message-Id: <20201001224417.478263-1-mfo@canonical.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Running stress-ng on ocfs2 completely fills the kernel log with 'max lookup times reached, filesystem may have nested directories.' Let's ratelimit this message as done with others in the code. Test-case: # mkfs.ocfs2 --mount local $DEV # mount $DEV $MNT # cd $MNT # dmesg -C # stress-ng --dirdeep 1 --dirdeep-ops 1000 # dmesg | grep -c 'max lookup times reached' Before: # dmesg -C # stress-ng --dirdeep 1 --dirdeep-ops 1000 ... stress-ng: info: [11116] successful run completed in 3.03s # dmesg | grep -c 'max lookup times reached' 967 After: # dmesg -C # stress-ng --dirdeep 1 --dirdeep-ops 1000 ... stress-ng: info: [739] successful run completed in 0.96s # dmesg | grep -c 'max lookup times reached' 10 # dmesg [ 259.086086] ocfs2_check_if_ancestor: 1990 callbacks suppressed [ 259.086092] (stress-ng-dirde,740,1):ocfs2_check_if_ancestor:1091 max lookup times reached, filesystem may have nested directories, src inode: 18007, dest inode: 17940. ... Signed-off-by: Mauricio Faria de Oliveira --- fs/ocfs2/namei.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index 3c908e9416af..0043eddabdb8 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c @@ -1095,8 +1095,8 @@ static int ocfs2_check_if_ancestor(struct ocfs2_super *osb, child_inode_no = parent_inode_no; if (++i >= MAX_LOOKUP_TIMES) { - mlog(ML_NOTICE, "max lookup times reached, filesystem " - "may have nested directories, " + mlog_ratelimited(ML_NOTICE, "max lookup times reached, " + "filesystem may have nested directories, " "src inode: %llu, dest inode: %llu.\n", (unsigned long long)src_inode_no, (unsigned long long)dest_inode_no); -- 2.17.1