From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E8DC5C47422 for ; Fri, 26 Jan 2024 08:43:21 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1rTHny-0004g2-Ix; Fri, 26 Jan 2024 08:43:18 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1rTHnu-0004fw-34 for linux-f2fs-devel@lists.sourceforge.net; Fri, 26 Jan 2024 08:43:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=MTlF0A8OVruMfGhYpp1F87TvnzAMI2zOKaiyYMi3ekQ=; b=PX4LixFfDt23KtK8TrSoTDDCcH dHEilYKs68R4hkrf02nwSYSYzkYUhCSBvNuusdoFqfZiRcZlGRXG5ZXFBZQwvE30DUhiHuKw9X55C lEO876r57fjVTWgIx1row0Z1UiyYAdCa1n/KEXlb7yFLXCbz1Pu0CovUgU6HKA5qhEqE=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=MTlF0A8OVruMfGhYpp1F87TvnzAMI2zOKaiyYMi3ekQ=; b=IsDvLgFLsxH9CQfZM+dK6yQkGs 17vX8n8pPVzjZHgKXmDbmhYqZdiJCRVWbsx/f93I5baHEqT+nV1L/vO47E5Lc12f7smNjM+FS1YEL Mns/VSX1vpePN8hazaPqH0H4c9VgcYrZBT3DXieq4zcV47H5sr8O7SUZZ0Ktwva1+krU=; Received: from sin.source.kernel.org ([145.40.73.55]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1rTHnl-0003Qi-HK for linux-f2fs-devel@lists.sourceforge.net; Fri, 26 Jan 2024 08:43:14 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id 0D8D2CE364A for ; Fri, 26 Jan 2024 08:42:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1B0C2C433C7; Fri, 26 Jan 2024 08:42:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706258575; bh=EJ8HNBNPvrJzALg5dpS/zcxB8MUSRkw2iTKEPWWRH5Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PfOyWlGCDHTixxfui7jZbFLFYkMp0yZuTFnthDrhlU+NdHkfbyU4LACmYVuc7FDZA nfczveWp2HFWQ4LYJJpUhsWFjY8FFf+Dal8IzQa+rPNuR/5NsaZ0gtzFjhkOfphEAx w0Kia+Ez0LHfo2oxKSfVATg9iiciNWdsSoRNRmbysR/Lp24/JQOLwsKJAffGDeAXKr FLuYxms+w+epimv/lxCMRFMjGPPuiP39ieO6MecoaoCah4wxxXGH3pbl/tjEafwvkj CeMFNnl/QrELg2Nvl14+l5Qe556/Q/EV9HLEOHz2WXW650iSOIDDd8gX4DjGXKnjAV asOQZg5tVdGQA== Date: Fri, 26 Jan 2024 00:42:53 -0800 From: Jaegeuk Kim To: Chao Yu Message-ID: References: <20240124144506.15052-1-chao@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240124144506.15052-1-chao@kernel.org> X-Headers-End: 1rTHnl-0003Qi-HK Subject: Re: [f2fs-dev] [PATCH] f2fs: use printk_ratelimited to avoid redundant logs X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On 01/24, Chao Yu wrote: > Use printk_ratelimited() instead of f2fs_err() in f2fs_record_stop_reason(), > and f2fs_record_errors() to avoid redundant logs. > > Signed-off-by: Chao Yu > --- > fs/f2fs/super.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c > index e2c066fbc0fa..7e437aea268e 100644 > --- a/fs/f2fs/super.c > +++ b/fs/f2fs/super.c > @@ -4091,7 +4091,9 @@ static void f2fs_record_stop_reason(struct f2fs_sb_info *sbi) > > f2fs_up_write(&sbi->sb_lock); > if (err) > - f2fs_err(sbi, "f2fs_commit_super fails to record err:%d", err); Needing f2fs_err_ratelimited()? > + printk_ratelimited( > + "%sF2FS-fs (%s): f2fs_commit_super fails to record stop_reason, err:%d\n", > + KERN_ERR, sbi->sb->s_id, err); > } > > void f2fs_save_errors(struct f2fs_sb_info *sbi, unsigned char flag) > @@ -4134,8 +4136,9 @@ static void f2fs_record_errors(struct f2fs_sb_info *sbi, unsigned char error) > > err = f2fs_commit_super(sbi, false); > if (err) > - f2fs_err(sbi, "f2fs_commit_super fails to record errors:%u, err:%d", > - error, err); > + printk_ratelimited( > + "%sF2FS-fs (%s): f2fs_commit_super fails to record errors:%u, err:%d\n", > + KERN_ERR, sbi->sb->s_id, error, err); > out_unlock: > f2fs_up_write(&sbi->sb_lock); > } > -- > 2.40.1 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B983614276 for ; Fri, 26 Jan 2024 08:42:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706258575; cv=none; b=BRfM3f9PI7QRqmUPySSUJ63FfJOBQZFzCD2zhiMH66pfLDQBVtKzNq2KN5V6zLPdZBTTFz2aFOmBdaiW1IM4aTDDKVUSg8EpQcijQn6xbET3qu6/1iBURSkI9GOC/UQuWFpoKVqmXQkuwqMxxe0TsXT57T97pbGINnxoxp3B3d4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706258575; c=relaxed/simple; bh=EJ8HNBNPvrJzALg5dpS/zcxB8MUSRkw2iTKEPWWRH5Y=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Vwb6oWsPFjCJJbXsDbp4zoRP4kZO8b92v2YtwGurA9fqkZSlDBs9tEdjWormeZt4yMdzl4lwKG1GfGk2sPpEUV0l+/CW8ZGW7hSJEJ+/zjvLMYCVRhif5pqKwFCyqWlKd6Q+xbfxAmounWpZOZJqDuYvfZIFPpnRVuDAyJrr/i8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PfOyWlGC; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PfOyWlGC" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1B0C2C433C7; Fri, 26 Jan 2024 08:42:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706258575; bh=EJ8HNBNPvrJzALg5dpS/zcxB8MUSRkw2iTKEPWWRH5Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=PfOyWlGCDHTixxfui7jZbFLFYkMp0yZuTFnthDrhlU+NdHkfbyU4LACmYVuc7FDZA nfczveWp2HFWQ4LYJJpUhsWFjY8FFf+Dal8IzQa+rPNuR/5NsaZ0gtzFjhkOfphEAx w0Kia+Ez0LHfo2oxKSfVATg9iiciNWdsSoRNRmbysR/Lp24/JQOLwsKJAffGDeAXKr FLuYxms+w+epimv/lxCMRFMjGPPuiP39ieO6MecoaoCah4wxxXGH3pbl/tjEafwvkj CeMFNnl/QrELg2Nvl14+l5Qe556/Q/EV9HLEOHz2WXW650iSOIDDd8gX4DjGXKnjAV asOQZg5tVdGQA== Date: Fri, 26 Jan 2024 00:42:53 -0800 From: Jaegeuk Kim To: Chao Yu Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH] f2fs: use printk_ratelimited to avoid redundant logs Message-ID: References: <20240124144506.15052-1-chao@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240124144506.15052-1-chao@kernel.org> On 01/24, Chao Yu wrote: > Use printk_ratelimited() instead of f2fs_err() in f2fs_record_stop_reason(), > and f2fs_record_errors() to avoid redundant logs. > > Signed-off-by: Chao Yu > --- > fs/f2fs/super.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c > index e2c066fbc0fa..7e437aea268e 100644 > --- a/fs/f2fs/super.c > +++ b/fs/f2fs/super.c > @@ -4091,7 +4091,9 @@ static void f2fs_record_stop_reason(struct f2fs_sb_info *sbi) > > f2fs_up_write(&sbi->sb_lock); > if (err) > - f2fs_err(sbi, "f2fs_commit_super fails to record err:%d", err); Needing f2fs_err_ratelimited()? > + printk_ratelimited( > + "%sF2FS-fs (%s): f2fs_commit_super fails to record stop_reason, err:%d\n", > + KERN_ERR, sbi->sb->s_id, err); > } > > void f2fs_save_errors(struct f2fs_sb_info *sbi, unsigned char flag) > @@ -4134,8 +4136,9 @@ static void f2fs_record_errors(struct f2fs_sb_info *sbi, unsigned char error) > > err = f2fs_commit_super(sbi, false); > if (err) > - f2fs_err(sbi, "f2fs_commit_super fails to record errors:%u, err:%d", > - error, err); > + printk_ratelimited( > + "%sF2FS-fs (%s): f2fs_commit_super fails to record errors:%u, err:%d\n", > + KERN_ERR, sbi->sb->s_id, error, err); > out_unlock: > f2fs_up_write(&sbi->sb_lock); > } > -- > 2.40.1