IoImpl& IoImpl::update_sharing_penalty(double sharing_penalty)
{
sharing_penalty_ = sharing_penalty;
- surf_action_->set_sharing_penalty(sharing_penalty);
+ model_action_->set_sharing_penalty(sharing_penalty);
return *this;
}
set_state(State::RUNNING);
if (dst_host_ == nullptr) {
XBT_DEBUG("Starting regular I/O");
- surf_action_ = disk_->io_start(size_, type_);
- surf_action_->set_sharing_penalty(sharing_penalty_);
+ model_action_ = disk_->io_start(size_, type_);
+ model_action_->set_sharing_penalty(sharing_penalty_);
} else {
XBT_DEBUG("Starting streaming I/O");
auto host_model = dst_host_->get_netpoint()->get_englobing_zone()->get_host_model();
- surf_action_ = host_model->io_stream(host_, disk_, dst_host_, dst_disk_, size_);
+ model_action_ = host_model->io_stream(host_, disk_, dst_host_, dst_disk_, size_);
}
- surf_action_->set_activity(this);
- set_start_time(surf_action_->get_start_time());
+ model_action_->set_activity(this);
+ set_start_time(model_action_->get_start_time());
XBT_DEBUG("Create IO synchro %p %s", this, get_cname());
void IoImpl::post()
{
- performed_ioops_ = surf_action_->get_cost();
- if (surf_action_->get_state() == resource::Action::State::FAILED) {
+ performed_ioops_ = model_action_->get_cost();
+ if (model_action_->get_state() == resource::Action::State::FAILED) {
if (host_ && dst_host_) { // this is an I/O stream
if (not host_->is_on())
set_state(State::SRC_HOST_FAILURE);
else
set_state(State::CANCELED);
} else if (timeout_detector_ && timeout_detector_->get_state() == resource::Action::State::FINISHED &&
- surf_action_->get_remains() > 0.0) {
- surf_action_->set_state(resource::Action::State::FAILED);
+ model_action_->get_remains() > 0.0) {
+ model_action_->set_state(resource::Action::State::FAILED);
set_state(State::TIMEOUT);
} else {
set_state(State::DONE);