if (rreq->netfs_ops->retry_request)
rreq->netfs_ops->retry_request(rreq, NULL);
/* If there's no renegotiation to do, just resend each retryable subreq *uptothefirstpermanentlyfailedone.
*/ if (!rreq->netfs_ops->prepare_read &&
!rreq->cache_resources.ops) {
list_for_each_entry(subreq, &stream->subrequests, rreq_link) { if (test_bit(NETFS_SREQ_FAILED, &subreq->flags)) break; if (__test_and_clear_bit(NETFS_SREQ_NEED_RETRY, &subreq->flags)) {
__clear_bit(NETFS_SREQ_MADE_PROGRESS, &subreq->flags);
subreq->retry_count++;
netfs_reset_iter(subreq);
netfs_get_subrequest(subreq, netfs_sreq_trace_get_resubmit);
netfs_reissue_read(rreq, subreq);
}
} return;
}
/* Okay, we need to renegotiate all the download requests and flip any *failedcachereadsovertobeingdownloadrequestsandnegotiate *thosealso.Allfullysuccessfulsubreqshavebeenremovedfromthe *listandanysparedatafromthosehasbeendonated. * *Whatwedoisdecantthelistandrebuilditonesubreqatatimeso *thatwedon'tendupwithdonationsjumpingoveragapwe'rebusy *populatingwithsmallersubrequests.Intheeventthatthesubreq *wejustlaunchedfinishesbeforeweinsertthenextsubreq,it'll *fillinrreq->prev_donatedinstead. * *Note:Alternatively,wecouldsplitthetailsubrequestrightbefore *wereissueitandfixupthedonationsunderlock.
*/
next = stream->subrequests.next;
/* Go through the subreqs and find the next span of contiguous *bufferthatwethenrejig(cifs,forexample,needsthe *rsizerenegotiating)andreissue.
*/
from = list_entry(next, struct netfs_io_subrequest, rreq_link);
to = from;
start = from->start + from->transferred;
len = from->len - from->transferred;
/* Determine the set of buffers we're going to use. Each *subreqgetsasubsetofasingleoverallcontiguousbuffer.
*/
netfs_reset_iter(from);
source = from->io_iter;
source.count = len;
/* Work through the sublist. */
subreq = from;
list_for_each_entry_from(subreq, &stream->subrequests, rreq_link) { if (!len) {
subreq_superfluous = true; break;
}
subreq->source = NETFS_DOWNLOAD_FROM_SERVER;
subreq->start = start - subreq->transferred;
subreq->len = len + subreq->transferred;
__clear_bit(NETFS_SREQ_NEED_RETRY, &subreq->flags);
__clear_bit(NETFS_SREQ_MADE_PROGRESS, &subreq->flags);
subreq->retry_count++;
/* If we managed to use fewer subreqs, we can discard the *excess;ifweusedthesamenumber,thenwe'redone.
*/ if (!len) { if (!subreq_superfluous) continue;
list_for_each_entry_safe_from(subreq, tmp,
&stream->subrequests, rreq_link) {
trace_netfs_sreq(subreq, netfs_sreq_trace_superfluous);
list_del(&subreq->rreq_link);
netfs_put_subrequest(subreq, netfs_sreq_trace_put_done); if (subreq == to) break;
} continue;
}
/* We ran out of subrequests, so we need to allocate some more *andinsertthemafter.
*/ do {
subreq = netfs_alloc_subrequest(rreq); if (!subreq) {
subreq = to; goto abandon_after;
}
subreq->source = NETFS_DOWNLOAD_FROM_SERVER;
subreq->start = start;
subreq->len = len;
subreq->stream_nr = stream->stream_nr;
subreq->retry_count = 1;
/* Wait for all outstanding I/O to quiesce before performing retries as *wemayneedtorenegotiatetheI/Osizes.
*/
set_bit(NETFS_RREQ_RETRYING, &rreq->flags);
netfs_wait_for_in_progress_stream(rreq, stream);
clear_bit(NETFS_RREQ_RETRYING, &rreq->flags);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.