Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp2641519pxv; Sat, 17 Jul 2021 20:40:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUesD/qKwiTQe0XvNi4P+BWsROhfp/67eCYZqlyYd10RcubByqrB8ZG010eBjwI350WwFS X-Received: by 2002:a17:906:81da:: with SMTP id e26mr21071364ejx.352.1626579615823; Sat, 17 Jul 2021 20:40:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626579615; cv=none; d=google.com; s=arc-20160816; b=m5GlClS9PyexBnMYJTvG/WmkIdZmyqU2BCJ2FgrNVf5H3VEcjeaio0wxsVoYoxBxmv tMyzTewX35QN986ShHnkp0dFQyxWxPMJm+MVMMg+YKq2wgbKnWJ5pPhgVh8HL73A1Q33 opow7fzgwOptnezxEB+WIm52RaJlanbY6f4AlqNfhAGRQSQFio4ZsvlSp2/jefNXIh2M FTBcYNrGKbn9xpdLGIIgpASx9T2IrWxKlEvvSg8lHrmxDK3MkyLd9Ei79N1r5Gn1LK7F LLSULmjygxuKcYuXXeiIsa6uaQEjR8dCe3w8ef2+FZZqnWHAFLHCFYdqDvVXc6kFlw2F qQSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=UqspULE7Gruxz35tDs84/+gdhXNETD4hOwg9f63iBVA=; b=i8tHuXl4rp2ktv2jc5RFiKGynCuIOjnXxfnYExA/JfXeNa/XbHCeykvQ3WFGdxKJZ5 nKNHs7NQajMHEGnO94rtBgMvnyy4Mtf0euA8YCguw7JGw+v3Bw/WBEZUyZvm1g52rE+T SDwH1/dyctmF39IURvnZpqDd1agRBxxrfUbOrRclx+V12eJL4u3x73vlyqI59JfppUps 9vgEmGe2teF/KUDMQxs4spY6w3UK4XcSqcklYlvwjtpo2UPC1m8QQ7iqnsutr6IeXvR1 OcMcbYR6OSlsnL1X1KGJJAQcOG174AbDDUxEC/U7oMJpT85gqR/6ED+PtPqaVi/Zzqok bqVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZFNPnsOo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id kv11si17727351ejc.524.2021.07.17.20.39.00; Sat, 17 Jul 2021 20:40:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZFNPnsOo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233155AbhGRDjv (ORCPT + 99 others); Sat, 17 Jul 2021 23:39:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51040 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230102AbhGRDjv (ORCPT ); Sat, 17 Jul 2021 23:39:51 -0400 Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB871C061762; Sat, 17 Jul 2021 20:36:52 -0700 (PDT) Received: by mail-pg1-x531.google.com with SMTP id u14so15047805pga.11; Sat, 17 Jul 2021 20:36:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=UqspULE7Gruxz35tDs84/+gdhXNETD4hOwg9f63iBVA=; b=ZFNPnsOoUr28WsTsZG9AHEhK7vIrhso65KmkuMEDQteYISSH36Im+rDl/YICTXkHvU 2JRLEObZ2TJ8X8wXE/xfJQ3ABBqcZia2CzuV4G9H6COqrn4XUAuFcrd70sQ1InZIUY0O Nv0Ju6MsYiKicIRImx1Rn/Hbl7g5f2/5sx+1fU9bwrJocEZ0ABawsGkwuWCp8qGAPffN nW8YRs+wOV3r6M1IvWkrjLDYUyTUF1IWCY84txdnmFEt7wlaKsAOZWyEJMG6AwjJh21s 29iPA7l5SKrKLT6n8eN6P05vndP/ReagYp21l60XuhArkWTNq7GTw400sYgGDBW9uHQu 2uaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=UqspULE7Gruxz35tDs84/+gdhXNETD4hOwg9f63iBVA=; b=hYPMJjqv83eBS3QjWF57MNrL3hEm2aD2K18VEKy4NQKDhgbS9JUSQlMFHQOFMnrldL pfcAhMh6Je7u2iDg8MXop0Yq7wSLGVmg8vNkh5fxIFNzOeY1XHnOcutVJ0cLNWqZ7Ibr IpC0XUE8htO9F8yx2cfe5Bc2V5i7TXZzHZxswugjuawCORMX6n78pdIdtZdY+3MYHhcC nd+ZREKMpveAo8+GXYmj3LZOrbbzbfjsXXaZUiHp0GwiDwTfD7V3gyOffjKRKAnxNMJH VRTBziwx/n4nYjlTVyNI7b2CrC+qf5+ezW9+pvbbRgw0tdt7s/WpaofI9jykSps+6i2V J3Pg== X-Gm-Message-State: AOAM532rzTJKPUoBjEFZUpHpbcxFGonRSJcrcuCKvpih26Wo8bbelPzy Zi7h82TRe6TVD1n7HiGzU08= X-Received: by 2002:a05:6a00:1582:b029:333:a366:fe47 with SMTP id u2-20020a056a001582b0290333a366fe47mr14280622pfk.0.1626579411994; Sat, 17 Jul 2021 20:36:51 -0700 (PDT) Received: from gmail.com ([2601:600:8500:5f14:d627:c51e:516e:a105]) by smtp.gmail.com with ESMTPSA id s10sm4717431pga.28.2021.07.17.20.36.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Jul 2021 20:36:51 -0700 (PDT) Date: Sat, 17 Jul 2021 20:33:06 -0700 From: Andrei Vagin To: Pavel Tikhomirov Cc: Christian Brauner , linux-fsdevel@vger.kernel.org, "Eric W . Biederman" , Alexander Viro , Mattias Nissler , Aleksa Sarai , linux-api@vger.kernel.org, lkml Subject: Re: [PATCH v5 1/2] move_mount: allow to add a mount into an existing group Message-ID: References: <20210715100714.120228-1-ptikhomirov@virtuozzo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20210715100714.120228-1-ptikhomirov@virtuozzo.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 15, 2021 at 01:07:13PM +0300, Pavel Tikhomirov wrote: > Previously a sharing group (shared and master ids pair) can be only > inherited when mount is created via bindmount. This patch adds an > ability to add an existing private mount into an existing sharing group. > > With this functionality one can first create the desired mount tree from > only private mounts (without the need to care about undesired mount > propagation or mount creation order implied by sharing group > dependencies), and next then setup any desired mount sharing between > those mounts in tree as needed. > > This allows CRIU to restore any set of mount namespaces, mount trees and > sharing group trees for a container. > > We have many issues with restoring mounts in CRIU related to sharing > groups and propagation: > - reverse sharing groups vs mount tree order requires complex mounts > reordering which mostly implies also using some temporary mounts > (please see https://lkml.org/lkml/2021/3/23/569 for more info) > > - mount() syscall creates tons of mounts due to propagation > - mount re-parenting due to propagation > - "Mount Trap" due to propagation > - "Non Uniform" propagation, meaning that with different tricks with > mount order and temporary children-"lock" mounts one can create mount > trees which can't be restored without those tricks > (see https://www.linuxplumbersconf.org/event/7/contributions/640/) > > With this new functionality we can resolve all the problems with > propagation at once. > > Cc: Eric W. Biederman > Cc: Alexander Viro > Cc: Christian Brauner > Cc: Mattias Nissler > Cc: Aleksa Sarai > Cc: Andrei Vagin Looks good to me. Co-developed-by: Andrei Vagin Signed-off-by: Andrei Vagin > Cc: linux-fsdevel@vger.kernel.org > Cc: linux-api@vger.kernel.org > Cc: lkml > Signed-off-by: Pavel Tikhomirov > Thanks, Andrei