]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
ceph: quota: support for ceph.quota.max_files
authorLuis Henriques <lhenriques@suse.com>
Fri, 5 Jan 2018 10:47:19 +0000 (10:47 +0000)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 2 Jul 2019 16:30:46 +0000 (18:30 +0200)
commit6aa007eef3c16f0e228cb24c7cd577a1be761917
tree256779a622b2d0fdfea7f37f2e2d5bd9639b2cfc
parent7370e8a442bcb90d0072b5baa3265bbe4324dc18
ceph: quota: support for ceph.quota.max_files

BugLink: https://bugs.launchpad.net/bugs/1834235
This patch adds support for the max_files quota.  It hooks into all the
ceph functions that add new filesystem objects that need to be checked
against the quota limits.  When these limits are hit, -EDQUOT is returned.

Note that we're not checking quotas on ceph_link().  ceph_link doesn't
really create a new inode,  and since the MDS doesn't update the directory
statistics when a new (hard) link is created (only with symlinks), they
are not accounted as a new file.

Signed-off-by: Luis Henriques <lhenriques@suse.com>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit b7a2921765cf796280baf653a52b22b52e0ba266)
Signed-off-by: Connor Kuehl <connor.kuehl@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
fs/ceph/dir.c
fs/ceph/file.c
fs/ceph/quota.c
fs/ceph/super.h