linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] fix quota subdir mounts
@ 2019-03-12 14:20 Luis Henriques
  2019-03-12 14:20 ` [PATCH v2 1/2] ceph: factor out ceph_lookup_inode() Luis Henriques
  2019-03-12 14:20 ` [PATCH v2 2/2] ceph: quota: fix quota subdir mounts Luis Henriques
  0 siblings, 2 replies; 11+ messages in thread
From: Luis Henriques @ 2019-03-12 14:20 UTC (permalink / raw)
  To: Yan, Zheng, Sage Weil, Ilya Dryomov
  Cc: ceph-devel, linux-kernel, Luis Henriques

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 v1:

- Loop to free mdsc->quotarealms_inodes_list list was moved further down
  where it's not possible to race with insertions.  This way there's no need
  to hold the spinlock anymore.

- Clarified comments regarding the get_quota_realm function 'retry'
  parameter, both in the function itself and in function
  ceph_quota_is_same_realm, where that param is set to 'false'

- Distinguish between 'realm->inode is NULL' and igrab failures, both in
  get_quota_realm and check_quota_exceeded

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 |  15 ++++++
 fs/ceph/mds_client.h |   2 +
 fs/ceph/quota.c      | 106 +++++++++++++++++++++++++++++++++++++++----
 fs/ceph/super.h      |   3 ++
 5 files changed, 129 insertions(+), 11 deletions(-)


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-03-19 16:42 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-12 14:20 [PATCH v2 0/2] fix quota subdir mounts Luis Henriques
2019-03-12 14:20 ` [PATCH v2 1/2] ceph: factor out ceph_lookup_inode() Luis Henriques
2019-03-12 14:20 ` [PATCH v2 2/2] ceph: quota: fix quota subdir mounts Luis Henriques
2019-03-18  9:01   ` Yan, Zheng
2019-03-18  9:05     ` Gregory Farnum
2019-03-18  9:12       ` Yan, Zheng
2019-03-18 10:55         ` Luis Henriques
2019-03-18 11:19           ` Gregory Farnum
2019-03-18 12:55           ` Yan, Zheng
2019-03-18 13:06   ` Yan, Zheng
2019-03-19 16:42     ` Luis Henriques

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).