[CRIU] Re: [PATCH 4/4] protobuf: Use RegFileEntry instead of reg_file_entry structure v2

Cyrill Gorcunov gorcunov at openvz.org
Wed Jul 11 03:22:54 EDT 2012


On Wed, Jul 11, 2012 at 11:16:58AM +0400, Pavel Emelyanov wrote:
> On 07/11/2012 11:12 AM, Cyrill Gorcunov wrote:
> > On Wed, Jul 11, 2012 at 11:06:37AM +0400, Pavel Emelyanov wrote:
> >>
> >>> +import "fown.proto";
> >>> +
> >>> +message reg_file_entry {
> >>> +	required uint32		id	= 1;
> >>> +	required uint32		flags	= 2;
> >>> +	required uint64		pos	= 3;
> >>> +	required fown_entry	fown	= 5;
> >>> +	required string		name	= 6;
> >>> +}
> >>
> >> Shouldn't the fown be optional?
> > 
> > Nope. Why should it? We always restore owner
> > and havin it as required makes code simplier.
> > 
> > (that said -- we can make it optional but I just
> >  don't see a reason for that, maybe I miss something?)
> 
> from fill_fd_params:
> 
>         /*
>          * Simple case -- nothing is changed.
>          */
>         if (owner_ex.pid == 0)
>                 return 0;
> 
> file may have no fowner.

Well, yes, in this case FownT will be filled with zeros.

Dunno, Pavel. At moment I think I'll leave it as is and once _all_
image entries get converted to protobuf format (and I'll be
able to operate with FownT via some new separate helper
function) I consider to make it optional.

Simply because it will requires some more code to be added,
which I'm trying to escape until all protobuf data get
verified. In short -- I'll do it a bit later, ok?

Meanwhile please don't merge any PB commits from me,
they are posted for review and feedback ;)

	Cyrill


More information about the CRIU mailing list