Repository navigation
Commit df2d6f2
fs: always maintain i_dio_count
Maintain i_dio_count for all filesystems, not just those using DIO_LOCKING.
This these filesystems to also protect truncate against direct I/O requests
by using common code. Right now the only non-DIO_LOCKING filesystem that
appears to do so is XFS, which uses an opencoded variant of the i_dio_count
scheme.
Behaviour doesn't change for filesystems never calling inode_dio_wait.
For ext4 behaviour changes when using the dioread_nonlock option, which
previously was missing any protection between truncate and direct I/O reads.
For ocfs2 that handcrafted i_dio_count manipulations are replaced with
the common code now enable.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>1 parent 562c72a commit df2d6f2
3 files changed
Lines changed: 17 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
301 | | - | |
| 300 | + | |
302 | 301 | | |
303 | 302 | | |
304 | 303 | | |
| |||
1185 | 1184 | | |
1186 | 1185 | | |
1187 | 1186 | | |
1188 | | - | |
1189 | | - | |
1190 | | - | |
1191 | | - | |
1192 | | - | |
1193 | 1187 | | |
1194 | 1188 | | |
1195 | 1189 | | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
1196 | 1197 | | |
1197 | 1198 | | |
1198 | 1199 | | |
| |||
1270 | 1271 | | |
1271 | 1272 | | |
1272 | 1273 | | |
1273 | | - | |
1274 | | - | |
1275 | | - | |
1276 | | - | |
1277 | | - | |
1278 | 1274 | | |
1279 | 1275 | | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
1280 | 1281 | | |
1281 | 1282 | | |
1282 | 1283 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
567 | 567 | | |
568 | 568 | | |
569 | 569 | | |
570 | | - | |
571 | | - | |
| 570 | + | |
572 | 571 | | |
573 | | - | |
574 | 572 | | |
575 | 573 | | |
576 | 574 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2240 | 2240 | | |
2241 | 2241 | | |
2242 | 2242 | | |
2243 | | - | |
2244 | 2243 | | |
2245 | 2244 | | |
2246 | 2245 | | |
| |||
2292 | 2291 | | |
2293 | 2292 | | |
2294 | 2293 | | |
2295 | | - | |
2296 | 2294 | | |
2297 | 2295 | | |
2298 | 2296 | | |
| |||
2379 | 2377 | | |
2380 | 2378 | | |
2381 | 2379 | | |
2382 | | - | |
2383 | | - | |
| 2380 | + | |
2384 | 2381 | | |
2385 | | - | |
2386 | 2382 | | |
2387 | 2383 | | |
2388 | 2384 | | |
| |||
2533 | 2529 | | |
2534 | 2530 | | |
2535 | 2531 | | |
2536 | | - | |
2537 | 2532 | | |
2538 | 2533 | | |
2539 | 2534 | | |
| |||
2575 | 2570 | | |
2576 | 2571 | | |
2577 | 2572 | | |
2578 | | - | |
2579 | | - | |
| 2573 | + | |
2580 | 2574 | | |
2581 | | - | |
| 2575 | + | |
2582 | 2576 | | |
2583 | 2577 | | |
2584 | 2578 | | |
| |||
0 commit comments