[Devel] [PATCH rh7 v2] ve/vznetstat: Don't destroy statistics until explicitly asked
Cyrill Gorcunov
gorcunov at virtuozzo.com
Fri Jul 24 08:48:52 PDT 2015
On Fri, Jul 24, 2015 at 06:39:27PM +0300, Vladimir Davydov wrote:
> >
> > Yes. There might be several nets.
>
> Hmm, correct. Then you'd better check this explicitly:
>
> if (ve->ve_netns == net)
> ...
>
> Otherwise, you can omit clearing ve->stat if you race with e.g.
> VZCTL_TC_CLEAR_STAT, which also increments/decrements ->users.
I would rather prefer take write lock @tc_lock here.
I'll make small fix on top of currently committed series.
More information about the Devel
mailing list