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

Pavel Emelyanov xemul at parallels.com
Wed Jul 11 03:16:58 EDT 2012


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.


> 	Cyrill
> .
> 



More information about the CRIU mailing list