mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 04:04:43 +01:00
Fix netfslib such that when it's making an unbuffered or DIO write, to make
sure that it sends each subrequest strictly sequentially, waiting till the
previous one is 'committed' before sending the next so that we don't have
pieces landing out of order and potentially leaving a hole if an error
occurs (ENOSPC for example).
This is done by copying in just those bits of issuing, collecting and
retrying subrequests that are necessary to do one subrequest at a time.
Retrying, in particular, is simpler because if the current subrequest needs
retrying, the source iterator can just be copied again and the subrequest
prepped and issued again without needing to be concerned about whether it
needs merging with the previous or next in the sequence.
Note that the issuing loop waits for a subrequest to complete right after
issuing it, but this wait could be moved elsewhere allowing preparatory
steps to be performed whilst the subrequest is in progress. In particular,
once content encryption is available in netfslib, that could be done whilst
waiting, as could cleanup of buffers that have been completed.
Fixes:
|
||
|---|---|---|
| .. | ||
| buffered_read.c | ||
| buffered_write.c | ||
| direct_read.c | ||
| direct_write.c | ||
| fscache_cache.c | ||
| fscache_cookie.c | ||
| fscache_internal.h | ||
| fscache_io.c | ||
| fscache_main.c | ||
| fscache_proc.c | ||
| fscache_stats.c | ||
| fscache_volume.c | ||
| internal.h | ||
| iterator.c | ||
| Kconfig | ||
| locking.c | ||
| main.c | ||
| Makefile | ||
| misc.c | ||
| objects.c | ||
| read_collect.c | ||
| read_pgpriv2.c | ||
| read_retry.c | ||
| read_single.c | ||
| rolling_buffer.c | ||
| stats.c | ||
| write_collect.c | ||
| write_issue.c | ||
| write_retry.c | ||