lkml.org 
[lkml]   [2020]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2020-03-22 16:16    [W:0.054 / U:4.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site