mirror of
https://github.com/genodelabs/genode.git
synced 2025-03-10 22:44:30 +00:00
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:
parent
6881a71a87
commit
119f679278
@ -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, "'");
|
||||
|
Loading…
x
Reference in New Issue
Block a user