fs_report: handle WRITE_ERR_WOULD_BLOCK

A WRITE_ERR_WOULD_BLOCK may occur when large reports are written to a file
system because this fills up the submit queue of the packet-stream interface.

Fixes genodelabs/genode#4988
This commit is contained in:
Johannes Schlatow 2023-08-28 13:44:39 +02:00 committed by Christian Helmuth
parent 6881a71a87
commit 119f679278

View File

@ -162,7 +162,9 @@ class Fs_report::Session_component : public Genode::Rpc_object<Report::Session>
Write_result res = handle->fs().write(handle, src, n);
if (res != Write_result::WRITE_OK) {
if (res == Write_result::WRITE_ERR_WOULD_BLOCK)
_io.commit_and_wait();
else if (res != Write_result::WRITE_OK) {
/* do not spam the log */
if (_success)
error("failed to write report to '", _path, "'");