From: Brian Haley <brian.haley-VXdhtT5mjnY@public.gmane.org>
To: Dan Smith <danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org,
Alexey Dobriyan
<adobriyan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH 2/3] c/r: Add AF_UNIX support (v4)
Date: Wed, 01 Jul 2009 16:06:36 -0400 [thread overview]
Message-ID: <4A4BC1CC.5020900@hp.com> (raw)
In-Reply-To: <1246472414-23105-2-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
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
next prev parent reply other threads:[~2009-07-01 20:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-01 18:20 [PATCH 1/3] Add _ckpt_read_hdr_type() helper Dan Smith
[not found] ` <1246472414-23105-1-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-07-01 18:20 ` [PATCH 2/3] c/r: Add AF_UNIX support (v4) Dan Smith
[not found] ` <1246472414-23105-2-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-07-01 18:20 ` [PATCH 3/3] Add AF_INET c/r support (v2) Dan Smith
[not found] ` <1246472414-23105-3-git-send-email-danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-07-01 20:37 ` Brian Haley
[not found] ` <4A4BC918.5030003-VXdhtT5mjnY@public.gmane.org>
2009-07-01 20:46 ` Dan Smith
2009-07-01 20:06 ` Brian Haley [this message]
[not found] ` <4A4BC1CC.5020900-VXdhtT5mjnY@public.gmane.org>
2009-07-01 20:45 ` [PATCH 2/3] c/r: Add AF_UNIX support (v4) Dan Smith
2009-07-01 18:28 ` [PATCH 1/3] Add _ckpt_read_hdr_type() helper Dan Smith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A4BC1CC.5020900@hp.com \
--to=brian.haley-vxdhtt5mjny@public.gmane.org \
--cc=adobriyan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
--cc=danms-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox