[PATCH] ext4: Make ext4_lazyinit_thread freezable.

Lalith Rajendran posted 1 patch 3 years, 7 months ago
fs/ext4/super.c | 1 +
1 file changed, 1 insertion(+)
[PATCH] ext4: Make ext4_lazyinit_thread freezable.
Posted by Lalith Rajendran 3 years, 7 months ago
ext4_lazyinit_thread is not set freezable. Hence when the thread calls
try_to_freeze it doesn't freeze during suspend and continues to send
requests to the storage during suspend, resulting in suspend failures.

Signed-off-by: Lalith Rajendran <lalithkraj@google.com>
---
 fs/ext4/super.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 9a66abcca1a85..d77e0904a1327 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -3767,6 +3767,7 @@ static int ext4_lazyinit_thread(void *arg)
 	unsigned long next_wakeup, cur;
 
 	BUG_ON(NULL == eli);
+	set_freezable();
 
 cont_thread:
 	while (true) {
-- 
2.31.0
Re: [PATCH] ext4: Make ext4_lazyinit_thread freezable.
Posted by Theodore Ts'o 3 years, 6 months ago
On Thu, 18 Aug 2022 21:40:49 +0000, Lalith Rajendran wrote:
> ext4_lazyinit_thread is not set freezable. Hence when the thread calls
> try_to_freeze it doesn't freeze during suspend and continues to send
> requests to the storage during suspend, resulting in suspend failures.
> 
> 

Applied, thanks!

[1/1] ext4: Make ext4_lazyinit_thread freezable.
      commit: 5442d7d5073d1500c542ac0f2c881b738b1ef3a5

Best regards,
-- 
Theodore Ts'o <tytso@mit.edu>
Re: [PATCH] ext4: Make ext4_lazyinit_thread freezable.
Posted by Darrick J. Wong 3 years, 7 months ago
On Thu, Aug 18, 2022 at 09:40:49PM +0000, Lalith Rajendran wrote:
> ext4_lazyinit_thread is not set freezable. Hence when the thread calls
> try_to_freeze it doesn't freeze during suspend and continues to send
> requests to the storage during suspend, resulting in suspend failures.

Maybe we should just make suspend freeze all the filesystems in order?

https://lore.kernel.org/linux-fsdevel/20210417001026.23858-1-mcgrof@kernel.org/ 

--D

> Signed-off-by: Lalith Rajendran <lalithkraj@google.com>
> ---
>  fs/ext4/super.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 9a66abcca1a85..d77e0904a1327 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -3767,6 +3767,7 @@ static int ext4_lazyinit_thread(void *arg)
>  	unsigned long next_wakeup, cur;
>  
>  	BUG_ON(NULL == eli);
> +	set_freezable();
>  
>  cont_thread:
>  	while (true) {
> -- 
> 2.31.0
>