OSDN Git Service

ceph: flush the dirty caps immediatelly when quota is approaching
authorXiubo Li <xiubli@redhat.com>
Thu, 23 Jun 2022 09:17:21 +0000 (17:17 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 2 Aug 2022 22:54:13 +0000 (00:54 +0200)
commite027ddb6d3cce80945ab86358929460f91f5cf4f
treee81809ac5ed16afad01c10e80f63ca3be9b00194
parent842d6b019b180f5b78d71aa445ee3c724e34d462
ceph: flush the dirty caps immediatelly when quota is approaching

When the quota is approaching we need to notify it to the MDS as
soon as possible, or the client could write to the directory more
than expected.

This will flush the dirty caps without delaying after each write,
though this couldn't prevent the real size of a directory exceed
the quota but could prevent it as soon as possible.

Link: https://tracker.ceph.com/issues/56180
Signed-off-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Luís Henriques <lhenriques@suse.de>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/caps.c
fs/ceph/file.c