Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp5714493ybv; Tue, 18 Feb 2020 02:36:13 -0800 (PST) X-Google-Smtp-Source: APXvYqyl//ffQKo04S3+PASTToEYqZ/334MlX5eghqmCEcVlL8iAeR7YdVWgY19FxM39I2GHeJnh X-Received: by 2002:aca:62c4:: with SMTP id w187mr814199oib.38.1582022173019; Tue, 18 Feb 2020 02:36:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582022173; cv=none; d=google.com; s=arc-20160816; b=FMZ0E9uK6LGzPksY+Ae9TsOLdrPuIwwJun8QrfEvavUsrcZEzio0e2mNjC+QoJsMB8 iG2JPw7q3bOOBaOLGOFBXkOUd0dOC6CFdyu5tBXq39H/Cqfige/gcX2bTIa3xSTYolO3 DiKy/JFOswfOfNcExlnr+FQcon9866Dt/cy8zpWN0kux+UTJEFML29yvC3QP/k6eMdGD 14ETit5Au7fytZ/HFjgD8J7RcbnQawtGTJcL1ao8/RGHr06iCd6i4D7ltxIofGDijwm0 xVvBwtBuuq7Z+n3zUjLDWiLIMq0yzDistR0O/ewSiAJoBPk8qjlUaOuAKKE/Zi1j+pGT Ei0A== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=PISGkjbUDgycjPEPZRZLX+Ote/QZvP9QJnANC4KiZGg=; b=Wc6+0PgCVVxB56N6L+Sxm5c2qSeApPiYuqtzG8a+tdY1FOOhU8XU2M/Ed8XukVrHlc 5JDqJS6ldS6SCpQTR12JLZQ8NGoZoMM546NP3HS4g4apE2HbL40rsVgU23lbKjLTgBM1 kEcO7tqVZK+PJuBbswQFAAowtsqGjNewqUAaBbKKJUfwxfs9R5dRoK/bwq3jb4yd5K7y q87KVhhvuxuCxN7Eth9FM4nRP0Izq89XvNEHwvrCyW9Gic0vmhgfXsLyHiYBkRJRwvhC z7vsUX5u1tjRGlZS0024tYw6WQM62suUo5CZhem5YLc8T3mnUr9ISmt0ytvv4cjgBjdG 3wAw== ARC-Authentication-Results: i=1; mx.google.com; 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 l28si1700631otd.276.2020.02.18.02.36.00; Tue, 18 Feb 2020 02:36:13 -0800 (PST) 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; 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 S1726445AbgBRKey convert rfc822-to-8bit (ORCPT + 99 others); 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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