Repository navigation
Commit 439ee5f
fuse: optimize short direct reads
If user requested direct read beyond EOF, we can skip sending fuse requests
for positions beyond EOF because userspace would ACK them with zero bytes read
anyway. We can trust to i_size in fuse_direct_IO for such cases because it's
called from fuse_file_aio_read() and the latter updates fuse attributes
including i_size.
Signed-off-by: Maxim Patlasov <mpatlasov@parallels.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>1 parent bcba24c commit 439ee5f
1 file changed
Lines changed: 13 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1331 | 1331 | | |
1332 | 1332 | | |
1333 | 1333 | | |
1334 | | - | |
| 1334 | + | |
| 1335 | + | |
1335 | 1336 | | |
1336 | 1337 | | |
1337 | 1338 | | |
| |||
1340 | 1341 | | |
1341 | 1342 | | |
1342 | 1343 | | |
1343 | | - | |
1344 | | - | |
| 1344 | + | |
1345 | 1345 | | |
1346 | 1346 | | |
1347 | 1347 | | |
| |||
1353 | 1353 | | |
1354 | 1354 | | |
1355 | 1355 | | |
1356 | | - | |
| 1356 | + | |
1357 | 1357 | | |
1358 | 1358 | | |
1359 | 1359 | | |
| |||
2369 | 2369 | | |
2370 | 2370 | | |
2371 | 2371 | | |
| 2372 | + | |
| 2373 | + | |
| 2374 | + | |
| 2375 | + | |
| 2376 | + | |
| 2377 | + | |
| 2378 | + | |
2372 | 2379 | | |
2373 | 2380 | | |
2374 | 2381 | | |
| |||
2392 | 2399 | | |
2393 | 2400 | | |
2394 | 2401 | | |
2395 | | - | |
| 2402 | + | |
2396 | 2403 | | |
2397 | 2404 | | |
2398 | 2405 | | |
2399 | 2406 | | |
2400 | 2407 | | |
2401 | | - | |
| 2408 | + | |
2402 | 2409 | | |
2403 | 2410 | | |
2404 | 2411 | | |
| |||
0 commit comments