[RFC v14-rc][PATCH 17/23] Record 'struct file' object instead of the file name for VMAs

Dave Hansen dave at linux.vnet.ibm.com
Fri Mar 20 15:43:47 PDT 2009

On Fri, 2009-03-20 at 18:02 -0400, Oren Laadan wrote:
> Anyway, the down side that I was hoping to avoid on restart, is to need
> to expect "either...or" values of 'struct cr_hdr'->type instead of a
> single deterministic value. That's the extra burden that I was referring
> to.

I think this "determinism" actually adds a ton of complexity to the
code.  It forces us to open-code the entire format. 

Here's what I would suggest: at any point during restore, we should be
able to read two kinds of objects:

	1. the next expected "deterministic" object
	2. something to go into the objhash

We can encapsulate the objhash object reads inside of the normal
cr_read_obj() calls.  If they see the object that we're looking for then
we return that.  If we see an objhash object, then we put it in the
objhash and retry.  

-- Dave

More information about the Containers mailing list