Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp6064013imb; Fri, 8 Mar 2019 08:30:26 -0800 (PST) X-Google-Smtp-Source: APXvYqyZnh1OCc/xaHTAycqMVaJl6tR67eI66mKUgdlHLOdLOZ/7eSjbPrdq1kbxpQd96dyRa2/4 X-Received: by 2002:aa7:8186:: with SMTP id g6mr19444551pfi.138.1552062626899; Fri, 08 Mar 2019 08:30:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1552062626; cv=none; d=google.com; s=arc-20160816; b=bhUvnPka6pEj2CgfV140dfRWiMmYkvaW1Re9tw6mPu78nRqjZtB4WXjB6HI+qtpDkJ /jzrtr2atTWu43XjrAeV2nh6/LJ7H9umsNqWzM7UYp36lLnTLJ02i1Clmy93KTyDOczX ERuewS63YzmY5BUbSdveiM3sJcKSJZJbFCKJQ11YSJiYyKNgKD6X57vPA2uSrlp3PkO1 yt1Xq3dIuR5EJ46qpBE2DgEfs8xuz1ThRYQmPaHu2LP0EurPjVXUdEQyrA4ff6SW013H kicEhqZrj3gXE9veIUkTPhYSF/EjxNfqFKLHMikZSAfDGjzv3SPLV77CC9OgZonHOh4J dRkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=19nHbCOU6kcqRpsTCvHc326Fg750BcvOxsoLSK/G+g4=; b=p3G9sdR1kEGy9A8zaQYwrslsVavCHV0jY1HqrBWwa6v+yCsd+quoiONq/f1ZxUtL8T hHic0KsvvlvW2lhgbVIzsrz/bay76r/74XGoBC2YJk0oX1XpwtUE/wPTUDgOq76Hm1Ip +E3qNjdsgmSLu8l3wc4qbjW3vKhsY/63cTto8CdJpxa85vzuouBua45CWLY0GhGHVFpB LgH6v9JgGNV6AnvPn2LyjQeCX4flg9y1TCGfxKD/UyrZamMsaXqpFLyfdRDxSe31RrJ/ sPgGlzwSNiMgVUqOxrby5cT4tbnJCWQxjNZkznP5bQ8rUDQCFKI4/M7IgGAX5h08cXSr bUoQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b1si6737714pgq.72.2019.03.08.08.30.10; Fri, 08 Mar 2019 08:30:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726498AbfCHQ2A (ORCPT + 99 others); Fri, 8 Mar 2019 11:28:00 -0500 Received: from mx2.suse.de ([195.135.220.15]:36462 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726171AbfCHQ2A (ORCPT ); Fri, 8 Mar 2019 11:28:00 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 52262B038; Fri, 8 Mar 2019 16:27:59 +0000 (UTC) From: Luis Henriques To: "Yan, Zheng" , Sage Weil , Ilya Dryomov Cc: ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org, Luis Henriques Subject: [PATCH 0/2] fix quota subdir mounts Date: Fri, 8 Mar 2019 16:27:55 +0000 Message-Id: <20190308162757.9260-1-lhenriques@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, As recently reported in the ceph-users mailing-list[1], the kernel client behaves differently from the fuse client regarding mounting subdirs where quotas are in effect. I've also created a bug to track this issue[2]. The following patches are a possible way of fixing this issue. The performance impact should be close to zero if the mount is done in the CephFS root inode. When we're mounting subdirs, we may have extra queries to the MDSs, depending on how many extra realms we'll need to loop through. Changes since RFC: The 1st patch hasn't been changed since the initial RFC. The 2nd patch has been refactored to include the following changes: - Zheng Yan's suggestions, i.e, move inode references from the realms to ceph_mds_client instance - It now also handles other cases where an MDS lookup may need to be performed: * statfs when there are quotas * renames, to forbid cross-quota renames [1] http://lists.ceph.com/pipermail/ceph-users-ceph.com/2019-February/033357.html [2] https://tracker.ceph.com/issues/38482 Cheers, -- Luís Luis Henriques (2): ceph: factor out ceph_lookup_inode() ceph: quota: fix quota subdir mounts fs/ceph/export.c | 14 ++++++- fs/ceph/mds_client.c | 14 +++++++ fs/ceph/mds_client.h | 2 + fs/ceph/quota.c | 91 +++++++++++++++++++++++++++++++++++++++----- fs/ceph/super.h | 3 ++ 5 files changed, 113 insertions(+), 11 deletions(-)