diff --git a/include/fsmod/Partition.hpp b/include/fsmod/Partition.hpp index e4531fe..ddb335f 100644 --- a/include/fsmod/Partition.hpp +++ b/include/fsmod/Partition.hpp @@ -56,7 +56,7 @@ namespace simgrid::fsmod { protected: friend class FileSystem; // Methods to perform caching - void make_file_evictable(const std::string &dir_path, const std::string &file_name, bool evictable); + void make_file_evictable(const std::string &dir_path, const std::string &file_name, bool evictable) const; virtual void create_space(sg_size_t num_bytes); virtual void new_file_creation_event(FileMetadata *file_metadata); virtual void new_file_access_event(FileMetadata *file_metadata); diff --git a/include/fsmod/PartitionFIFOCaching.hpp b/include/fsmod/PartitionFIFOCaching.hpp index 38709a9..55267c5 100644 --- a/include/fsmod/PartitionFIFOCaching.hpp +++ b/include/fsmod/PartitionFIFOCaching.hpp @@ -41,7 +41,6 @@ namespace simgrid::fsmod { private: unsigned long sequence_number_ = 0; std::map priority_list_; -// void print_priority_list(); }; /** \endcond */ diff --git a/src/Partition.cpp b/src/Partition.cpp index 8147588..fb22aa3 100644 --- a/src/Partition.cpp +++ b/src/Partition.cpp @@ -68,7 +68,7 @@ namespace simgrid::fsmod { } return to_return; } - + /** * @brief Retrieve the metadata for a file * @param dir_path: the path to the directory in which the file is located @@ -223,7 +223,8 @@ namespace simgrid::fsmod { this->increase_free_space(num_bytes); } - void Partition::make_file_evictable(const std::string &dir_path, const std::string &file_name, bool evictable) { + void Partition::make_file_evictable(const std::string &dir_path, const std::string &file_name, + bool evictable) const { auto metadata = this->get_file_metadata(dir_path, file_name); if (not metadata) { throw FileNotFoundException(XBT_THROW_POINT, dir_path + "/" + file_name); diff --git a/src/PartitionFIFOCaching.cpp b/src/PartitionFIFOCaching.cpp index f30882e..3327193 100644 --- a/src/PartitionFIFOCaching.cpp +++ b/src/PartitionFIFOCaching.cpp @@ -38,14 +38,6 @@ namespace simgrid::fsmod { } } -// void PartitionFIFOCaching::print_priority_list() { -// std::cerr << "PLIST " << this->get_name() << " = "; -// for (auto const &i : priority_list_) { -// std::cerr << " " << i.second->file_name_ << " "; -// } -// std::cerr << "\n"; -// } - void PartitionFIFOCaching::new_file_creation_event(FileMetadata *file_metadata) { file_metadata->sequence_number_ = sequence_number_++; priority_list_[file_metadata->sequence_number_] = file_metadata;