Commit bdc8a53
ext4: fast commit may miss file actions
in the follow scenario:
1. jbd start transaction n
2. task A get new handle for transaction n+1
3. task A do some actions and add inode to FC_Q_MAIN fc_q
4. jbd complete transaction n and clear FC_Q_MAIN fc_q
5. task A call fsync
Fast commit will lost the file actions during a full commit.
we should also add updates to staging queue during a full commit.
and in ext4_fc_cleanup(), when reset a inode's fc track range, check
it's i_sync_tid, if it bigger than current transaction tid, do not
rest it, or we will lost the track range.
And EXT4_MF_FC_COMMITTING is not needed anymore, so drop it.
Signed-off-by: Xin Yin <yinxin.x@bytedance.com>
Link: https://lore.kernel.org/r/20220117093655.35160-3-yinxin.x@bytedance.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org1 parent e85c81b commit bdc8a53
3 files changed
Lines changed: 7 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1795 | 1795 | | |
1796 | 1796 | | |
1797 | 1797 | | |
1798 | | - | |
1799 | | - | |
1800 | | - | |
1801 | | - | |
| 1798 | + | |
1802 | 1799 | | |
1803 | 1800 | | |
1804 | 1801 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
375 | 375 | | |
376 | 376 | | |
377 | 377 | | |
378 | | - | |
| 378 | + | |
| 379 | + | |
379 | 380 | | |
380 | 381 | | |
381 | 382 | | |
| |||
428 | 429 | | |
429 | 430 | | |
430 | 431 | | |
431 | | - | |
| 432 | + | |
| 433 | + | |
432 | 434 | | |
433 | 435 | | |
434 | 436 | | |
| |||
893 | 895 | | |
894 | 896 | | |
895 | 897 | | |
896 | | - | |
897 | 898 | | |
898 | 899 | | |
899 | 900 | | |
| |||
1211 | 1212 | | |
1212 | 1213 | | |
1213 | 1214 | | |
1214 | | - | |
| 1215 | + | |
| 1216 | + | |
1215 | 1217 | | |
1216 | 1218 | | |
1217 | 1219 | | |
| |||
1240 | 1242 | | |
1241 | 1243 | | |
1242 | 1244 | | |
1243 | | - | |
1244 | 1245 | | |
1245 | 1246 | | |
1246 | 1247 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5083 | 5083 | | |
5084 | 5084 | | |
5085 | 5085 | | |
5086 | | - | |
5087 | 5086 | | |
5088 | 5087 | | |
5089 | 5088 | | |
| |||
0 commit comments