ceph: don't check for quotas on MDS stray dirs
authorJeff Layton <jlayton@kernel.org>
Tue, 9 Nov 2021 14:54:49 +0000 (09:54 -0500)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 13 Jan 2022 12:40:07 +0000 (13:40 +0100)
commit0078ea3b0566e3da09ae8e1e4fbfd708702f2876
tree87b8a12c1fcfc4c14ec67789fd11ee2c4c068501
parentaf9ceae83cd26c9319bb2cdab23bb16d39300cbd
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>
fs/ceph/quota.c
fs/ceph/super.h