parent
6506240642
commit
d8e2c95597
|
@ -121,6 +121,8 @@ class Vfs_server::Session_component : private Session_resources,
|
||||||
|
|
||||||
bool const _writeable;
|
bool const _writeable;
|
||||||
|
|
||||||
|
bool _stalled = false;
|
||||||
|
|
||||||
|
|
||||||
/****************************
|
/****************************
|
||||||
** Handle to node mapping **
|
** Handle to node mapping **
|
||||||
|
@ -217,16 +219,19 @@ class Vfs_server::Session_component : private Session_resources,
|
||||||
switch (node.submit_job(packet, payload_ptr)) {
|
switch (node.submit_job(packet, payload_ptr)) {
|
||||||
|
|
||||||
case Node::Submit_result::ACCEPTED:
|
case Node::Submit_result::ACCEPTED:
|
||||||
|
_stalled = false;
|
||||||
if (!node.enqueued())
|
if (!node.enqueued())
|
||||||
_active_nodes.enqueue(node);
|
_active_nodes.enqueue(node);
|
||||||
drop_packet_from_submit_queue();
|
drop_packet_from_submit_queue();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Node::Submit_result::DENIED:
|
case Node::Submit_result::DENIED:
|
||||||
|
_stalled = false;
|
||||||
consume_and_ack_invalid_packet();
|
consume_and_ack_invalid_packet();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Node::Submit_result::STALLED:
|
case Node::Submit_result::STALLED:
|
||||||
|
_stalled = true;
|
||||||
/* keep request packet in submit queue */
|
/* keep request packet in submit queue */
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -347,9 +352,13 @@ class Vfs_server::Session_component : private Session_resources,
|
||||||
: Process_packets_result::NONE;
|
: Process_packets_result::NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This method is called from 'handle_io_progress()' whenever the
|
||||||
|
* session was active.
|
||||||
|
*/
|
||||||
bool no_longer_active() const
|
bool no_longer_active() const
|
||||||
{
|
{
|
||||||
return Session_queue::Element::enqueued() && _active_nodes.empty();
|
return _active_nodes.empty() && !_stalled;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool no_longer_idle() const
|
bool no_longer_idle() const
|
||||||
|
@ -366,7 +375,7 @@ class Vfs_server::Session_component : private Session_resources,
|
||||||
{
|
{
|
||||||
Process_packets_result const progress = process_packets();
|
Process_packets_result const progress = process_packets();
|
||||||
|
|
||||||
if (no_longer_idle())
|
if (no_longer_idle() || _stalled)
|
||||||
_active_sessions.enqueue(*this);
|
_active_sessions.enqueue(*this);
|
||||||
|
|
||||||
if (progress == Process_packets_result::TOO_MUCH_PROGRESS)
|
if (progress == Process_packets_result::TOO_MUCH_PROGRESS)
|
||||||
|
|
Loading…
Reference in New Issue