Message ID | 20230804084858.126104-2-aleksandr.mikhalitsyn@canonical.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:44a:b0:3f2:4152:657d with SMTP id ez10csp131861vqb; Fri, 4 Aug 2023 02:17:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGx4JmcZ55IvCbnoGI3rabd5hBHoVa/6BEVXzxgaV8CY6dZJDjLTCfjsnaSPAsfecaVeIqo X-Received: by 2002:a17:906:8462:b0:993:ffcb:ad4e with SMTP id hx2-20020a170906846200b00993ffcbad4emr900539ejc.13.1691140673867; Fri, 04 Aug 2023 02:17:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691140673; cv=none; d=google.com; s=arc-20160816; b=ZrWr3rWDE0ukU8e4k5Slf59O3R36EqYtOdU9CfPHSR74cacZFPiI84lsxjbg53xexN e4wq6+eSDlhglMvoFBqzRbRq0U3U+7ACREFAlZShbWfgNW25ZKpzEuYRhhhjSI/jcKF3 1dkZClJuhXK/nFs89iUcLRAWhfkE19bZ9FgA/MwkiAIIPrbZc3Qb+Vg6I9A1cSavqCfH OWDeGX9m93W1Pe1emorTMmfe1NpEaU1u2yKnPh7KU8rdUsJ7B4v46XoNlkSROrML4KeA xQG6GblStfbUkAqUE9m77YBcFw6soRLh9AUSm5193h0VOvANSk4Kbjpw1n/vBol5ikyI woJQ== 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=uNfbrieWoE5w3ar6OeAUdwn0E/i/Pax5nr4x8xKsW8uMucDanlCW074x65Oc40XYc3 URVAYcpc17ENtI+y1350ahLK7fjQI04ebfomGjecoFr7l2puAza7ml+spJ1c9jbZNob3 GsbOIKlDexXTHmZgO9NbpSq/jMquRAV09xWZJ0kt3kjHcx9rPs0JeD5x1KE3to7Yucpf lPwAwQHi2OS1iuiAuCt1WYqMkP9OHGwhsdsMFFgv2IDSCbrkeofoCGStp+JmUrHr938Z Bfcnoh1AM7TpwX2PMV8DbN8veYjR7lCfMF+JqP35ZSEC1Ekh/DRwbBdRNf2RKit0fwNQ uuMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=ZdFh0yaf; 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 g3-20020a170906198300b0099bcd1d96acsi1431471ejd.9.2023.08.04.02.17.30; Fri, 04 Aug 2023 02:17:53 -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=ZdFh0yaf; 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 S229802AbjHDIuF (ORCPT <rfc822;sukrut.bellary@gmail.com> + 99 others); Fri, 4 Aug 2023 04:50:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229723AbjHDItd (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 4 Aug 2023 04:49:33 -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 1108B49E1 for <linux-kernel@vger.kernel.org>; Fri, 4 Aug 2023 01:49:31 -0700 (PDT) Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) (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 46CB4417BE for <linux-kernel@vger.kernel.org>; Fri, 4 Aug 2023 08:49:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1691138970; bh=GFNwWvhavDkNrI4eqwez7OWrv+w+Iw1WNhnwQW/Fw7E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ZdFh0yafbC1h4o4Creja86XLjlgPqIw/8g5zh1Q0AtHR/4uzszzMuJlGO4lyCf9Be jAhiXOyM/aRWrGH4Wx4sz4dt2tv3ArPqt+n7+IBT9Hlu568dxViaJFyj8kVDclsdTP q0ymyzearB/6eY2LF7LBhFC8uf73UVi/L1+2REXLtLOpA/0lQfWcq9G9Av3NZp2vWg dujJ8ovwsNtYcbi0pXOtwLKH6Oq7XBVqHG0ywFvD8CnFTeOkPIgct944T2/cIXmZte Bo6TqW76euy/qTRxSWNM/Ha6fy6zBQQ/PjI+q/RKaMOaN3FS6JIoZ9TJv6HEpyXo48 Z8SWEK4uH/9mA== Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-99bcf6ae8e1so122979066b.0 for <linux-kernel@vger.kernel.org>; Fri, 04 Aug 2023 01:49:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691138970; x=1691743770; 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=M4XAPdKroPwGhcGD4IJifOJY9mw5KZjr0o7Dd/5Urt3hvG5w+1fmBUbjM8Zt3/yp9P xoChKVH6AkcNM5gg6A6RnsHBMIMQGt6V5GoARrIJaQ01+Sm6qAHQJS676E8nTeQijKDo X0y/vtgavAZNMGZE6sifQR4BSJ9S3LbdfJ1DDax5xIWt60btduYfT/8j3bBpF6flWYjt KikdyK9C/bkWmaRM3GYS6+OKss+hdvYgyR4hX9MTU/zjLPBPyk8zgBm3OMEFTSg+GuUu j+927ils7goDNbagm+BoFnDydxSaHghYcQhLzqzad9sa2axzFAcCyCu15Vf7YsooRkJ5 sGpg== X-Gm-Message-State: AOJu0YyDhydI9bHhKtiYILZ0eICDX3sCGBE8Lt/JXM0I7ZxCzu4Ip3Nr Xnuot4i0VPJP7jBUe+iRA5IlgixN7G8G0QsOJUUaUgx0REeqsePWu2mg2si+MCMtXKiXASEu5FV Bpu65505UxbOK/GCrlvNnxyduvCFOBl5wWmkKpAdXFg== X-Received: by 2002:a17:907:75c9:b0:98e:26ae:9b07 with SMTP id jl9-20020a17090775c900b0098e26ae9b07mr856011ejc.35.1691138969807; Fri, 04 Aug 2023 01:49:29 -0700 (PDT) X-Received: by 2002:a17:907:75c9:b0:98e:26ae:9b07 with SMTP id jl9-20020a17090775c900b0098e26ae9b07mr856001ejc.35.1691138969650; Fri, 04 Aug 2023 01:49:29 -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 k25-20020a17090646d900b00992e94bcfabsm979279ejs.167.2023.08.04.01.49.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Aug 2023 01:49:29 -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 v9 01/12] fs: export mnt_idmap_get/mnt_idmap_put Date: Fri, 4 Aug 2023 10:48:47 +0200 Message-Id: <20230804084858.126104-2-aleksandr.mikhalitsyn@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230804084858.126104-1-aleksandr.mikhalitsyn@canonical.com> References: <20230804084858.126104-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,URIBL_BLOCKED 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: INBOX X-GMAIL-THRID: 1773289522955552477 X-GMAIL-MSGID: 1773289522955552477 |
Series |
ceph: support idmapped mounts
|
|
Commit Message
Aleksandr Mikhalitsyn
Aug. 4, 2023, 8:48 a.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);