public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/3] erofs: correct the remaining shrink objects
@ 2020-02-26  8:10 Gao Xiang
  2020-02-28 19:44 ` Sasha Levin
  2020-03-03  9:33 ` Chao Yu
  0 siblings, 2 replies; 4+ messages in thread
From: Gao Xiang @ 2020-02-26  8:10 UTC (permalink / raw)
  To: Chao Yu, linux-erofs; +Cc: LKML, Miao Xie, Gao Xiang, stable

The remaining count should not include successful
shrink attempts.

Fixes: e7e9a307be9d ("staging: erofs: introduce workstation for decompression")
Cc: <stable@vger.kernel.org> # 4.19+
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
---

Changes since v1:
 - Add "Fixes:" tags respectively suggested by Eric. I'd suggest
   no rush to backport PATCH 2/3 and 3/3 since it's not quite
   sure whether they behave well for normal images for now and
   I will backport them manually later since they have no impact
   on system stability with corrupted images;

 - Fix PATCH 2/3 to exclude legacy (no decompression inplace
   support, < v5.3) images.

 fs/erofs/utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/erofs/utils.c b/fs/erofs/utils.c
index fddc5059c930..df42ea552a44 100644
--- a/fs/erofs/utils.c
+++ b/fs/erofs/utils.c
@@ -286,7 +286,7 @@ static unsigned long erofs_shrink_scan(struct shrinker *shrink,
 		spin_unlock(&erofs_sb_list_lock);
 		sbi->shrinker_run_no = run_no;
 
-		freed += erofs_shrink_workstation(sbi, nr);
+		freed += erofs_shrink_workstation(sbi, nr - freed);
 
 		spin_lock(&erofs_sb_list_lock);
 		/* Get the next list element before we move this one */
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 1/3] erofs: correct the remaining shrink objects
  2020-02-26  8:10 [PATCH v2 1/3] erofs: correct the remaining shrink objects Gao Xiang
@ 2020-02-28 19:44 ` Sasha Levin
  2020-02-29  1:11   ` Gao Xiang
  2020-03-03  9:33 ` Chao Yu
  1 sibling, 1 reply; 4+ messages in thread
From: Sasha Levin @ 2020-02-28 19:44 UTC (permalink / raw)
  To: Sasha Levin, Gao Xiang, Chao Yu, linux-erofs; +Cc: LKML, Miao Xie, stable

Hi

[This is an automated email]

This commit has been processed because it contains a "Fixes:" tag
fixing commit: e7e9a307be9d ("staging: erofs: introduce workstation for decompression").

The bot has tested the following trees: v5.5.6, v5.4.22, v4.19.106.

v5.5.6: Build OK!
v5.4.22: Failed to apply! Possible dependencies:
    bda17a4577da ("erofs: remove dead code since managed cache is now built-in")

v4.19.106: Failed to apply! Possible dependencies:
    05f9d4a0c8c4 ("staging: erofs: use the new LZ4_decompress_safe_partial()")
    0a64d62d5399 ("staging: erofs: fixed -Wmissing-prototype warnings by making functions static.")
    14f362b4f405 ("staging: erofs: clean up internal.h")
    152a333a5895 ("staging: erofs: add compacted compression indexes support")
    22fe04a77d10 ("staging: erofs: clean up shrinker stuffs")
    3b423417d0d1 ("staging: erofs: clean up erofs_map_blocks_iter")
    5fb76bb04216 ("staging: erofs: cleanup `z_erofs_vle_normalaccess_readpages'")
    6e78901a9f23 ("staging: erofs: separate erofs_get_meta_page")
    7dd68b147d60 ("staging: erofs: use explicit unsigned int type")
    7fc45dbc938a ("staging: erofs: introduce generic decompression backend")
    89fcd8360e7b ("staging: erofs: change 'unsigned' to 'unsigned int'")
    8be31270362b ("staging: erofs: introduce erofs_grab_bio")
    ab47dd2b0819 ("staging: erofs: cleanup z_erofs_vle_work_{lookup, register}")
    bda17a4577da ("erofs: remove dead code since managed cache is now built-in")
    d1ab82443bed ("staging: erofs: Modify conditional checks")
    e7dfb1cff65b ("staging: erofs: fixed -Wmissing-prototype warnings by moving prototypes to header file.")
    f0950b02a74c ("staging: erofs: Modify coding style alignments")


