Message ID | 20230607152038.469739-2-aleksandr.mikhalitsyn@canonical.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp286928vqr; Wed, 7 Jun 2023 08:33:55 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4+ELAHGIdBmLD4OQrCJxEsoFL8jQ4txJy5TsGT62EZG+K6B3sfTiBiVAFgffZ0ZqM/QQbl X-Received: by 2002:a17:903:1d1:b0:1af:eea0:4f5b with SMTP id e17-20020a17090301d100b001afeea04f5bmr7047008plh.2.1686152034708; Wed, 07 Jun 2023 08:33:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686152034; cv=none; d=google.com; s=arc-20160816; b=fludBbROWmSWpQZmwkhQqsS7ykMBpKGMXcJYC8RzOrEQlr6lBusoZGjozyqj0UdkPa 0HsWD0tLyozIlJFBPg50pTKpsl+kof4x1VGybVKOuPSX+U8dWC2z2t3+hPWQQ63CV9Ne +tr+JcN4fukZCw7iJK/RgEAP3JZxyz5RP2mWFfs7aCtZhMTnF8qvW/vEgAJl3lQW4Zeu 97KnifH7I9SZbEyu97w1vEmo9UH3908u6NRPkmGFeX9xqUjXqqbGZ7NbHwfHgEGtiTB6 giUEUIUySzDSFu9hj3Zaj6YD41WCk6lXOWIBIVpzht83MHR01Sieb4gVmFUgC1PodRhG jVOA== 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=GFNwWvhavDkNrI4eqwez7OWrv+w+Iw1WNhnwQW/Fw7E=; b=aPCFVd++N8bptmBwdR3N7ZrSJBaag6bDU9+cDogZG4WrYJL7lJDrebLXcKYaw+AGkH E7txctYXuQSMCzWr+ULcikne/F9E2BoHmYKGhbtJD2PBiGKu746ufp0SXeSbTQogF0ZP FgBkfFzPcY0MtMU/e5WvM0QLISkh0K88udzPHQcMXpuEsQ21V405E4kSs/QcGS3GVh30 X1ESeKGdEFV8O5ogL+d8Wrt8pYXezt2yS75t/EeOoJEIUEb+SFML6Hk9tSMiIuelikgS LjhG1kyRlJXChpxb3mPimrNNlGWfPDKNgmfzSYqZRjk54aRS2rtMsEXX5s4PekHpIutt 4Tew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=pJT5VSzQ; 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 u9-20020a17090341c900b001b23b699747si2478451ple.10.2023.06.07.08.33.37; Wed, 07 Jun 2023 08:33:54 -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=pJT5VSzQ; 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 S241306AbjFGPVX (ORCPT <rfc822;xxoosimple@gmail.com> + 99 others); Wed, 7 Jun 2023 11:21:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33386 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241307AbjFGPVR (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 7 Jun 2023 11:21:17 -0400 Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5052A1BE2 for <linux-kernel@vger.kernel.org>; Wed, 7 Jun 2023 08:21:16 -0700 (PDT) Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (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-0.canonical.com (Postfix) with ESMTPS id 1C07B3F15A for <linux-kernel@vger.kernel.org>; Wed, 7 Jun 2023 15:21:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1686151273; bh=GFNwWvhavDkNrI4eqwez7OWrv+w+Iw1WNhnwQW/Fw7E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=pJT5VSzQ4Jc8ISxu9rRfZUr2TH9gC3qGbNGviNkm3IYTUg3WY4rifXg0xDnHGyp91 /d8zeFr9rb5P0tnIKOThMvlus0dIeLzQm46Pwl4a/Uc9BmDqorw00U9Sto29CPLs9E kwht5ZOTocrpQXeh5/Mt91sJoV4ysaBu4c4OTMoiSTZxxcpmSHujmBALbEeib+KJK9 cDJRrBsTCiQIQlVg2n1qbFtWhlJwLE1T362Z4v82hryTUCpSr7UHnKXb/woBikd7ii gsot7ALTVlR25/6QBmkJoA3wLMsVWwv+CuyfIA3ovtLTEssbl5nRHBsJkhx0ZoaB7a JGI0EShK+fmCw== Received: by mail-ed1-f69.google.com with SMTP id 4fb4d7f45d1cf-514b3b99882so910852a12.2 for <linux-kernel@vger.kernel.org>; Wed, 07 Jun 2023 08:21:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686151272; x=1688743272; 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=GFNwWvhavDkNrI4eqwez7OWrv+w+Iw1WNhnwQW/Fw7E=; b=L356YG7fkhuw/HSn8bbFMnrU3o6P9VNl8/TJmYDv/ZgLAn3oupeqaLnCiElrFR+0OD s8j9zF9S9lG8SWzq0s+mhb3/l58cGFhmahmOc0VpeKBpsKfN++uTyfvC2oSDrok5EnYT t0WjS2qu8lxT5pjfZK4S95aeUHELNpzV1tasvCN7EFsHDVn7I/hbCFaWO8Ak4sh5NKka uSoLE67gb1IWx8RQr++7qUhYh5LVj/Vh4L8hMnH9yYduZMDQO123m7bVNsVWYTqq9NW3 qbU7vgMEhUjSrFF28R88xPB+y4knyErRib9lVmLPpYxUYu9u16k9GbRMKdq5Z4RW/x9O aueg== X-Gm-Message-State: AC+VfDykAm8Q41IujKugleuR6z5c/Ty7uW4ZWJ0RS/UEISGd1mwbuBk7 nQePVT97FIERDu6qyBGvmo7AZX7C7jNErNVwZ5Teh06IRjfTErsL4SQ511KJVg7fGg79buyIq9L uXNFufvw+pwHbZWEkoTNKul54Zaiw+ymSL7kBn92O2g== X-Received: by 2002:aa7:cd7c:0:b0:516:6779:263e with SMTP id ca28-20020aa7cd7c000000b005166779263emr4537597edb.22.1686151272831; Wed, 07 Jun 2023 08:21:12 -0700 (PDT) X-Received: by 2002:aa7:cd7c:0:b0:516:6779:263e with SMTP id ca28-20020aa7cd7c000000b005166779263emr4537575edb.22.1686151272576; Wed, 07 Jun 2023 08:21:12 -0700 (PDT) Received: from amikhalitsyn.local (dslb-002-205-064-187.002.205.pools.vodafone-ip.de. [2.205.64.187]) by smtp.gmail.com with ESMTPSA id w17-20020a056402129100b005147503a238sm6263441edv.17.2023.06.07.08.21.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jun 2023 08:21: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, Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>, Jeff Layton <jlayton@kernel.org>, Ilya Dryomov <idryomov@gmail.com>, ceph-devel@vger.kernel.org, Alexander Viro <viro@zeniv.linux.org.uk>, Seth Forshee <sforshee@kernel.org>, linux-kernel@vger.kernel.org Subject: [PATCH v3 01/14] fs: export mnt_idmap_get/mnt_idmap_put Date: Wed, 7 Jun 2023 17:20:25 +0200 Message-Id: <20230607152038.469739-2-aleksandr.mikhalitsyn@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230607152038.469739-1-aleksandr.mikhalitsyn@canonical.com> References: <20230607152038.469739-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,URIBL_BLOCKED autolearn=unavailable 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?1768058555550655911?= X-GMAIL-MSGID: =?utf-8?q?1768058555550655911?= |
Series |
ceph: support idmapped mounts
|
|
Commit Message
Aleksandr Mikhalitsyn
June 7, 2023, 3:20 p.m. UTC
These helpers are required to support idmapped mounts in the Cephfs. Cc: Christian Brauner <brauner@kernel.org> Cc: Xiubo Li <xiubli@redhat.com> Cc: Jeff Layton <jlayton@kernel.org> Cc: Ilya Dryomov <idryomov@gmail.com> Cc: ceph-devel@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Signed-off-by: Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com> Reviewed-by: Christian Brauner <brauner@kernel.org> --- v3: - EXPORT_SYMBOL -> EXPORT_SYMBOL_GPL as Christoph Hellwig suggested --- fs/mnt_idmapping.c | 2 ++ include/linux/mnt_idmapping.h | 3 +++ 2 files changed, 5 insertions(+)
diff --git a/fs/mnt_idmapping.c b/fs/mnt_idmapping.c index 4905665c47d0..57d1dedf3f8f 100644 --- a/fs/mnt_idmapping.c +++ b/fs/mnt_idmapping.c @@ -256,6 +256,7 @@ struct mnt_idmap *mnt_idmap_get(struct mnt_idmap *idmap) return idmap; } +EXPORT_SYMBOL_GPL(mnt_idmap_get); /** * mnt_idmap_put - put a reference to an idmapping @@ -271,3 +272,4 @@ void mnt_idmap_put(struct mnt_idmap *idmap) kfree(idmap); } } +EXPORT_SYMBOL_GPL(mnt_idmap_put); diff --git a/include/linux/mnt_idmapping.h b/include/linux/mnt_idmapping.h index 057c89867aa2..b8da2db4ecd2 100644 --- a/include/linux/mnt_idmapping.h +++ b/include/linux/mnt_idmapping.h @@ -115,6 +115,9 @@ static inline bool vfsgid_eq_kgid(vfsgid_t vfsgid, kgid_t kgid) int vfsgid_in_group_p(vfsgid_t vfsgid); +struct mnt_idmap *mnt_idmap_get(struct mnt_idmap *idmap); +void mnt_idmap_put(struct mnt_idmap *idmap); + vfsuid_t make_vfsuid(struct mnt_idmap *idmap, struct user_namespace *fs_userns, kuid_t kuid);