aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/fs/ceph/quota.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2021-11-09 09:54:49 -0500
committerIlya Dryomov <idryomov@gmail.com>2022-01-13 13:40:07 +0100
commit0078ea3b0566e3da09ae8e1e4fbfd708702f2876 (patch)
tree87b8a12c1fcfc4c14ec67789fd11ee2c4c068501 /fs/ceph/quota.c
parentceph: drop send metrics debug message (diff)
downloadwireguard-linux-0078ea3b0566e3da09ae8e1e4fbfd708702f2876.tar.xz
wireguard-linux-0078ea3b0566e3da09ae8e1e4fbfd708702f2876.zip
ceph: don't check for quotas on MDS stray dirs
玮文 胡 reported seeing the WARN_RATELIMIT pop when writing to an inode that had been transplanted into the stray dir. The client was trying to look up the quotarealm info from the parent and that tripped the warning. Change the ceph_vino_is_reserved helper to not throw a warning for MDS stray directories (0x100 - 0x1ff), only for reserved dirs that are not in that range. Also, fix ceph_has_realms_with_quotas to return false when encountering a reserved inode. URL: https://tracker.ceph.com/issues/53180 Reported-by: Hu Weiwen <sehuww@mail.scut.edu.cn> Signed-off-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Luis Henriques <lhenriques@suse.de> Reviewed-by: Xiubo Li <xiubli@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/quota.c')
-rw-r--r--fs/ceph/quota.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ceph/quota.c b/fs/ceph/quota.c
index 24ae13ea2241..a338a3ec0dc4 100644
--- a/fs/ceph/quota.c
+++ b/fs/ceph/quota.c
@@ -30,6 +30,9 @@ static inline bool ceph_has_realms_with_quotas(struct inode *inode)
/* if root is the real CephFS root, we don't have quota realms */
if (root && ceph_ino(root) == CEPH_INO_ROOT)
return false;
+ /* MDS stray dirs have no quota realms */
+ if (ceph_vino_is_reserved(ceph_inode(inode)->i_vino))
+ return false;
/* otherwise, we can't know for sure */
return true;
}