diff --git a/src/Partition.cpp b/src/Partition.cpp index ef268c8..4aeec60 100644 --- a/src/Partition.cpp +++ b/src/Partition.cpp @@ -69,11 +69,11 @@ namespace simgrid::fsmod { void Partition::delete_file(const std::string &dir_path, const std::string &file_name) { auto* metadata_ptr = this->get_file_metadata(dir_path, file_name); if (not metadata_ptr) { - throw FileNotFoundException(XBT_THROW_POINT, dir_path + "/" + file_name); + throw FileNotFoundException(XBT_THROW_POINT, "delete: " + dir_path + "/" + file_name); } if (metadata_ptr->get_file_refcount() > 0) { - throw FileIsOpenException(XBT_THROW_POINT, dir_path + "/" + file_name); + throw FileIsOpenException(XBT_THROW_POINT, "delete: " + dir_path + "/" + file_name); } this->new_file_deletion_event(metadata_ptr); @@ -106,10 +106,10 @@ namespace simgrid::fsmod { // Sanity checks if (src_metadata->get_file_refcount() > 0) { - throw FileIsOpenException(XBT_THROW_POINT, src_dir_path + "/" + src_file_name); + throw FileIsOpenException(XBT_THROW_POINT, "move: " + src_dir_path + "/" + src_file_name); } if (dst_metadata && dst_metadata->get_file_refcount()) { - throw FileIsOpenException(XBT_THROW_POINT, dst_dir_path + "/" + dst_file_name); + throw FileIsOpenException(XBT_THROW_POINT, "move: " + dst_dir_path + "/" + dst_file_name); } // Create space if needed @@ -172,7 +172,7 @@ namespace simgrid::fsmod { sg_size_t freed_space = 0; for (const auto &[filename, metadata]: content_.at(dir_path)) { if (metadata->get_file_refcount() != 0) { - throw FileIsOpenException(XBT_THROW_POINT, "No content deleted in directory before file " + filename + " is open"); + throw FileIsOpenException(XBT_THROW_POINT, "No content deleted in directory because file " + filename + " is open"); } freed_space += metadata->get_current_size(); } diff --git a/src/PartitionFIFOCaching.cpp b/src/PartitionFIFOCaching.cpp index 221d86e..065733b 100644 --- a/src/PartitionFIFOCaching.cpp +++ b/src/PartitionFIFOCaching.cpp @@ -14,10 +14,7 @@ namespace simgrid::fsmod { sg_size_t space_that_can_be_created = 0.0; std::vector files_to_remove_to_create_space; - std::cerr << "** IN CREATE SPACE!\n"; - for (auto const& [victim, victim_metadata]: priority_list_) { - std::cerr << "LOOKING AT VICTIM " << victim_metadata->file_name_ << "\n"; // Never evict an open file if (victim_metadata->file_refcount_ > 0) { continue; @@ -37,10 +34,8 @@ namespace simgrid::fsmod { throw NotEnoughSpaceException(XBT_THROW_POINT, "Unable to evict files to create enough space"); } for (auto const &victim: files_to_remove_to_create_space) { - std::cerr << "EVICTING VICTIM: " << this->priority_list_[victim]->file_name_ << "\n"; this->delete_file(this->priority_list_[victim]->dir_path_, this->priority_list_[victim]->file_name_); } - std::cerr << "** RETURNING FROM CREATE SPACE\n"; } void PartitionFIFOCaching::print_priority_list() {