Loading ifs/include/daemon/adafs_ops/metadentry.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -8,7 +8,7 @@ int create_node(const std::string& path, const uid_t uid, const gid_t gid, mode_t mode); void create_metadentry(const std::string& path, mode_t mode); void create_metadentry(const std::string& path, Metadata& md); std::string get_metadentry_str(const std::string& path); Loading ifs/include/preload/adafs_functions.hpp +3 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ #define IFS_ADAFS_FUNCTIONS_HPP #include <preload/open_file_map.hpp> #include <global/metadata.hpp> /* * See include/linux/statfs.h (not includable) * Loading @@ -26,6 +26,8 @@ #define ST_NODIRATIME 0x0800 /* do not update directory access times */ #define ST_RELATIME 0x1000 /* update atime relative to mtime/ctime */ std::shared_ptr<Metadata> adafs_metadata(const std::string& path); int adafs_open(const std::string& path, mode_t mode, int flags); int adafs_mk_node(const std::string& path, mode_t mode); Loading ifs/src/daemon/adafs_daemon.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -74,8 +74,9 @@ bool init_environment() { ADAFS_DATA->link_cnt_state(MDATA_USE_LINK_CNT); ADAFS_DATA->blocks_state(MDATA_USE_BLOCKS); // Create metadentry for root directory Metadata root_md{S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO}; try { create_metadentry("/", S_IFDIR | 777); create_metadentry("/", root_md); } catch (const std::exception& e ) { ADAFS_DATA->spdlogger()->error("{}() Unable to write root metadentry to KV store: {}", __func__, e.what()); return false; Loading ifs/src/daemon/adafs_ops/metadentry.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -16,9 +16,8 @@ ino_t generate_inode_no() { * @param path * @param mode */ void create_metadentry(const std::string& path, mode_t mode) { void create_metadentry(const std::string& path, Metadata& md) { Metadata md{mode}; // update metadata object based on what metadata is needed if (ADAFS_DATA->atime_state() || ADAFS_DATA->mtime_state() || ADAFS_DATA->ctime_state()) { std::time_t time; Loading ifs/src/daemon/handler/h_metadentry.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -43,9 +43,10 @@ static hg_return_t rpc_srv_mk_node(hg_handle_t handle) { assert(ret == HG_SUCCESS); ADAFS_DATA->spdlogger()->debug("{}() Got RPC (from local {}) with path {}", __func__, (margo_get_info(handle)->context_id == ADAFS_DATA->host_id()), in.path); Metadata md(in.mode); try { // create metadentry create_metadentry(in.path, in.mode); create_metadentry(in.path, md); out.err = 0; } catch (const std::exception& e) { ADAFS_DATA->spdlogger()->error("{}() Failed to create metadentry: {}", __func__, e.what()); Loading Loading
ifs/include/daemon/adafs_ops/metadentry.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -8,7 +8,7 @@ int create_node(const std::string& path, const uid_t uid, const gid_t gid, mode_t mode); void create_metadentry(const std::string& path, mode_t mode); void create_metadentry(const std::string& path, Metadata& md); std::string get_metadentry_str(const std::string& path); Loading
ifs/include/preload/adafs_functions.hpp +3 −1 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ #define IFS_ADAFS_FUNCTIONS_HPP #include <preload/open_file_map.hpp> #include <global/metadata.hpp> /* * See include/linux/statfs.h (not includable) * Loading @@ -26,6 +26,8 @@ #define ST_NODIRATIME 0x0800 /* do not update directory access times */ #define ST_RELATIME 0x1000 /* update atime relative to mtime/ctime */ std::shared_ptr<Metadata> adafs_metadata(const std::string& path); int adafs_open(const std::string& path, mode_t mode, int flags); int adafs_mk_node(const std::string& path, mode_t mode); Loading
ifs/src/daemon/adafs_daemon.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -74,8 +74,9 @@ bool init_environment() { ADAFS_DATA->link_cnt_state(MDATA_USE_LINK_CNT); ADAFS_DATA->blocks_state(MDATA_USE_BLOCKS); // Create metadentry for root directory Metadata root_md{S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO}; try { create_metadentry("/", S_IFDIR | 777); create_metadentry("/", root_md); } catch (const std::exception& e ) { ADAFS_DATA->spdlogger()->error("{}() Unable to write root metadentry to KV store: {}", __func__, e.what()); return false; Loading
ifs/src/daemon/adafs_ops/metadentry.cpp +1 −2 Original line number Diff line number Diff line Loading @@ -16,9 +16,8 @@ ino_t generate_inode_no() { * @param path * @param mode */ void create_metadentry(const std::string& path, mode_t mode) { void create_metadentry(const std::string& path, Metadata& md) { Metadata md{mode}; // update metadata object based on what metadata is needed if (ADAFS_DATA->atime_state() || ADAFS_DATA->mtime_state() || ADAFS_DATA->ctime_state()) { std::time_t time; Loading
ifs/src/daemon/handler/h_metadentry.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -43,9 +43,10 @@ static hg_return_t rpc_srv_mk_node(hg_handle_t handle) { assert(ret == HG_SUCCESS); ADAFS_DATA->spdlogger()->debug("{}() Got RPC (from local {}) with path {}", __func__, (margo_get_info(handle)->context_id == ADAFS_DATA->host_id()), in.path); Metadata md(in.mode); try { // create metadentry create_metadentry(in.path, in.mode); create_metadentry(in.path, md); out.err = 0; } catch (const std::exception& e) { ADAFS_DATA->spdlogger()->error("{}() Failed to create metadentry: {}", __func__, e.what()); Loading