Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp316063img; Mon, 18 Mar 2019 03:56:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqwX5jbxO26YGnLCw7sksPPIo9VAcFMiIyZKz8U3CwkFofSEfQN2ryuoWXPD1HE2lrwTsFLC X-Received: by 2002:a17:902:2ec1:: with SMTP id r59mr18857257plb.171.1552906608412; Mon, 18 Mar 2019 03:56:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552906608; cv=none; d=google.com; s=arc-20160816; b=AQX9Ce3n67S0nSW+t04N/lPrl6J15TJRNbPOyjo0gtDxmYtUic60xaTYmUdd1xE37Y f2q8ZpyFcGnDcnCahA4sXCCpc+OYYMKy3wpw5JkPd4DH6S/wr5Gkriq6lxfbpI3gM70L 3XEQBS7uhtbtKDCvTtGhNdfYI586eseqhcpIcfBzELtG2F9V8fOl/2afx/Yi34zopTlg J7sQBHWduYxcIbfDzkKQK7n9TgEWKhGeqkQQin8MN3Yve8krlnOVgEVSg3/wtJPhQKIb nTNyeKuZ82q05MyrpfOSS4cqPHYxO+eJP+8xmYoBykLt+WCl42L8LQJktiOGZ1NzeeSg YiSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to:date :references:subject:cc:to:from; bh=8C+D/xbCI+0SUgrbMStC0hjm+Fqv4C2LL6m47iA+TgU=; b=BNANtLn2CCJyyEV1U9ZI6x4trNgnnZ33BKVSwtfg38yVJrkVqqIVfYMYnBZxcJb415 5SONuBqknwE+wMf4D9RcXeK+1Gqp9I83bmMbWMTmnoIzKU0v/ZRguCVMGCsbht2vQR7p +6TNWQPRTXh1Y/BmQdEH0wbZv+dY6EVWgWvlIo9I8YOsjJYYRAUYRoxfjn/tJpeRcpmy 0ZxgM+qr7nFqnYIoQ2NrfAssz9DpckL+kHYF1vQAwrvbUMV3sEeFCZ/eeYuMhnnFl0ta kpnmDvCVVRTxYJONrQ6AfgFKPvkfmQt7PNhrdsxWx2t147tT+wyqaOlXRNWZFFBYei/I J14A== 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 g4si8548276pgi.380.2019.03.18.03.56.33; Mon, 18 Mar 2019 03:56:48 -0700 (PDT) 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 S1726788AbfCRKzs (ORCPT + 99 others); Mon, 18 Mar 2019 06:55:48 -0400 Received: from mx2.suse.de ([195.135.220.15]:44396 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726493AbfCRKzs (ORCPT ); Mon, 18 Mar 2019 06:55:48 -0400 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 BBA13ACFA; Mon, 18 Mar 2019 10:55:46 +0000 (UTC) From: Luis Henriques To: "Yan\, Zheng" Cc: Gregory Farnum , "Yan\, Zheng" , Sage Weil , Ilya Dryomov , ceph-devel , Linux Kernel Mailing List , Hendrik Peyerl Subject: Re: [PATCH v2 2/2] ceph: quota: fix quota subdir mounts References: <20190312142019.30936-1-lhenriques@suse.com> <20190312142019.30936-3-lhenriques@suse.com> Date: Mon, 18 Mar 2019 10:55:45 +0000 In-Reply-To: (Zheng Yan's message of "Mon, 18 Mar 2019 17:12:39 +0800") Message-ID: <87lg1czc26.fsf@suse.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org "Yan, Zheng" writes: > On Mon, Mar 18, 2019 at 5:06 PM Gregory Farnum wrote: >> >> On Mon, Mar 18, 2019 at 2:32 PM Yan, Zheng wrote: >> > After reading the code carefully. I feel a little uncomfortable with >> > the "lookup_ino" in get_quota_realm. how about populating directories >> > above the 'mount subdir' during mounting (similar to cifs_get_root ). Wouldn't it be a problem if the directory layout (or, in this case, the snaprealm layout) change during the mount lifetime? In that case we would need to do this lookup anyway. >> >> Isn't that going to be a problem for any clients which have >>restricted filesystem access permissions? They may not be able to see >>all the directories above their mount point. -Greg > > using lookup_ino to get inode above the "mount subdir" has the same problem > In this case I believe we get an -EPERM from the MDS. And then the client simply falls back to the 'default' behaviour, which is to allow the user to create/write to files as if there were no quotas set. Cheers, -- Luis