OSDN Git Service

gfs2: check for no eligible quota changes
authorBob Peterson <rpeterso@redhat.com>
Thu, 8 Jun 2023 17:30:16 +0000 (12:30 -0500)
committerAndreas Gruenbacher <agruenba@redhat.com>
Tue, 5 Sep 2023 13:58:18 +0000 (15:58 +0200)
commit06aa6fd31a5f402b055e12ea53bb7b086359d3c8
treef1ce148e26fac7f09582b08c30a678bde73847dd
parent36a740916a94ea0efa0c5c2ddcd9dcdce56c9a40
gfs2: check for no eligible quota changes

Before this patch, function gfs2_quota_sync would always allocate a page
full of memory and increment its quota sync generation number. This
happened even when the system was completely idle or if no blocks were
allocated or quota changes made. This patch adds function qd_changed
to determine if any changes have been made that qualify for a
quota sync. If not, it avoids the memory allocation and bumping the
generation number, along with all the additional work it would do.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
fs/gfs2/quota.c