linux/fs/ceph
Luis Henriques 0c44a8e0fc ceph: quota: fix quota subdir mounts
The CephFS kernel client does not enforce quotas set in a directory that
isn't visible from the mount point.  For example, given the path
'/dir1/dir2', if quotas are set in 'dir1' and the filesystem is mounted with

  mount -t ceph <server>:<port>:/dir1/ /mnt

then the client won't be able to access 'dir1' inode, even if 'dir2' belongs
to a quota realm that points to it.

This patch fixes this issue by simply doing an MDS LOOKUPINO operation for
unknown inodes.  Any inode reference obtained this way will be added to a
list in ceph_mds_client, and will only be released when the filesystem is
umounted.

Link: https://tracker.ceph.com/issues/38482
Reported-by: Hendrik Peyerl <hpeyerl@plusline.net>
Signed-off-by: Luis Henriques <lhenriques@suse.com>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2019-05-07 19:22:36 +02:00
..
acl.c libceph: introduce ceph_pagelist_alloc() 2018-10-22 10:28:21 +02:00
addr.c ceph: use vmf_error() in ceph_filemap_fault() 2019-01-07 22:48:48 +01:00
cache.c ceph: use timespec64 for inode timestamp 2018-08-02 21:26:12 +02:00
cache.h ceph: improve fscache revalidation 2016-06-01 10:31:50 +02:00
caps.c ceph: add mount option to limit caps count 2019-03-05 18:55:17 +01:00
ceph_frag.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
debugfs.c ceph: remove dentry_lru file from debugfs 2019-03-05 18:55:17 +01:00
dir.c ceph: ensure d_name stability in ceph_dentry_hash() 2019-04-23 21:37:54 +02:00
export.c ceph: factor out ceph_lookup_inode() 2019-05-07 19:22:36 +02:00
file.c ceph: pass inclusive lend parameter to filemap_write_and_wait_range() 2019-03-05 18:55:17 +01:00
inode.c ceph: handle the case where a dentry has been renamed on outstanding req 2019-04-23 21:37:54 +02:00
ioctl.c libceph, ceph: move ceph_calc_file_object_mapping() to striper.c 2018-04-02 10:12:43 +02:00
ioctl.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig fs/*/Kconfig: drop links to 404-compliant http://acl.bestbits.at 2018-01-01 12:45:37 -07:00
locks.c ceph: remove duplicated filelock ref increase 2019-05-07 19:22:36 +02:00
Makefile ceph: quota: add initial infrastructure to support cephfs quotas 2018-04-02 11:17:51 +02:00
mds_client.c ceph: quota: fix quota subdir mounts 2019-05-07 19:22:36 +02:00
mds_client.h ceph: quota: fix quota subdir mounts 2019-05-07 19:22:36 +02:00
mdsmap.c ceph: remove redundant assignment 2018-12-26 15:56:04 +01:00
quota.c ceph: quota: fix quota subdir mounts 2019-05-07 19:22:36 +02:00
snap.c ceph: fix ci->i_head_snapc leak 2019-04-23 21:37:54 +02:00
strings.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
super.c ceph: add mount option to limit caps count 2019-03-05 18:55:17 +01:00
super.h ceph: quota: fix quota subdir mounts 2019-05-07 19:22:36 +02:00
xattr.c ceph: support getting ceph.dir.pin vxattr 2019-03-05 18:55:16 +01:00