[CRIU] [PATCHv3 1/2] unix: sysctl -- Preserve max_dgram_qlen value
Alexander Mikhalitsyn
alexander.mikhalitsyn at virtuozzo.com
Tue Nov 26 12:26:29 MSK 2019
On Sun, 24 Nov 2019 23:45:18 -0800
Andrei Vagin <avagin at gmail.com> wrote:
> On Sun, Nov 03, 2019 at 08:55:16AM -0800, Andrei Vagin wrote:
> > On Fri, Nov 01, 2019 at 12:00:20PM +0000, Alexander Mikhalitsyn wrote:
> > > The /proc/sys/net/unix/max_dgram_qlen is a per-net variable and
> > > we already noticed that systemd inside a container may change its value
> > > (for example it sets it to 512 by now instead of kernel's default
> > > value 10), thus we need keep it inside image and restore then.
> > >
> > > Based-on-patch-by: Cyrill Gorcunov <gorcunov at gmail.com>
> >
> > This might mean that the author should be Cyrill.
> >
> > https://github.com/torvalds/linux/blob/master/Documentation/process/submitting-patches.rst#12-when-to-use-acked-by-cc-and-co-developed-by
> >
> > Cyrill, could you review this patch?
> >
> > > Signed-off-by: Alexander Mikhalitsyn <alexander at mihalicyn.com>
> > > Signed-off-by: Alexander Mikhalitsyn <alexander.mikhalitsyn at virtuozzo.com>
> > > ---
> > > criu/net.c | 102 +++++++++++++++++++++++++++++++++++++++++++-
> > > images/netdev.proto | 1 +
> > > 2 files changed, 102 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/criu/net.c b/criu/net.c
> > > index fe9b51ad..843f74d7 100644
> > > --- a/criu/net.c
> > > +++ b/criu/net.c
> > > @@ -210,6 +210,15 @@ char *devconfs6[] = {
> > > #define MAX_CONF_OPT_PATH IFNAMSIZ+60
> > > #define MAX_STR_CONF_LEN 200
> > >
> > > +static char *unix_conf_entries[] = {
> > > + "max_dgram_qlen",
> > > +};
> > > +
> > > +#define CONF_UNIX_BASE "net/unix"
> > > +#define CONF_UNIX_FMT CONF_UNIX_BASE"/%s"
> > > +#define MAX_CONF_UNIX_OPT_PATH 32
>
> Need to add a comment which explains this "-2"
>
> > > +#define MAX_CONF_UNIX_PATH (sizeof(CONF_UNIX_FMT) + MAX_CONF_UNIX_OPT_PATH - 2)
> > > +
done
https://github.com/checkpoint-restore/criu/pull/850
More information about the CRIU
mailing list