Hi Dan, > --- a/include/net/sock.h > +++ b/include/net/sock.h > @@ -1482,4 +1482,13 @@ extern int sysctl_optmem_max; > extern __u32 sysctl_wmem_default; > extern __u32 sysctl_rmem_default; > > +/* Checkpoint/Restart Functions */ > +struct ckpt_ctx; > +struct ckpt_hdr_socket; > +extern int sock_file_checkpoint(struct ckpt_ctx *, void *); > +extern void *sock_file_restore(struct ckpt_ctx *); > +extern struct socket *do_sock_file_restore(struct ckpt_ctx *, > + struct ckpt_hdr_socket *); > +extern int do_sock_file_checkpoint(struct ckpt_ctx *ctx, struct file *file); Should this all be under #ifdef CONFIG_CHECKPOINT? > --- a/net/socket.c > +++ b/net/socket.c > @@ -96,6 +96,9 @@ > #include <net/sock.h> > #include <linux/netfilter.h> > > +#include <linux/checkpoint.h> > +#include <linux/checkpoint_hdr.h> > + > static int sock_no_open(struct inode *irrelevant, struct file *dontcare); > static ssize_t sock_aio_read(struct kiocb *iocb, const struct iovec *iov, > unsigned long nr_segs, loff_t pos); > @@ -140,6 +143,9 @@ static const struct file_operations socket_file_ops = { > .sendpage = sock_sendpage, > .splice_write = generic_splice_sendpage, > .splice_read = sock_splice_read, > +#ifdef CONFIG_CHECKPOINT > + .checkpoint = sock_file_checkpoint, > +#endif > }; > > /* > @@ -415,6 +421,84 @@ int sock_map_fd(struct socket *sock, int flags) > return fd; > } > > +int sock_file_checkpoint(struct ckpt_ctx *ctx, void *ptr) > +{ > + struct ckpt_hdr_file_socket *h; > + int ret; > + struct file *file = ptr; <snip> And the corresponding code in socket.c too, since you're only assigning .checkpoint above in that case. -Brian _______________________________________________ Containers mailing list Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/containers