]> AND Public Git Repository - simgrid.git/blobdiff - src/kernel/activity/IoImpl.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
split Comm::on_start into two signals (on_send and on_recv)
[simgrid.git] / src / kernel / activity / IoImpl.cpp
index bdef78f4d707fb018daf93476b5309314a98640c..cb274dcdb6ef576011c234b38e99ccd94bc291a0 100644 (file)
@@ -2,18 +2,19 @@
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
-#include "src/kernel/activity/IoImpl.hpp"
+
+#include <simgrid/Exception.hpp>
+#include <simgrid/kernel/routing/NetPoint.hpp>
+#include <simgrid/s4u/Engine.hpp>
+#include <simgrid/s4u/Host.hpp>
+
 #include "mc/mc.h"
-#include "simgrid/Exception.hpp"
-#include "simgrid/kernel/resource/Action.hpp"
-#include "simgrid/kernel/routing/NetPoint.hpp"
-#include "simgrid/s4u/Engine.hpp"
-#include "simgrid/s4u/Host.hpp"
-#include "simgrid/s4u/Io.hpp"
+#include "src/kernel/activity/IoImpl.hpp"
+#include "src/kernel/actor/ActorImpl.hpp"
 #include "src/kernel/actor/SimcallObserver.hpp"
+#include "src/kernel/context/Context.hpp"
 #include "src/kernel/resource/DiskImpl.hpp"
 #include "src/mc/mc_replay.hpp"
-#include "src/simix/smx_private.hpp"
 #include "src/surf/cpu_interface.hpp"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(simix_io, simix, "Logging specific to SIMIX (io)");
@@ -59,10 +60,6 @@ IoImpl* IoImpl::start()
   surf_action_ =
       disk_->get_host()->get_netpoint()->get_englobing_zone()->get_disk_model()->io_start(disk_, size_, type_);
   surf_action_->set_activity(this);
-  const auto& factor_cb = disk_->get_factor_cb();
-  if (factor_cb) { // handling disk variability
-    surf_action_->set_rate_factor(factor_cb(size_, type_));
-  }
 
   XBT_DEBUG("Create IO synchro %p %s", this, get_cname());
 
@@ -133,6 +130,7 @@ void IoImpl::finish()
     switch (state_) {
       case State::FAILED:
         simcall->issuer_->context_->set_wannadie();
+        piface_->complete(s4u::Activity::State::FAILED);
         simcall->issuer_->exception_ =
             std::make_exception_ptr(StorageFailureException(XBT_THROW_POINT, "Storage failed"));
         break;