Loading ifs/include/daemon/backend/data/chunk_storage.hpp +7 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,12 @@ namespace spdlog { } struct ChunkStat { unsigned long chunk_size; unsigned long chunk_total; unsigned long chunk_free; }; class ChunkStorage { private: static constexpr const char * LOGGER_NAME = "ChunkStorage"; Loading @@ -38,6 +44,7 @@ class ChunkStorage { void delete_chunk(const std::string& file_path, unsigned int chunk_id); void truncate_chunk(const std::string& file_path, unsigned int chunk_id, off_t length); void destroy_chunk_space(const std::string& file_path) const; ChunkStat chunk_stat() const; }; #endif //IFS_CHUNK_STORAGE_HPP ifs/include/daemon/handler/rpc_defs.hpp +2 −0 Original line number Diff line number Diff line Loading @@ -37,4 +37,6 @@ DECLARE_MARGO_RPC_HANDLER(rpc_srv_write_data) DECLARE_MARGO_RPC_HANDLER(rpc_srv_trunc_data) DECLARE_MARGO_RPC_HANDLER(rpc_srv_chunk_stat) #endif //LFS_RPC_DEFS_HPP ifs/include/global/global_defs.hpp +1 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ namespace hg_tag { constexpr auto write_data = "rpc_srv_write_data"; constexpr auto read_data = "rpc_srv_read_data"; constexpr auto trunc_data = "rpc_srv_trunc_data"; constexpr auto chunk_stat = "rpc_srv_chunk_stat"; } // typedefs Loading ifs/include/global/rpc/rpc_types.hpp +6 −0 Original line number Diff line number Diff line Loading @@ -100,4 +100,10 @@ MERCURY_GEN_PROC(rpc_get_dirents_out_t, ((hg_size_t) (dirents_size)) ) MERCURY_GEN_PROC(rpc_chunk_stat_out_t, ((hg_uint64_t) (chunk_size)) ((hg_uint64_t) (chunk_total)) ((hg_uint64_t) (chunk_free)) ) #endif //LFS_RPC_TYPES_HPP ifs/include/preload/adafs_functions.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ int adafs_stat(const std::string& path, struct stat* buf); int adafs_stat64(const std::string& path, struct stat64* buf); int adafs_statfs(const std::string& path, struct statfs* adafs_buf, struct statfs& realfs_buf); int adafs_statfs(struct statfs* buf); off64_t adafs_lseek(int fd, off64_t offset, int whence); Loading Loading
ifs/include/daemon/backend/data/chunk_storage.hpp +7 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,12 @@ namespace spdlog { } struct ChunkStat { unsigned long chunk_size; unsigned long chunk_total; unsigned long chunk_free; }; class ChunkStorage { private: static constexpr const char * LOGGER_NAME = "ChunkStorage"; Loading @@ -38,6 +44,7 @@ class ChunkStorage { void delete_chunk(const std::string& file_path, unsigned int chunk_id); void truncate_chunk(const std::string& file_path, unsigned int chunk_id, off_t length); void destroy_chunk_space(const std::string& file_path) const; ChunkStat chunk_stat() const; }; #endif //IFS_CHUNK_STORAGE_HPP
ifs/include/daemon/handler/rpc_defs.hpp +2 −0 Original line number Diff line number Diff line Loading @@ -37,4 +37,6 @@ DECLARE_MARGO_RPC_HANDLER(rpc_srv_write_data) DECLARE_MARGO_RPC_HANDLER(rpc_srv_trunc_data) DECLARE_MARGO_RPC_HANDLER(rpc_srv_chunk_stat) #endif //LFS_RPC_DEFS_HPP
ifs/include/global/global_defs.hpp +1 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ namespace hg_tag { constexpr auto write_data = "rpc_srv_write_data"; constexpr auto read_data = "rpc_srv_read_data"; constexpr auto trunc_data = "rpc_srv_trunc_data"; constexpr auto chunk_stat = "rpc_srv_chunk_stat"; } // typedefs Loading
ifs/include/global/rpc/rpc_types.hpp +6 −0 Original line number Diff line number Diff line Loading @@ -100,4 +100,10 @@ MERCURY_GEN_PROC(rpc_get_dirents_out_t, ((hg_size_t) (dirents_size)) ) MERCURY_GEN_PROC(rpc_chunk_stat_out_t, ((hg_uint64_t) (chunk_size)) ((hg_uint64_t) (chunk_total)) ((hg_uint64_t) (chunk_free)) ) #endif //LFS_RPC_TYPES_HPP
ifs/include/preload/adafs_functions.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ int adafs_stat(const std::string& path, struct stat* buf); int adafs_stat64(const std::string& path, struct stat64* buf); int adafs_statfs(const std::string& path, struct statfs* adafs_buf, struct statfs& realfs_buf); int adafs_statfs(struct statfs* buf); off64_t adafs_lseek(int fd, off64_t offset, int whence); Loading