[lxc-devel] [PATCH] Fixing MTU calculation in instantiate_veth()

2015-09-09 Thread Stephane Nguyen
Signed-off-by: Stephane Nguyen --- src/lxc/conf.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lxc/conf.c b/src/lxc/conf.c index 6bc9ecb..0913b22 100644 --- a/src/lxc/conf.c +++ b/src/lxc/conf.c @@ -2600,10 +2600,16 @@ static int instantiate_veth(struct l

[lxc-devel] [PATCH] New approach to remove container entry from lxc_snapshots

2015-09-09 Thread Christian Brauner
I want to avoid having to use the GNU-extension memmem() when removing the container entry. As mmap() does not guarantee us a \0-terminated string we lseek() to the end of the file and write() a single terminating \0-byte to the file and the mmap() the file. The terminating \0-byte will then be rem

[lxc-devel] [PATCH] Ensure that mmap()ed memory is \0-terminated lseek() to end of file and write() terminating \0-byte

2015-09-09 Thread Christian Brauner
This allows us to use standard string handling functions and we can avoid using the GNU-extension memmem(). This simplifies removing the container from the lxc_snapshots file. Wrap strstr() in a while loop to remove duplicate entries. Signed-off-by: Christian Brauner --- src/lxc/lxccontainer.c |

[lxc-devel] [PATCH] Ensure that mmap()ed memory is \0-terminated (v2) Use pwrite() to write terminating \0-byte

2015-09-09 Thread Christian Brauner
This allows us to use standard string handling functions and we can avoid using the GNU-extension memmem(). This simplifies removing the container from the lxc_snapshots file. Wrap strstr() in a while loop to remove duplicate entries. Signed-off-by: Christian Brauner --- src/lxc/lxccontainer.c |

[lxc-devel] [PATCH] New approach to remove container entry from lxc_snapshots (v2)

2015-09-09 Thread Christian Brauner
I want to avoid having to use the GNU-extension memmem() when removing the container entry. As mmap() does not guarantee us a \0-terminated string we pwrite() a single terminating \0-byte after the end of the file and the mmap() the file. The terminating \0-byte will then be removed when we ftrunca

Re: [lxc-devel] [PATCH 1/4] Add lxc.ephemeral lxc.ephemeral indicates whether a container will be destroyed on shutdown Can be 0 for non-ephemeral and 1 for ephemeral.

2015-09-09 Thread Serge Hallyn
Quoting Christian Brauner (christianvanbrau...@gmail.com): > Signed-off-by: Christian Brauner Acked-by: Serge E. Hallyn > --- > src/lxc/conf.h| 3 +++ > src/lxc/confile.c | 20 > 2 files changed, 23 insertions(+) > > diff --git a/src/lxc/conf.h b/src/lxc/conf.h > ind

Re: [lxc-devel] [PATCH 2/4] Add bdev_destroy() and bdev_destroy_wrapper()

2015-09-09 Thread Serge Hallyn
Quoting Christian Brauner (christianvanbrau...@gmail.com): > static do_bdev_destroy() and bdev_destroy_wrapper() from lxccontainer.c become > public bdev_destroy() and bdev_destroy_wrapper() in bdev.c and bdev.h > > Signed-off-by: Christian Brauner Acked-by: Serge E. Hallyn > --- > src/lxc/bd

Re: [lxc-devel] [PATCH 3/4] Destroy bdevs using bdev_destroy() from bdev.h

2015-09-09 Thread Serge Hallyn
Quoting Christian Brauner (christianvanbrau...@gmail.com): > Signed-off-by: Christian Brauner Acked-by: Serge E. Hallyn > --- > src/lxc/lxccontainer.c | 62 > -- > 1 file changed, 19 insertions(+), 43 deletions(-) > > diff --git a/src/lxc/lxcco

Re: [lxc-devel] [PATCH 4/4] Enable lxc_fini() to destroy container on shutdown

2015-09-09 Thread Serge Hallyn
Quoting Christian Brauner (christianvanbrau...@gmail.com): > When lxc.ephemeral is set to 1 in the containers config it will be destroyed > on > shutdown. > > Signed-off-by: Christian Brauner Acked-by: Serge E. Hallyn > --- > src/lxc/start.c | 58 > ++