[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202003220814.713B5DF7AA@keescook>
Date: Sun, 22 Mar 2020 08:16:01 -0700
From: Kees Cook <keescook@...omium.org>
To: WeiXiong Liao <liaoweixiong@...winnertech.com>
Cc: Anton Vorontsov <anton@...msg.org>,
Colin Cross <ccross@...roid.com>,
Tony Luck <tony.luck@...el.com>,
Jonathan Corbet <corbet@....net>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>,
Mauro Carvalho Chehab <mchehab+samsung@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
Rob Herring <robh@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-mtd@...ts.infradead.org
Subject: Re: [PATCH v2 05/11] pstore/blk: blkoops: support ftrace recorder
On Sun, Mar 22, 2020 at 07:42:07PM +0800, WeiXiong Liao wrote:
> On 2020/3/19 AM 2:19, Kees Cook wrote:
> > On Fri, Feb 07, 2020 at 08:25:49PM +0800, WeiXiong Liao wrote:
> >> +static int blkz_recover_zones(struct blkz_context *cxt,
> >> + struct blkz_zone **zones, unsigned int cnt)
> >> +{
> >> + int ret;
> >> + unsigned int i;
> >> + struct blkz_zone *zone;
> >> +
> >> + if (!zones)
> >> + return 0;
> >> +
> >> + for (i = 0; i < cnt; i++) {
> >> + zone = zones[i];
> >> + if (unlikely(!zone))
> >> + continue;
> >> + ret = blkz_recover_zone(cxt, zone);
> >> + if (ret)
> >> + goto recover_fail;
> >> + }
> >> +
> >> + return 0;
> >> +recover_fail:
> >> + pr_debug("recover %s[%u] failed\n", zone->name, i);
> >> + return ret;
> >> +}
> >
> > Why is this introduced here? Shouldn't this be earlier in the series?
>
> blkz_recover_zones() is used to recover a array of zones. Only ftrace
> recorder need it, so it's introduced here.
Okay, that's fine. I thought maybe the dmesg front-end could use it too?
Anyway, I can look at it again in v3. :)
--
Kees Cook
Powered by blists - more mailing lists