Commit 783ae44
ext4: Fix special handling of journalled data from extent zeroing
The handling of journalled data in ext4_zero_range() is incomplete. We
do not need to commit running transaction but we rather need to
checkpoint pages with journalled data. If we don't, journal tail can be
advanced beyond transaction containing the journalled data and if we
then crash before committing the transaction doing the zeroing we will
have inconsistent (too old) data in the file. Make sure file pages with
journalled data are properly checkpointed before removing them from the
page cache.
Signed-off-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Theodore Ts'o <[email protected]>1 parent c000dfe commit 783ae44
1 file changed
+14
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4526 | 4526 | | |
4527 | 4527 | | |
4528 | 4528 | | |
4529 | | - | |
4530 | | - | |
4531 | | - | |
4532 | | - | |
4533 | | - | |
4534 | | - | |
4535 | | - | |
4536 | 4529 | | |
4537 | 4530 | | |
4538 | 4531 | | |
| |||
4616 | 4609 | | |
4617 | 4610 | | |
4618 | 4611 | | |
| 4612 | + | |
| 4613 | + | |
| 4614 | + | |
| 4615 | + | |
| 4616 | + | |
| 4617 | + | |
| 4618 | + | |
| 4619 | + | |
| 4620 | + | |
| 4621 | + | |
| 4622 | + | |
| 4623 | + | |
| 4624 | + | |
| 4625 | + | |
4619 | 4626 | | |
4620 | 4627 | | |
4621 | 4628 | | |
| |||
0 commit comments