[Devel] [PATCH RHEL7 COMMIT] ms/fs/ext4: __ext4_es_shrink() rename 'ret' to 'shrunk'
Konstantin Khorenko
khorenko at virtuozzo.com
Fri Sep 15 13:34:53 MSK 2017
The commit is pushed to "branch-rh7-3.10.0-514.26.1.vz7.35.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-514.26.1.vz7.35.8
------>
commit 2f6be91ce546839a0ad3f4d25e2888d4edeea4f0
Author: Andrey Ryabinin <aryabinin at virtuozzo.com>
Date: Fri Sep 15 13:34:53 2017 +0300
ms/fs/ext4: __ext4_es_shrink() rename 'ret' to 'shrunk'
This renames 'ret' variable to 'shrunk' as it used to count
shrunk extents.
This patch is the lost hunk from the upstream version of
patch "fs: convert fs shrinkers to new scan/count API",
which doesn't present in our backport:
9d22f7aba1b7ee7014fadd042a49be27a308ff74
Author: Vladimir Davydov <vdavydov at parallels.com>
Date: Fri Jul 17 11:51:54 2015 +0300
ms/fs: convert fs shrinkers to new scan/count API
To be merged.
Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>
---
fs/ext4/extents_status.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c
index 71a6e72..6f1f614 100644
--- a/fs/ext4/extents_status.c
+++ b/fs/ext4/extents_status.c
@@ -943,13 +943,15 @@ static int __ext4_es_shrink(struct ext4_sb_info *sbi, int nr_to_scan,
struct ext4_inode_info *ei;
struct list_head *cur, *tmp;
LIST_HEAD(skipped);
- int ret, nr_shrunk = 0;
+ int nr_shrunk = 0;
int retried = 0, skip_precached = 1, nr_skipped = 0;
spin_lock(&sbi->s_es_lru_lock);
retry:
list_for_each_safe(cur, tmp, &sbi->s_es_lru) {
+ int shrunk;
+
/*
* If we have already reclaimed all extents from extent
* status tree, just stop the loop immediately.
@@ -976,13 +978,13 @@ static int __ext4_es_shrink(struct ext4_sb_info *sbi, int nr_to_scan,
!write_trylock(&ei->i_es_lock))
continue;
- ret = __es_try_to_reclaim_extents(ei, nr_to_scan);
+ shrunk = __es_try_to_reclaim_extents(ei, nr_to_scan);
if (ei->i_es_lru_nr == 0)
list_del_init(&ei->i_es_lru);
write_unlock(&ei->i_es_lock);
- nr_shrunk += ret;
- nr_to_scan -= ret;
+ nr_shrunk += shrunk;
+ nr_to_scan -= shrunk;
if (nr_to_scan == 0)
break;
}
More information about the Devel
mailing list