[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1239727704.32604.80.camel@nimitz>
Date: Tue, 14 Apr 2009 09:48:24 -0700
From: Dave Hansen <dave@...ux.vnet.ibm.com>
To: "Serge E. Hallyn" <serue@...ibm.com>
Cc: Alexey Dobriyan <adobriyan@...il.com>, akpm@...ux-foundation.org,
containers@...ts.linux-foundation.org, xemul@...allels.com,
mingo@...e.hu, orenl@...columbia.edu, hch@...radead.org,
torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 10/30] cr: core stuff
On Tue, 2009-04-14 at 10:41 -0500, Serge E. Hallyn wrote:
> > Module can legally support C/R for its files.
> > In the end it most certainly will end up with module registering restart
>
> Which module? The module defining a filesystem?
>
> In that case I'm just not clear on how the restart code will know which
> fs's file_operations to use to pick a fops->restart() fn.
There's not an f_op on the restart side -- there can't be. The problem
is that we get a CR_FD_FOO object and need to call off into the "foo"
code to recreate the 'struct file'. To me, that screams of a nice list
of function handlers indexed be CR_FD_FOO.
So, we have a list of these sitting around somewhere:
int restore_fd_func(struct cr_ctx *ctx, struct cr_fd_hdr *fd, void *private)
and when we see a CR_FD_HDR object, we look up its type and call the
respective handler. The handler will get enough data to go and restore
the fd. The fd number and other things common to all fds should be
present in the cr_fd_hdr.
-- Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists