Skip to content

Commit 0af83ab

Browse files
Liu Songrichardweinberger
authored andcommitted
ubifs: Limit the number of pages in shrink_liability
If the number of dirty pages to be written back is large, then writeback_inodes_sb will block waiting for a long time, causing hung task detection alarm. Therefore, we should limit the maximum number of pages written back this time, which let the budget be completed faster. The remaining dirty pages tend to rely on the writeback mechanism to complete the synchronization. Fixes: b6e5131 ("writeback: separate starting of sync vs opportunistic writeback") Signed-off-by: Liu Song <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
1 parent 377e208 commit 0af83ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/ubifs/budget.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
static void shrink_liability(struct ubifs_info *c, int nr_to_write)
5252
{
5353
down_read(&c->vfs_sb->s_umount);
54-
writeback_inodes_sb(c->vfs_sb, WB_REASON_FS_FREE_SPACE);
54+
writeback_inodes_sb_nr(c->vfs_sb, nr_to_write, WB_REASON_FS_FREE_SPACE);
5555
up_read(&c->vfs_sb->s_umount);
5656
}
5757

0 commit comments

Comments
 (0)