From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5BD2C2BB1D for ; Mon, 13 Apr 2020 19:02:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BAB39206DA for ; Mon, 13 Apr 2020 19:02:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586804571; bh=GrvuckLn8Bb3K+nByq3T+mvsn9hoOc/HMR6DmVHNvR4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=IFh2so48IskZKFTbg1eacmZgIrnHaQrLntDo+m5yHPWtK/QkUeH3fkCXk8Rjt7Aa+ Yf0HMBMYIrL4fyT1fKpQAGK7zujDe9QNaGOo8q8WlESzj8X70v7BLNXiPDlxeqgM4P O/cKwGhr2Vm2N0qc8tuAhQbRvpzaAPQTovEKqJok= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387781AbgDMTCo (ORCPT ); Mon, 13 Apr 2020 15:02:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53568 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1733140AbgDMTCm (ORCPT ); Mon, 13 Apr 2020 15:02:42 -0400 Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BFF46C0A3BDC; Mon, 13 Apr 2020 12:02:42 -0700 (PDT) Received: by mail-qk1-x743.google.com with SMTP id y3so10584847qky.8; Mon, 13 Apr 2020 12:02:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=nKVN6Wfqaa6m2oeBx7nAKBR/MduP5kyAtIIqdYhvSik=; b=myYK8+qvccmR/zWaZdWI+FjTUBaZuJPDjxHZ+U3zz98W1RymAkPCkAnoQu7cTanLaW pADFbIsMJZwNsH10q1E2ghzy5Wybac9hc80exBSDWYY4zwWCSPlKuUdyCUelnF3Km/Ky CMeuj5gdAcIC6ChJgpD/yJ6fTBLC54WwLewmgetXd+PMMUH4tbK/MsQBwWiLLp9SCWFb 2L+sYVBHhoDtUEF5zKTIYfb0Hz1d5brlqFBAS7xM8/Y6QHsig9OAxtnLOq/lSjBh7EaY XggMecQBv69bkxJSYfoQJd+3cJWIAjw7DAqFUwvCoqJWEvv8651OvDUfpauBCBPJo3Oe PKlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to; bh=nKVN6Wfqaa6m2oeBx7nAKBR/MduP5kyAtIIqdYhvSik=; b=AKHXB66XX8W/R3FnUYAyLy3JPXyDrov9zIfc0TrT69YbuHvPtiyodymmXery18kkP/ EoNji74Qx6vBSJzSHs1QQnBToH1Na1fcd/ykUG7xt5caak7XPheuDbQpuVrPnC48MZCx 8794unTDLnMHGSdnhdyMqvi1h6Bndovu9Rv/GOE/CjVZ6wXeNBBkjzlJYJRVhhH6qX9l FrmxKnmBX9gsk7Io4bX5yACUsjcXLCe39xcr7MzuLKQTSzwL43+sOJWlGa5kdEF+TtbM o1lpzhxMxm6q0zB7GpERJ6mMxbdCxj/iMps/vcAUyQHxGZb631rpeUJ442f4MlEX9CFh anzQ== X-Gm-Message-State: AGi0Pub6EInsO21vgY8QQ4ujMF5HumtotLBYne4jX+oF9v5QHQy5R8YM OmsNQzdfTIyOZgX5uVWmSBM= X-Google-Smtp-Source: APiQypI0lS1vfVmGCGinyYmhdcruYl03cvTvRa2nBmc3wJ+UhrMuP+fBPLT0Ki+d6+w5fDNkGnWB7A== X-Received: by 2002:a05:620a:4f2:: with SMTP id b18mr17523871qkh.433.1586804561764; Mon, 13 Apr 2020 12:02:41 -0700 (PDT) Received: from localhost ([199.96.181.106]) by smtp.gmail.com with ESMTPSA id a196sm8256558qkc.108.2020.04.13.12.02.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Apr 2020 12:02:40 -0700 (PDT) Date: Mon, 13 Apr 2020 15:02:39 -0400 From: Tejun Heo To: Christian Brauner Cc: Jens Axboe , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-api@vger.kernel.org, Jonathan Corbet , Serge Hallyn , "Rafael J. Wysocki" , "David S. Miller" , Saravana Kannan , Jan Kara , David Howells , Seth Forshee , David Rheinsberg , Tom Gundersen , Christian Kellner , Dmitry Vyukov , =?iso-8859-1?Q?St=E9phane?= Graber , linux-doc@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH 5/8] kernfs: let objects opt-in to propagating from the initial namespace Message-ID: <20200413190239.GG60335@mtj.duckdns.org> References: <20200408152151.5780-1-christian.brauner@ubuntu.com> <20200408152151.5780-6-christian.brauner@ubuntu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200408152151.5780-6-christian.brauner@ubuntu.com> Sender: linux-api-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-api@vger.kernel.org Hello, On Wed, Apr 08, 2020 at 05:21:48PM +0200, Christian Brauner wrote: > The initial namespace is special in many ways. One feature it always has > had is that it propagates all its devices into all non-initial > namespaces. This is e.g. true for all device classes under /sys/class/ Maybe I'm missing your point but I've always thought of it the other way around. Some namespaces make all objects visible in init_ns so that all non-init namespaces are subset of the init one, which sometimes requires creating aliases. Other namespaces don't do that. At least in my experience, the former is a lot easier to administer. The current namespace support in kernfs behaves the way it does because the only namespace it supports is netns, but if we're expanding it, I think it might be better to default to init_ns is superset of all others model and make netns opt for the disjointing behavior. Thanks. -- tejun