Message ID | 20230524153316.476973-10-aleksandr.mikhalitsyn@canonical.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:3046:b0:115:7a1d:dabb with SMTP id p6csp2914840rwl; Wed, 24 May 2023 08:42:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4iiB9C6H0jHEZ3/6WeVNoBgpOkiqepoFebzgQ49vk46hSG1nGETytrD18vwIwi7CfkdVoz X-Received: by 2002:a17:902:f689:b0:1ac:8148:8c40 with SMTP id l9-20020a170902f68900b001ac81488c40mr21810601plg.53.1684942945924; Wed, 24 May 2023 08:42:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684942945; cv=none; d=google.com; s=arc-20160816; b=blhVYZC7+lWleGCIUy/JXd+gbQUUjtimjgFOB7bo5dNGAwaaMgu/uAthxUzzXwvGWG uHicPhVZGtkayf699H4SuyIj2RLhLEPS8nsMdL+XBLx62dVh9EU1n2tFQGV5y4ZBc1WD Ej73ntsVdvtuMo1pjMVNYAl9Ycj0dI92zWdUQATzFS8cI/j3LSrH+yZVj9hdgP9DKtFe /3FAVki5jt0PIyrAl8hFCsgF4oKvwoUk5F35Fn800WCFglEguI6r7MZmOtyr2mT/Gj6r MKTYKMF+eZ5+jyMfhQz1d7i4iy7ARLo5Bh3LbPPROJBmqN9FlxOjSeaYDXkPKqQHSnh3 ZCSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=nR9/+ewIyyw/jy6drOGZEF0QPlfa9Zf5mm9/nFwa0HI=; b=ZklTgqzrc4Eb4/vfpwqD4Kpj89442hKNK8kgNVS9g3dJup8crPqm8Wt7j0OXJxgu4k NHkUgMpQ6nTwp+Ygqip7D56yWvgpwxbUOWcKcj5MnLI0CB21QhEE2gaKJfRL1wHr9Sxk 0EiFoTKIMNrF/KGKBkzo/sgryDbzBuX+4Jpqna5/bhD2DIcr/h3hX28p4ksk82KbjSZc vE+C0GwtSAEDmEnV8mSQmIQ/UCz7aNsVd99R46deB2kxXZOwd0oeuQp8UDnoDO5e6UXl QhFuFk8FLNAG1bA9ni/pWQL9QItHCGmnnx0Pm/lY69EvrLH2K2qTtDkjS9StDJQjF0/e ZQfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=lLSZB1ML; 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=canonical.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m21-20020a638c15000000b00537669c7a90si958463pgd.844.2023.05.24.08.42.13; Wed, 24 May 2023 08:42:25 -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=@canonical.com header.s=20210705 header.b=lLSZB1ML; 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=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237029AbjEXPgJ (ORCPT <rfc822;ahmedalshaiji.dev@gmail.com> + 99 others); Wed, 24 May 2023 11:36:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236308AbjEXPfL (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 24 May 2023 11:35:11 -0400 Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 850E7E63 for <linux-kernel@vger.kernel.org>; Wed, 24 May 2023 08:34:48 -0700 (PDT) Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 2B1C741FBB for <linux-kernel@vger.kernel.org>; Wed, 24 May 2023 15:34:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1684942453; bh=nR9/+ewIyyw/jy6drOGZEF0QPlfa9Zf5mm9/nFwa0HI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=lLSZB1MLefikaTBugXnexNAbwJsg3wzvKCqyR0eF/6I9SfCTH2bvwl+ygZV4Hm5yr bsiQHIbOoKVZbNyOn/In4C8hn8SdqJjsauXQX/b84H4nc99TmHwXzi4I1o0c3NTrRS HAw0wNH04XnVeA2ngKLCczOLhoEPKgpVkexlD7H4X5ONAbqspIegejn4K3B38MCtfV Ft7/moXeSsB6qyXWBwXahJrwlC4a2FRgEXIsjdLxoSUsZvvzYnFhE/usO7ij14l3xZ xSESqEW8LD36xA/z38ECMjWoQ6UTPSRnsuQzi7jj+cHP1fXFyuBlSpoKfjIUYlp0c8 tDBK1sg6uPuZg== Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-96faa650a3fso134084366b.0 for <linux-kernel@vger.kernel.org>; Wed, 24 May 2023 08:34:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684942453; x=1687534453; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nR9/+ewIyyw/jy6drOGZEF0QPlfa9Zf5mm9/nFwa0HI=; b=UJihUrMtb9aZiTSNs6Q1dEj/gTpnDdQXOSh5p8kLK/0GEay/k4joU6zAhaZ8T7Oz5f vM96xBcv9q2nMor0VGUy4qsPvLPRhivMcbRR7qtpiuS+ZesUU+0fVQzlnqAVZthX/AyC K7bjFkxyq5trLbwhCNtJk6sKvZSfhH82zJGseCEJLoukRWz5fbGeTJYjL2VLoIN+gQli gjfFvESTFX9/s6VkFOaPiHkpmgM3o3O6D18maAUUAPK6RBKUqOJus8+wz0ot6qAfYtz4 72IQF588NZEbCWO3o8kEZOY10fIB+7jl16bm3iqCKJdHWZnJasOAjrZcIHYiBx63Vzek /eeg== X-Gm-Message-State: AC+VfDyJ6MzgDHutk1zGKEVLZMb0KIIBJyEXURW3KGWk+Y+hQs8IEdkA F7dT2VXTMxXDo4rQjK4k+fvksMf7ppBQ317tW+t71EpPMaR1Un8MhOLijMiEtEWcAte0DZjKqJT 8pvRC9om3bTJ/7yD+Kxs55WUnG1qE2l1F/p8arjL/gw== X-Received: by 2002:a17:907:928c:b0:94a:7da2:d339 with SMTP id bw12-20020a170907928c00b0094a7da2d339mr19734522ejc.26.1684942452946; Wed, 24 May 2023 08:34:12 -0700 (PDT) X-Received: by 2002:a17:907:928c:b0:94a:7da2:d339 with SMTP id bw12-20020a170907928c00b0094a7da2d339mr19734509ejc.26.1684942452777; Wed, 24 May 2023 08:34:12 -0700 (PDT) Received: from amikhalitsyn.local (dslb-088-074-206-207.088.074.pools.vodafone-ip.de. [88.74.206.207]) by smtp.gmail.com with ESMTPSA id p26-20020a17090664da00b0096f7105b3a6sm5986979ejn.189.2023.05.24.08.34.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 May 2023 08:34:12 -0700 (PDT) From: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com> To: xiubli@redhat.com Cc: brauner@kernel.org, stgraber@ubuntu.com, linux-fsdevel@vger.kernel.org, Christian Brauner <christian.brauner@ubuntu.com>, Jeff Layton <jlayton@kernel.org>, Ilya Dryomov <idryomov@gmail.com>, ceph-devel@vger.kernel.org, Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>, linux-kernel@vger.kernel.org Subject: [PATCH v2 09/13] ceph: allow idmapped permission inode op Date: Wed, 24 May 2023 17:33:11 +0200 Message-Id: <20230524153316.476973-10-aleksandr.mikhalitsyn@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230524153316.476973-1-aleksandr.mikhalitsyn@canonical.com> References: <20230524153316.476973-1-aleksandr.mikhalitsyn@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766790734481719023?= X-GMAIL-MSGID: =?utf-8?q?1766790734481719023?= |
Series |
ceph: support idmapped mounts
|
|
Commit Message
Aleksandr Mikhalitsyn
May 24, 2023, 3:33 p.m. UTC
From: Christian Brauner <christian.brauner@ubuntu.com> Enable ceph_permission() to handle idmapped mounts. This is just a matter of passing down the mount's idmapping. Cc: Jeff Layton <jlayton@kernel.org> Cc: Ilya Dryomov <idryomov@gmail.com> Cc: ceph-devel@vger.kernel.org Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com> Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com> --- fs/ceph/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 2e988612ed6c..37e1cbfc7c89 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -2408,7 +2408,7 @@ int ceph_permission(struct mnt_idmap *idmap, struct inode *inode, err = ceph_do_getattr(inode, CEPH_CAP_AUTH_SHARED, false); if (!err) - err = generic_permission(&nop_mnt_idmap, inode, mask); + err = generic_permission(idmap, inode, mask); return err; }