[CRIU] [PATCH] mount: rework perparation for pivot_root (v2)

Pavel Emelyanov xemul at parallels.com
Mon Sep 15 03:12:46 PDT 2014


On 09/12/2014 05:44 PM, Andrew Vagin wrote:
> On Fri, Sep 12, 2014 at 05:26:02PM +0400, Pavel Emelyanov wrote:
>> On 09/12/2014 05:17 PM, Andrey Vagin wrote:
>>
>> I agree with
>>
>>> We can't bind-mount the required root into itself instead of
>>> resolving a parent mount.
>>
>> but see this
>>
>>> +		if (mount(opts.root, opts.root, NULL, MS_BIND, NULL)) {
>>> +			pr_perror("Unable to bind-mount %s", opts.root);
>>>  			return -1;
>>>  		}
>>
>> What is going on here? Can we, or cannot?
> 
> We can

Then I disagree. Whatever root is given to us, we should work on it.
We can alter mountpoints that are temporary, e.g. pivot_root's "old"
or the / of the tree we're about to abandon.

Thanks,
Pavel



More information about the CRIU mailing list