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 X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 30C50C34026 for ; Tue, 18 Feb 2020 10:34:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 104E424125 for ; Tue, 18 Feb 2020 10:34:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726363AbgBRKey convert rfc822-to-8bit (ORCPT ); Tue, 18 Feb 2020 05:34:54 -0500 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:45937 "EHLO relay2-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726193AbgBRKey (ORCPT ); Tue, 18 Feb 2020 05:34:54 -0500 X-Originating-IP: 90.76.211.102 Received: from xps13 (lfbn-tou-1-1151-102.w90-76.abo.wanadoo.fr [90.76.211.102]) (Authenticated sender: miquel.raynal@bootlin.com) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 2377840009; Tue, 18 Feb 2020 10:34:49 +0000 (UTC) Date: Tue, 18 Feb 2020 11:34:49 +0100 From: Miquel Raynal To: WeiXiong Liao Cc: Kees Cook , Anton Vorontsov , Colin Cross , Tony Luck , Jonathan Corbet , Richard Weinberger , Vignesh Raghavendra , Mauro Carvalho Chehab , "David S. Miller" , Rob Herring , Greg Kroah-Hartman , Jonathan Cameron , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org Subject: Re: [PATCH v2 11/11] mtd: new support oops logger based on pstore/blk Message-ID: <20200218113449.5ac44955@xps13> In-Reply-To: <1581078355-19647-12-git-send-email-liaoweixiong@allwinnertech.com> References: <1581078355-19647-1-git-send-email-liaoweixiong@allwinnertech.com> <1581078355-19647-12-git-send-email-liaoweixiong@allwinnertech.com> Organization: Bootlin X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-doc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org Hi WeiXiong, WeiXiong Liao wrote on Fri, 7 Feb 2020 20:25:55 +0800: > It's the last one of a series of patches for adaptive to MTD device. > > The mtdpstore is similar to mtdoops but more powerful. It bases on > pstore/blk, aims to store panic and oops logs to a flash partition, > where it can be read back as files after mounting pstore filesystem. > > The pstore/blk and blkoops, a wrapper for pstore/blk, are designed for > block device at the very beginning, but now, compatible to not only > block device. After this series of patches, pstore/blk can also work > for MTD device. To make it work, 'blkdev' on kconfig or module > parameter of blkoops should be set as mtd device name or mtd number. > See more about pstore/blk and blkoops on: > Documentation/admin-guide/pstore-block.rst > > Why do we need mtdpstore? > 1. repetitive jobs between pstore and mtdoops > Both of pstore and mtdoops do the same jobs that store panic/oops log. > They have much similar logic that register to kmsg dumper and store > log to several chunks one by one. > 2. do what a driver should do > To me, a driver should provide methods instead of policies. What MTD > should do is to provide read/write/erase operations, geting rid of codes > about chunk management, kmsg dumper and configuration. > 3. enhanced feature > Not only store log, but also show it as files. > Not only log, but also trigger time and trigger count. > Not only panic/oops log, but also log recorder for pmsg, console and > ftrace in the future. > > Signed-off-by: WeiXiong Liao Acked-by: Miquel Raynal Richard, your PoV on this is welcome. I suppose this patch depends on the others to work correctly so maybe we should wait the next release before applying it. Thanks, Miquèl