NOTE: The patch will not be queued to stable trees until it is upstream.

How should we proceed with this patch?

-- 
Thanks
Sasha

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 1/3] erofs: correct the remaining shrink objects
  2020-02-28 19:44 ` Sasha Levin
@ 2020-02-29  1:11   ` Gao Xiang
  0 siblings, 0 replies; 4+ messages in thread
From: Gao Xiang @ 2020-02-29  1:11 UTC (permalink / raw)
  To: Sasha Levin; +Cc: Chao Yu, linux-erofs, LKML, Miao Xie, stable

Hi,

On Fri, Feb 28, 2020 at 07:44:50PM +0000, Sasha Levin wrote:
> Hi
> 
> [This is an automated email]
> 
> This commit has been processed because it contains a "Fixes:" tag
> fixing commit: e7e9a307be9d ("staging: erofs: introduce workstation for decompression").
> 
> The bot has tested the following trees: v5.5.6, v5.4.22, v4.19.106.
> 
> v5.5.6: Build OK!
> v5.4.22: Failed to apply! Possible dependencies:
>     bda17a4577da ("erofs: remove dead code since managed cache is now built-in")
> 
> v4.19.106: Failed to apply! Possible dependencies:
>     05f9d4a0c8c4 ("staging: erofs: use the new LZ4_decompress_safe_partial()")
>     0a64d62d5399 ("staging: erofs: fixed -Wmissing-prototype warnings by making functions static.")
>     14f362b4f405 ("staging: erofs: clean up internal.h")
>     152a333a5895 ("staging: erofs: add compacted compression indexes support")
>     22fe04a77d10 ("staging: erofs: clean up shrinker stuffs")
>     3b423417d0d1 ("staging: erofs: clean up erofs_map_blocks_iter")
>     5fb76bb04216 ("staging: erofs: cleanup `z_erofs_vle_normalaccess_readpages'")
>     6e78901a9f23 ("staging: erofs: separate erofs_get_meta_page")
>     7dd68b147d60 ("staging: erofs: use explicit unsigned int type")
>     7fc45dbc938a ("staging: erofs: introduce generic decompression backend")
>     89fcd8360e7b ("staging: erofs: change 'unsigned' to 'unsigned int'")
>     8be31270362b ("staging: erofs: introduce erofs_grab_bio")
>     ab47dd2b0819 ("staging: erofs: cleanup z_erofs_vle_work_{lookup, register}")
>     bda17a4577da ("erofs: remove dead code since managed cache is now built-in")
>     d1ab82443bed ("staging: erofs: Modify conditional checks")
>     e7dfb1cff65b ("staging: erofs: fixed -Wmissing-prototype warnings by moving prototypes to header file.")
>     f0950b02a74c ("staging: erofs: Modify coding style alignments")

I will manually backport this if it can not be automatically applied.

Thanks,
Gao Xiang

> 
> 
> NOTE: The patch will not be queued to stable trees until it is upstream.
> 
> How should we proceed with this patch?
> 
> -- 
> Thanks
> Sasha

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2 1/3] erofs: correct the remaining shrink objects
  2020-02-26  8:10 [PATCH v2 1/3] erofs: correct the remaining shrink objects Gao Xiang
  2020-02-28 19:44 ` Sasha Levin
@ 2020-03-03  9:33 ` Chao Yu
  1 sibling, 0 replies; 4+ messages in thread
From: Chao Yu @ 2020-03-03  9:33 UTC (permalink / raw)
  To: Gao Xiang, linux-erofs; +Cc: LKML, Miao Xie, stable

On 2020/2/26 16:10, Gao Xiang wrote:
> The remaining count should not include successful
> shrink attempts.
> 
> Fixes: e7e9a307be9d ("staging: erofs: introduce workstation for decompression")
> Cc: <stable@vger.kernel.org> # 4.19+
> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>

Reviewed-by: Chao Yu <yuchao0@huawei.com>

Thanks,

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-03-03  9:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-26  8:10 [PATCH v2 1/3] erofs: correct the remaining shrink objects Gao Xiang
2020-02-28 19:44 ` Sasha Levin
2020-02-29  1:11   ` Gao Xiang
2020-03-03  9:33 ` Chao Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox