[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190425193737.131be39f@cakuba.netronome.com>
Date: Thu, 25 Apr 2019 19:37:37 -0700
From: Jakub Kicinski <jakub.kicinski@...ronome.com>
To: Saeed Mahameed <saeedm@...lanox.com>
Cc: Moshe Shemesh <moshe@...lanox.com>,
"davem@...emloft.net" <davem@...emloft.net>,
Jiri Pirko <jiri@...lanox.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next] devlink: Execute devlink health recover as a
work
On Fri, 26 Apr 2019 01:42:34 +0000, Saeed Mahameed wrote:
> > > @@ -4813,7 +4831,11 @@ static int
> > > devlink_nl_cmd_health_reporter_recover_doit(struct sk_buff *skb,
> > > if (!reporter)
> > > return -EINVAL;
> > >
> > > - return devlink_health_reporter_recover(reporter, NULL);
> > > + if (!reporter->ops->recover)
> > > + return -EOPNOTSUPP;
> > > +
> > > + queue_work(devlink->reporters_wq, &reporter->recover_work);
> > > + return 0;
> > > }
> >
> > So the recover user space request will no longer return the status,
> > and
> > it will not actually wait for the recover to happen. Leaving user
> > pondering - did the recover run and fail, or did it nor get run
> > yet...
> >
>
> wait_for_completion_interruptible_timeout is missing from the design ?
Perhaps, but I think its better to avoid the async execution of
the recover all together. Perhaps its better to refcount the
reporters on the call to recover_doit? Or some such.. :)
Powered by blists - more mailing lists