Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp613959img; Fri, 22 Mar 2019 05:11:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqzGjpuNu18Lk/F3ZSnGatALMFdWGfgZn6q6wH4us9tyUMebv0gyWsijyAdy7KG9bBIjan2B X-Received: by 2002:a63:c548:: with SMTP id g8mr5496299pgd.451.1553256660166; Fri, 22 Mar 2019 05:11:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553256660; cv=none; d=google.com; s=arc-20160816; b=iqJQ/KcBcOC/fIulXvDu4D0MEy0oYRW+20HMFJ8y8yYpfv4uhthzqvJqDPXNDvD2Wn UtdZVxxZnBrUH02lny49MVeTNKLxTqKxPGmSRTeCiLSl/tymGS5GVmy1Rg7JFvYv82dP U1vmMS/Xi+0gg8elbio961lvQLRH0nfEYoII7ItfaMzUgYo6rc9aAUjWgA4CBwyYIzuP zSFYu0MbdGf08yA/RpwrcN5olroNizKrjKAlVipAu5ea74b8O35YemXCElNx1SG/mlpZ xhvS6h9ST+UMCYSDxeo3LDnYfOC309ZbP70tz0bs15sUZxTRUJ/LowRdOLQRGNoAEYQt p3ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=L0P5vtjCUTshgSnEBZBQ0mNWwejCvCkI5aT4ZJ6IUZU=; b=L723J4UxtWjBjzHaHsPorBPY3bQ85N6ULprn8usAcDp+Y0uYKMvwUdlgk6ImQAyoY7 nqFqXhf/doLpQx787t/c8PRYuQ1UskAJu8nM0Gy2vvMGGRqP7SChje/3iyg5r/x1vYwF wKLUoLvGmxKB85vnqWrILP/oTS2Q5JOeoeZOg+MAMPY+DYYy31ZF6Kl+wmoyKSZqCerX w4pCmi7MgACn37s8eeHMMEGmC/84acfMLlkYKfbNx1j8Y8MwHBe39oWWzYOMr/9DNwY/ 5f5057U6G7CLCW3I14rGKYvyaIB4xxvchztclCjtGRXHhg/J/+925wMUAb2g9yTK4N06 oUSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tLtBj9n+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j71si6734649pfc.280.2019.03.22.05.10.45; Fri, 22 Mar 2019 05:11:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tLtBj9n+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389347AbfCVMJl (ORCPT + 99 others); Fri, 22 Mar 2019 08:09:41 -0400 Received: from mail.kernel.org ([198.145.29.99]:48140 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389028AbfCVMJj (ORCPT ); Fri, 22 Mar 2019 08:09:39 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 69CAA2082C; Fri, 22 Mar 2019 12:09:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553256578; bh=Gcs4qELA6xcjb/ROqdjhugbWb1/+ElbF9/ceCzE0DPk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tLtBj9n+HF44Z8A6Y5dezIoYXZAQ3Cw1NlmxBJKhlMVeLTJDp+ol4oAEp6sXQU0ad hWbhMJf07G/+PEGSRikGtmt4dYJJZcU046Pjr0veYXWAw3LJDR2zd3k/Wz3kzsjeyA lxvO3ZX14rQAqcEl9IwZJ7hQ7r3NpNDy4pXrJlCQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mikulas Patocka , Mike Snitzer Subject: [PATCH 4.19 237/280] dm integrity: limit the rate of error messages Date: Fri, 22 Mar 2019 12:16:30 +0100 Message-Id: <20190322111338.557871471@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190322111306.356185024@linuxfoundation.org> References: <20190322111306.356185024@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mikulas Patocka commit 225557446856448039a9e495da37b72c20071ef2 upstream. When using dm-integrity underneath md-raid, some tests with raid auto-correction trigger large amounts of integrity failures - and all these failures print an error message. These messages can bring the system to a halt if the system is using serial console. Fix this by limiting the rate of error messages - it improves the speed of raid recovery and avoids the hang. Fixes: 7eada909bfd7a ("dm: add integrity target") Cc: stable@vger.kernel.org # v4.12+ Signed-off-by: Mikulas Patocka Signed-off-by: Mike Snitzer Signed-off-by: Greg Kroah-Hartman --- drivers/md/dm-integrity.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/drivers/md/dm-integrity.c +++ b/drivers/md/dm-integrity.c @@ -1357,8 +1357,8 @@ again: checksums_ptr - checksums, !dio->write ? TAG_CMP : TAG_WRITE); if (unlikely(r)) { if (r > 0) { - DMERR("Checksum failed at sector 0x%llx", - (unsigned long long)(sector - ((r + ic->tag_size - 1) / ic->tag_size))); + DMERR_LIMIT("Checksum failed at sector 0x%llx", + (unsigned long long)(sector - ((r + ic->tag_size - 1) / ic->tag_size))); r = -EILSEQ; atomic64_inc(&ic->number_of_mismatches); } @@ -1550,8 +1550,8 @@ retry_kmap: integrity_sector_checksum(ic, logical_sector, mem + bv.bv_offset, checksums_onstack); if (unlikely(memcmp(checksums_onstack, journal_entry_tag(ic, je), ic->tag_size))) { - DMERR("Checksum failed when reading from journal, at sector 0x%llx", - (unsigned long long)logical_sector); + DMERR_LIMIT("Checksum failed when reading from journal, at sector 0x%llx", + (unsigned long long)logical_sector); } } #endif