[CRIU] [PATCH 2/4] files: dump file descriptors by portions (v2)
Pavel Emelyanov
xemul at virtuozzo.com
Wed Apr 6 05:00:49 PDT 2016
> diff --git a/criu/include/parasite.h b/criu/include/parasite.h
> index 417b324..5c4aefe 100644
> --- a/criu/include/parasite.h
> +++ b/criu/include/parasite.h
> @@ -226,12 +226,14 @@ static inline void copy_sas(ThreadSasEntry *dst, const stack_t *src)
>
> struct parasite_drain_fd {
> int nr_fds;
> + int off;
Unused field.
> int fds[0];
> };
>
> static inline int drain_fds_size(struct parasite_drain_fd *dfds)
> {
> - return sizeof(dfds->nr_fds) + dfds->nr_fds * sizeof(dfds->fds[0]);
> + int nr_fds = min((int)PARASITE_MAX_FDS, dfds->nr_fds);
> + return sizeof(*dfds) + nr_fds * sizeof(dfds->fds[0]);
> }
>
> struct parasite_tty_args {
Patches 1, 2 and 4 applied. A concern about patch #3 is in reply to patch #3.
-- Pavel
More information about the CRIU
mailing list