Message ID | 20230726141026.307690-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:a985:0:b0:3e4:2afc:c1 with SMTP id t5csp484145vqo; Wed, 26 Jul 2023 08:34:38 -0700 (PDT) X-Google-Smtp-Source: APBJJlE15CvGENbksHRKnbmpwOY59WWI9n+GeUeKC3F50KQ6gLRbTuf7vvPG1+OmSggPp/U/c3sY X-Received: by 2002:a05:6a00:c93:b0:67e:bf65:ae68 with SMTP id a19-20020a056a000c9300b0067ebf65ae68mr2468919pfv.3.1690385678476; Wed, 26 Jul 2023 08:34:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690385678; cv=none; d=google.com; s=arc-20160816; b=z8aZkvDDVgPFVW/K3SJBZoX9+tJdYxrU55wNQhVxJnKxbJiU32DW25GjZvUjR8amew XQPODY7elIzPobZC+BZZYN4JDYBHY7JxQ+AC25yUf+2sxJasudMnJPLhvnQAUFrBpY0s AXtm+uodCJhEWvgJ+CJI8M7AgSTa8Liwcf8POaFZmx4LOzm0yLOh4439UnrdrPfK5KpT xr+R/FO0wJhIKSRH0gvIQ/Ny+qJuXJCjTo1cMdcAjn6uSmscVxEOtJlc2kw03jwnoeBz 4Nma1gVgK2YEdIre/Ct0JKo8MsxWaRpHHDqpzuY4GsUr7V6EbtWeK3g8THuFZ/ep+Rja Io3Q== 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=; fh=0hEZqZysaqRii9oPb0PwkVGpwiTSSI2s9+F6mN71kBs=; b=iIJg07lSe7TcfVXekKSKUiULlijVTjdeuZ1PYOK4tfDhn9zL1cLRYiK28bIOzEimmF evByI9oE6YbmThtgEqOI2LTkJyxZYGnUpUDmDlDmMR1Ylnr5axQGqLRW/vhDxEoyQ+4c freYb87U04ZsWW77wHD4d1+3JBNTEB3dF+al5EfeZfgZ/qEUwbLxKB9Q3/NyxYkArLHK +dARUBbqF2EKfWtxNr7YSfcIdlq/ErWqYFKWpPM2KE74N6aO1GZaZol8LzLvxr8fmwvY komSebPR5K+09eZ7qcJFoUZzG5dgbH6etnHgvuPf4VXygs9wl6ltsAWLocgq8UXG81Jw qYfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=Mgrx7z6y; 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 d5-20020a056a0010c500b006863085981esi13461972pfu.68.2023.07.26.08.34.24; Wed, 26 Jul 2023 08:34:38 -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=Mgrx7z6y; 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 S233015AbjGZOMJ (ORCPT <rfc822;kloczko.tomasz@gmail.com> + 99 others); Wed, 26 Jul 2023 10:12:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233828AbjGZOLq (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 26 Jul 2023 10:11:46 -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 C0F603A9A for <linux-kernel@vger.kernel.org>; Wed, 26 Jul 2023 07:11:01 -0700 (PDT) Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.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-0.canonical.com (Postfix) with ESMTPS id 6D3BB420BE for <linux-kernel@vger.kernel.org>; Wed, 26 Jul 2023 14:10:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1690380637; bh=GFNwWvhavDkNrI4eqwez7OWrv+w+Iw1WNhnwQW/Fw7E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Mgrx7z6yozfoTxgYHpGQiGQPM71+PsK2RzMgfb8SNzC7G9O2EttikVb8iicd917Rh FCUDWAlcs3ns7vp9dvC/LsCpMgtC+6KyA7pDL/3VVgrAztkRmeZ84MgGFgpm6H+m+E 0QtHQCzVFgRpe6FlWvnP1fT6MS7+e/11P4fl61pGMuuFrkYobc93DGKZ63KkGyi0OQ Q8hARDkrUJiBpQdGzSkWWp1sHOQUOkHcYJvripPwF6wFk+SKAOwyCVGEgJEMuyTV+s SvElTwRQ6Wu8I+qhRBCSbejshJPMAnC9jsOO5ClCT9cQTuptVr1Hvbxxdm6KBVx+xB TBfwipjVyRfcw== Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-3fc0855dcc5so33936755e9.2 for <linux-kernel@vger.kernel.org>; Wed, 26 Jul 2023 07:10:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690380637; x=1690985437; 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=ZF4El+VdTXS9FgRZBwqVe2Uq9Bt7yWr+klTWRlFuLwTFIn0czPXnTVUGvq1Jb18LmF YS4hTMaSEXg/0PaHaI7Op+POD04YlFjPP8aRQXMJMXomwuzE+sHDPiOFR77T0rVV8PRD HtzOAus6kV0VJ9keqi2U5QfVhVx5YuD2RsuEervWNYnjlOl6tHZ8up9lc6ym12R6AVMV oizaRG3TFm+PRhqdwze1iJtFiRkcWg6z6fjcBPoWUeMjLgtl5QpQ5dkVdaf1vlAAHk0s Ifys9B0ExPe/8md70Ee404MUYmYKsKtjVDmpK4yMx+tA4aHXkb5tJo7DUzbTxE5NHRPC HYvQ== X-Gm-Message-State: ABy/qLbRmguNh8+nNFB1IXKK9/WwsdiJpO/Gu98PGsE8/V1xmC9QCx9F BaHXsY7WmYJD7oVU7AOYEqoh5+RO7XunFNDbAPIGDAbAZgF8NSDacKrOLWIGw9AOygzDRuzzH+f FIlvIYre6xfN8UfhhAKvb34EKEzfiLEdD5MZ7SCi5nA== X-Received: by 2002:a05:600c:2299:b0:3fc:1f8:41f1 with SMTP id 25-20020a05600c229900b003fc01f841f1mr1600051wmf.1.1690380636977; Wed, 26 Jul 2023 07:10:36 -0700 (PDT) X-Received: by 2002:a05:600c:2299:b0:3fc:1f8:41f1 with SMTP id 25-20020a05600c229900b003fc01f841f1mr1600034wmf.1.1690380636714; Wed, 26 Jul 2023 07:10:36 -0700 (PDT) Received: from amikhalitsyn.local (dslb-088-066-182-192.088.066.pools.vodafone-ip.de. [88.66.182.192]) by smtp.gmail.com with ESMTPSA id k14-20020a7bc30e000000b003fc02219081sm2099714wmj.33.2023.07.26.07.10.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Jul 2023 07:10:36 -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, Jeff Layton <jlayton@kernel.org>, Ilya Dryomov <idryomov@gmail.com>, ceph-devel@vger.kernel.org, Alexander Mikhalitsyn <aleksandr.mikhalitsyn@canonical.com>, Alexander Viro <viro@zeniv.linux.org.uk>, Seth Forshee <sforshee@kernel.org>, linux-kernel@vger.kernel.org Subject: [PATCH v7 01/11] fs: export mnt_idmap_get/mnt_idmap_put Date: Wed, 26 Jul 2023 16:10:16 +0200 Message-Id: <20230726141026.307690-2-aleksandr.mikhalitsyn@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230726141026.307690-1-aleksandr.mikhalitsyn@canonical.com> References: <20230726141026.307690-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: INBOX X-GMAIL-THRID: 1772497853387478548 X-GMAIL-MSGID: 1772497853387478548 |
Series |
ceph: support idmapped mounts
|
|
Commit Message
Aleksandr Mikhalitsyn
July 26, 2023, 2:10 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);