mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-28 00:32:00 +00:00
mm/migrate: skip migrating folios under writeback with AS_WRITEBACK_INDETERMINATE mappings
For migrations called in MIGRATE_SYNC mode, skip migrating the folio if it is under writeback and has the AS_WRITEBACK_INDETERMINATE flag set on its mapping. If the AS_WRITEBACK_INDETERMINATE flag is set on the mapping, the writeback may take an indeterminate amount of time to complete, and waits may get stuck. Link: https://lkml.kernel.org/r/20241122232359.429647-5-joannelkoong@gmail.com Signed-off-by: Joanne Koong <joannelkoong@gmail.com> Reviewed-by: Shakeel Butt <shakeel.butt@linux.dev> Acked-by: Miklos Szeredi <mszeredi@redhat.com> Cc: Bernd Schubert <bernd.schubert@fastmail.fm> Cc: Jingbo Xu <jefflexu@linux.alibaba.com> Cc: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
0da1c1a78d
commit
2cdf65eaaa
@ -1254,7 +1254,10 @@ static int migrate_folio_unmap(new_folio_t get_new_folio,
|
||||
*/
|
||||
switch (mode) {
|
||||
case MIGRATE_SYNC:
|
||||
break;
|
||||
if (!src->mapping ||
|
||||
!mapping_writeback_indeterminate(src->mapping))
|
||||
break;
|
||||
fallthrough;
|
||||
default:
|
||||
rc = -EBUSY;
|
||||
goto out;
|
||||
|
Loading…
Reference in New Issue
Block a user