Commit 1e7bef5
f2fs: finish previous checkpoints before returning from remount
Flush remaining checkpoint requests at the end of remount, since a new
checkpoint would be triggered while remount and we need to take care of
it before returning from remount, in order to avoid the below race
condition.
- Thread - checkpoint thread
do_remount()
down_write(&sb->s_umount);
f2fs_remount()
f2fs_disable_checkpoint(sbi) -> add checkpoints to the list
block_operations()
down_read_trylock(&sb->s_umount) = 0
up_write(&sb->s_umount);
f2fs_quota_sync()
dquot_writeback_dquots()
WARN_ON_ONCE(!rwsem_is_locked(&sb->s_umount));
Signed-off-by: Daeho Jeong <daehojeong@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>1 parent 9b4c8dd commit 1e7bef5
1 file changed
Lines changed: 32 additions & 27 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2319 | 2319 | | |
2320 | 2320 | | |
2321 | 2321 | | |
2322 | | - | |
2323 | 2322 | | |
2324 | 2323 | | |
| 2324 | + | |
2325 | 2325 | | |
2326 | 2326 | | |
2327 | 2327 | | |
| |||
2485 | 2485 | | |
2486 | 2486 | | |
2487 | 2487 | | |
2488 | | - | |
2489 | | - | |
2490 | | - | |
2491 | | - | |
2492 | | - | |
2493 | | - | |
2494 | | - | |
2495 | | - | |
2496 | | - | |
2497 | | - | |
2498 | | - | |
2499 | | - | |
2500 | | - | |
2501 | | - | |
2502 | | - | |
2503 | | - | |
2504 | | - | |
2505 | | - | |
2506 | 2488 | | |
2507 | 2489 | | |
2508 | 2490 | | |
| |||
2514 | 2496 | | |
2515 | 2497 | | |
2516 | 2498 | | |
2517 | | - | |
| 2499 | + | |
2518 | 2500 | | |
2519 | 2501 | | |
2520 | 2502 | | |
| |||
2536 | 2518 | | |
2537 | 2519 | | |
2538 | 2520 | | |
| 2521 | + | |
2539 | 2522 | | |
2540 | 2523 | | |
| 2524 | + | |
| 2525 | + | |
| 2526 | + | |
| 2527 | + | |
| 2528 | + | |
| 2529 | + | |
| 2530 | + | |
| 2531 | + | |
| 2532 | + | |
| 2533 | + | |
| 2534 | + | |
| 2535 | + | |
| 2536 | + | |
| 2537 | + | |
| 2538 | + | |
| 2539 | + | |
| 2540 | + | |
| 2541 | + | |
| 2542 | + | |
| 2543 | + | |
| 2544 | + | |
| 2545 | + | |
2541 | 2546 | | |
2542 | 2547 | | |
2543 | 2548 | | |
| |||
2555 | 2560 | | |
2556 | 2561 | | |
2557 | 2562 | | |
| 2563 | + | |
| 2564 | + | |
| 2565 | + | |
| 2566 | + | |
| 2567 | + | |
| 2568 | + | |
| 2569 | + | |
2558 | 2570 | | |
2559 | 2571 | | |
2560 | 2572 | | |
| |||
2570 | 2582 | | |
2571 | 2583 | | |
2572 | 2584 | | |
2573 | | - | |
2574 | | - | |
2575 | | - | |
2576 | | - | |
2577 | | - | |
2578 | | - | |
2579 | | - | |
2580 | 2585 | | |
2581 | 2586 | | |
2582 | 2587 | | |
| |||
0 commit comments