All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luis Henriques <lhenriques@suse.com>
To: "Yan, Zheng" <zyan@redhat.com>
Cc: Sage Weil <sage@redhat.com>, Ilya Dryomov <idryomov@gmail.com>,
	Jan Fajerski <jfajerski@suse.com>,
	Ceph Development <ceph-devel@vger.kernel.org>,
	Jeff Layton <jlayton@redhat.com>
Subject: Re: [RFC PATCH 2/3] ceph: quotas: support for ceph.quota.max_files
Date: Fri, 08 Sep 2017 09:33:54 +0100	[thread overview]
Message-ID: <871snhlhcd.fsf@hermes> (raw)
In-Reply-To: <B56DB47D-CFD8-49E5-8483-CF591488DD2D@redhat.com> (Zheng Yan's message of "Thu, 7 Sep 2017 22:22:20 +0800")

"Yan, Zheng" <zyan@redhat.com> writes:

>> On 6 Sep 2017, at 22:12, Luis Henriques <lhenriques@suse.com> wrote:
<snip>
> This bottom-up dentry traversal code worries me. I vaguely remember that bottom-up
> dentry traversal in kernel is discouraged. Then there are multiples clients modifying
> the filesystem at the same time, the rename_lock does not help. That's why user space
> code Client::get_quota_root() checks dentry lease and does lookup parent. I’m not sure
> if we can do the same operations in kernel, because locking is much more complex in
> kernel.

So, you're saying that in addition to using the rename_lock (for local
renames), that loop will also need to do something similar to what's
being done already in function ceph_d_revalidate.  I.e., it needs to
validate the lease (as in function dentry_lease_is_valid) and send a
CEPH_MDS_OP_LOOKUP if a dentry is invalid.  Or am I missing something?

> For the long term, I prefer unifying quota and snapshot implementation. The inode
> trace in MClientReply contains information about which quota realm the inode belongs
> to. So client can find quota information easily. (This requires bigger change for both
> mds and client)

My motivation for trying to bring the kernel client a bit closer to
the fuse client was that there are currently valid use-cases for this
quota implementation, with all its limitations.

Now, I completely agree that ideally the core quota implementation
should be moved to the MDS.  This would simplify the clients side,
and, above all, would remove the limitation of requiring clients
cooperation.

Obviously, I would be more than happy to help on the kernel client
side of this solution.  But I'm afraid that the real hard work would
be on the MDS code, where things such as multi-MDS and dir
fragmentation would make this solution quite complex.

Cheers,
-- 
Luís

  reply	other threads:[~2017-09-08  8:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-06 14:12 [RFC PATCH 0/3] ceph: kernel client cephfs quota support Luis Henriques
2017-09-06 14:12 ` [RFC PATCH 1/3] ceph: quota: add initial infrastructure to support cephfs quotas Luis Henriques
2017-09-06 14:12 ` [RFC PATCH 2/3] ceph: quotas: support for ceph.quota.max_files Luis Henriques
2017-09-07 14:22   ` Yan, Zheng
2017-09-08  8:33     ` Luis Henriques [this message]
2017-09-08 10:43       ` Yan, Zheng
2017-09-06 14:12 ` [RFC PATCH 3/3] ceph: quota: don't allow cross-quota renames Luis Henriques

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871snhlhcd.fsf@hermes \
    --to=lhenriques@suse.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=idryomov@gmail.com \
    --cc=jfajerski@suse.com \
    --cc=jlayton@redhat.com \
    --cc=sage@redhat.com \
    --cc=zyan@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.