Re: [PATCH 10/30] cr: core stuff

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 14, 2009 at 08:41:34AM -0700, Dave Hansen wrote:
> On Tue, 2009-04-14 at 19:27 +0400, Alexey Dobriyan wrote:
> > > Also, since Dave introduced the fops->checkpoint(), we (or at least I)
> > > have been struck by the ugly assymetry with checkpoint() being in fops,
> > > and restart() not.  Do you have an idea for fixing that?
> > 
> > Module can legally support C/R for its files.
> > 
> > In the end it most certainly will end up with module registering restart
> > hook for file type N.
> > 
> > Or module registering hook to restart object type N.
> 
> Yeah, that was my expectation as well.  There's a point when we just
> have too many kinds of checkpoint objects and the switch statements get
> out of hand.  Oversimplified, of course, but:
> 
> 	init_restart_handler(CR_FD_GENERIC, restore_generic_fd);
> 	init_restart_handler(CR_FD_SOCKET, restore_socket);
> 	init_restart_handler(CR_FD_PIPE, restore_pipe);
> 
> The only question to me is whether we allow the handler functions to do
> further reading of the checkpoint image or whether the higher-level code
> should be feeding them all the data they'll need in some way.

It depends, but since you don't know what it's in dumped state, it's
better to leave freedom for restart hook.

It gets restart context as cookie, position of start of an object, and
exported functions cr_read/cr_pread/whatever which accept cooked
context.
_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers

[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux