Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1120374rwd; Wed, 7 Jun 2023 11:15:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4EfKX4UCFVU/9Nt2xfSzeY04wUBojmmdLFEHr4tIFoJQ6ut8jTNXd5FZjB4asBuf0HBLVq X-Received: by 2002:a05:6a00:2442:b0:651:7133:3f59 with SMTP id d2-20020a056a00244200b0065171333f59mr3289352pfj.3.1686161705989; Wed, 07 Jun 2023 11:15:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686161705; cv=none; d=google.com; s=arc-20160816; b=hEC8S5U7ZGJroc8dVXYzW9PosAOufvHOLEO3ydQlGKHcF3ibvqR6iSy8Bf+a9ZYzio GGHwRYgctbm1dsdj5vx6gflEEYE5FTR+XpCr/jdj1FuTyOXlMqZ54niXe3Ryy2JS1tpc q74Gc/S2kECSfz0FLqvr5ap2cnyDmJQS940/RdE2cubUI0FPVtRDGSEMmjXEULAro9Mf 7fblnvR+5hajyrQ6UxROb9u3O5dGbjqBcs1cj4z6RB3esiaJhVhDicFuTcHA6kO5z/MU sYAy5Ldbw7TPioorZ60fU1PruVzDi7GG3ltemTWTT67l7/suHXDzaPE5km/hTda9lkmt 2sMA== 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=U0wDd5vU5m4d9k8unybyLOfQsgHlr2098zatHuE7IuM=; b=Dizo99eJcG9s4DEYwmwiUv3zsOr1vOlfwfqfdB7Fe0rUhdSUOIVMiBQzOSkMvxwzso aVZ2Yj9gMKT8Yeec7Sf7mwIOXS3u8l5cT6oSphjSoVNlqJwVU4kGeAMWksqaGrj3aPSF 8Tz9/8r2XdBgeTXR8f+GLQLnj+H4bssGzKXoVLCPJ6db2F4omjkf8dsSnnEBOmKOgdxU a5yE98DWwkbxhCeTavL9RusjA1w20QrS4xUCvVAyBNoWFozVFiWuSLB2xVBaKQ5rp9Gl JrHsBdq65ulcsZfN+EtjeW9dflFT7zlFr4aCQ0gcxeGllRKUwtPtySo2S8FP1BFxNBA+ VAuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=ldL169xN; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s6-20020a625e06000000b0065300b42889si1723229pfb.363.2023.06.07.11.14.53; Wed, 07 Jun 2023 11:15:05 -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=ldL169xN; 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 S232759AbjFGSLh (ORCPT + 99 others); Wed, 7 Jun 2023 14:11:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232580AbjFGSLC (ORCPT ); Wed, 7 Jun 2023 14:11:02 -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 8E0BF173B for ; Wed, 7 Jun 2023 11:10:51 -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 61C293F154 for ; Wed, 7 Jun 2023 18:10:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1686161448; bh=U0wDd5vU5m4d9k8unybyLOfQsgHlr2098zatHuE7IuM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ldL169xNMQ6eUQugy7Hh/gSYwpxyZaEYgmX3W+adg73fYV2m3fOMVZVaIdS5EdF7Y Fo63hseefReNeLCKUyKTxeuXPxUu+eb8mppxjz832753rR5DzEAU3YOXmXbCU16/wb ncgO058JVfcxMikZ931K7sIOGJsPmEJGFdOLOPXSIUvRXqGsaTvZKqP0au7AVdGqLg oaivhcrJ/buzI6CaynR01IdW6rKBmwEonxUG8wzGgS474UUzCMzbxKuO1unRpR8BKN fTtI8STnpaTFUY75gX+ZxCqnsdvCMfCdFEpp7JVLTQxGP4KWggVCs+C7LTshxqNHFv NHG9ipxTbPgtA== Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-975942c2a29so463460266b.0 for ; Wed, 07 Jun 2023 11:10:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686161448; x=1688753448; 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=U0wDd5vU5m4d9k8unybyLOfQsgHlr2098zatHuE7IuM=; b=fVQlRQkG9C8yMEorVkh3V3zRp6AjJEGUuk66ASSqfK06WV9rIQsstGorZiGnVL86mt JTiJZlpx4W/g4/1M4lTlb75Nk67bqeoGx/dVs6XQmYyNVm/XD+fY5UyL5oVY8eZxyivW /iFrZC8aBFQijgiiuV0oC0hib2FBQjZ4AiBd89Bv48Hs1WFp5RglRo4ZzMmoVaeMREzu v703l0ApNAWUznIHKHeAZ0RHghw2MKfk8xo15HKAQCoBkGWOYrAqjr1O0LrbakrGLY0o 0x/k+/vVvQjVRpeR/4IG/q/aJQnk6Ezy1zQ3dCQXiLt/ZYJ5sqHapmgT6ZwU2rH0GDnb +PDw== X-Gm-Message-State: AC+VfDx1KY3jXrl5nDdiYhgLypMvckzn9LuGwH36TdoFKoxw7/zpCvtG KB5fRB0IKdnvZgkROIhxlMU/saaGkx98dqmS6KLVvs7IIQr2e1842OknZwkQ6TZljxgF8qgIZZK 8NcYuVCvUXnU4QCElqyi59HSWAVOOIL8mr3n3Fe6OrQ== X-Received: by 2002:a17:906:dc8e:b0:965:6d21:48bc with SMTP id cs14-20020a170906dc8e00b009656d2148bcmr6951904ejc.75.1686161448211; Wed, 07 Jun 2023 11:10:48 -0700 (PDT) X-Received: by 2002:a17:906:dc8e:b0:965:6d21:48bc with SMTP id cs14-20020a170906dc8e00b009656d2148bcmr6951885ejc.75.1686161447977; Wed, 07 Jun 2023 11:10:47 -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 oz17-20020a170906cd1100b009745edfb7cbsm7170494ejb.45.2023.06.07.11.10.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Jun 2023 11:10:47 -0700 (PDT) From: Alexander Mikhalitsyn To: xiubli@redhat.com Cc: brauner@kernel.org, stgraber@ubuntu.com, linux-fsdevel@vger.kernel.org, Christian Brauner , Jeff Layton , Ilya Dryomov , ceph-devel@vger.kernel.org, Alexander Mikhalitsyn , linux-kernel@vger.kernel.org Subject: [PATCH v4 07/14] ceph: allow idmapped rename inode op Date: Wed, 7 Jun 2023 20:09:50 +0200 Message-Id: <20230607180958.645115-8-aleksandr.mikhalitsyn@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230607180958.645115-1-aleksandr.mikhalitsyn@canonical.com> References: <20230607180958.645115-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: X-Mailing-List: linux-kernel@vger.kernel.org From: Christian Brauner Enable ceph_rename() to handle idmapped mounts. This is just a matter of passing down the mount's idmapping. Cc: Xiubo Li Cc: Jeff Layton Cc: Ilya Dryomov Cc: ceph-devel@vger.kernel.org Signed-off-by: Christian Brauner Signed-off-by: Alexander Mikhalitsyn --- v4: - call mnt_idmap_get --- fs/ceph/dir.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 5ef90a49b156..355c5574ad27 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -1327,6 +1327,7 @@ static int ceph_rename(struct mnt_idmap *idmap, struct inode *old_dir, req->r_old_dentry_unless = CEPH_CAP_FILE_EXCL; req->r_dentry_drop = CEPH_CAP_FILE_SHARED; req->r_dentry_unless = CEPH_CAP_FILE_EXCL; + req->r_mnt_idmap = mnt_idmap_get(idmap); /* release LINK_RDCACHE on source inode (mds will lock it) */ req->r_old_inode_drop = CEPH_CAP_LINK_SHARED | CEPH_CAP_LINK_EXCL; if (d_really_is_positive(new_dentry)) { -- 2.34.1