Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1876847rwd; Fri, 9 Jun 2023 03:37:32 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4D5r5z3Ln7DW/vW7C6nza9OroTvGZtBvnzeUuQZImEqj6BPp91jCeQcOLsHXlzDTiN0Zf9 X-Received: by 2002:a05:6a20:2590:b0:110:e7bc:b0cb with SMTP id k16-20020a056a20259000b00110e7bcb0cbmr1018976pzd.39.1686307052271; Fri, 09 Jun 2023 03:37:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686307052; cv=none; d=google.com; s=arc-20160816; b=CDb8j1p5EL4K3zysj2sjtkgIouvKDl6g+9LYZcNZQF5ZqrTKz19A0Bq452Ay2Q35dC leHFdgExDbs5bCdg08luUylr4MwTNvR7f4zTvjs5b1YmnXocZO2ERLYeFyajn5rTpCq0 TiCeGQKF7R6M67ND9vDayImmnSV+G0Pdy8HuB4mVP4tGS51IDBBHB1VWPmf6wXsLutiV jf72LmsCPjkzhs0QW7sntfJYKwX/2tUujS8JcW9XPO56S0+b0pE5zqN7rgdDh3XfLmf6 tpUWcl5iairt537Br4fpsYTLIp9my5P2XpWVEhUZpGa6//8ITHpsf79gbHQkAxSKzsA0 Atiw== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=DGOWKyGrSOgvB1BjbYhx3pBGg0FmrZ8jltl8mGxLUrI=; b=PYcfJ6Q3CrKzS1oKRPtzYbY5h9f974JXlA6c0/hR2O6Xvd/uRoPV65o47AeU6mBLJH nD8R6lJ5JhtGxLosa7rR1k1J4UeUCcG3HmrmyNo31xgWw78QJ8e/2sefiPi5yoZ6NqBI t7UTLiIP4kQ+Hm9OnzV+52QhOJypcdWArs6aB/dHKamavpJtIQyhvRl0eTaMOdPg85fd WrJMeZAGCEq3nSpBnIKNiyPsMnu99gky538ITgV4B3gq1L5yc+Ck8l9iWIgmc5ZCsE3q QivNxWvIC+vpkozo7VjSxZ8sI33uh59XlQkdnE8n/6jlrSSFJOrM8TEn4uMWQBiurnjh 72bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=B9YsWR6t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k6-20020a634b46000000b0053fb3688fadsi2510889pgl.144.2023.06.09.03.37.17; Fri, 09 Jun 2023 03:37:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=B9YsWR6t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238052AbjFIKMb (ORCPT + 99 others); Fri, 9 Jun 2023 06:12:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54506 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238266AbjFIKLx (ORCPT ); Fri, 9 Jun 2023 06:11:53 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A24AA3ABF; Fri, 9 Jun 2023 03:00:10 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C84E365641; Fri, 9 Jun 2023 09:59:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 604A4C433D2; Fri, 9 Jun 2023 09:59:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686304798; bh=TyR2ZgQ9D2TM9D+v3ftEHKWW/b88EhSiiAosUtdWjBk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=B9YsWR6tlq9FhM7v+GDCvH8TmFamLKBsjf2FFjLE+Gr3bwDaHFKWjc4SpMUCwOL3/ Kj15EdB+920G+rCdFiCCxDoEkPtM6ItFmSLmvWmzXHP1RRKirPVI3gfPrgRuZ+5hwF OtRtajzg1TpWRdrQdpFsmGvw/Oa8osFCjOj6rgt0dWipRmsWmmwpozRRk2/W3QRYyO NpCw4Oa52vjn1qGq2sbuu9W/f8Nkz3OPEEGmf72Y+sZIqgbtgVoypoa/KhVRJU4rpB oKcmvvyHW0ye3lbrzxutRFs+qx/GV6GmPrqx9cTOpfx2mLsHiNlEkSdNGRJqQSuaVo qn/abFJxdPBXQ== Date: Fri, 9 Jun 2023 11:59:48 +0200 From: Christian Brauner To: Aleksandr Mikhalitsyn Cc: Xiubo Li , stgraber@ubuntu.com, linux-fsdevel@vger.kernel.org, Ilya Dryomov , Jeff Layton , ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 00/14] ceph: support idmapped mounts Message-ID: <20230609-alufolie-gezaubert-f18ef17cda12@brauner> References: <20230608154256.562906-1-aleksandr.mikhalitsyn@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 09, 2023 at 10:59:19AM +0200, Aleksandr Mikhalitsyn wrote: > On Fri, Jun 9, 2023 at 3:57 AM Xiubo Li wrote: > > > > > > On 6/8/23 23:42, Alexander Mikhalitsyn wrote: > > > Dear friends, > > > > > > This patchset was originally developed by Christian Brauner but I'll continue > > > to push it forward. Christian allowed me to do that :) > > > > > > This feature is already actively used/tested with LXD/LXC project. > > > > > > Git tree (based on https://github.com/ceph/ceph-client.git master): > > Hi Xiubo! > > > > > Could you rebase these patches to 'testing' branch ? > > Will do in -v6. > > > > > And you still have missed several places, for example the following cases: > > > > > > 1 269 fs/ceph/addr.c <> > > req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_GETATTR, > > mode); > > + > > > 2 389 fs/ceph/dir.c <> > > req = ceph_mdsc_create_request(mdsc, op, USE_AUTH_MDS); > > + > > > 3 789 fs/ceph/dir.c <> > > req = ceph_mdsc_create_request(mdsc, op, USE_ANY_MDS); > > We don't have an idmapping passed to lookup from the VFS layer. As I > mentioned before, it's just impossible now. ->lookup() doesn't deal with idmappings and really can't otherwise you risk ending up with inode aliasing which is really not something you want. IOW, you can't fill in inode->i_{g,u}id based on a mount's idmapping as inode->i_{g,u}id absolutely needs to be a filesystem wide value. So better not even risk exposing the idmapping in there at all.