Commit 49a77aac authored by Marc Vef's avatar Marc Vef
Browse files

Add basic MD_Test functionality

- Add: adafs_access, open with check if object exists
- Add: root metadentry to database of each node
- Modified: Open, unlink, mkdir, rmdir and combined their functionality to "create node" and "remove node"
parent c4a11105
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -21,4 +21,6 @@ int update_metadentry_size(const std::string& path, size_t io_size, off_t offset

int update_metadentry(const std::string& path, Metadata& md);

int check_access_mask(const std::string& path, int mask);

#endif //IFS_METADENTRY_HPP
+2 −2
Original line number Diff line number Diff line
@@ -5,10 +5,10 @@
namespace hg_tag {
    constexpr auto fs_config = "ipc_srv_fs_config";
    constexpr auto minimal = "rpc_minimal";
    constexpr auto open = "rpc_srv_open";
    constexpr auto create = "rpc_srv_mk_node";
    constexpr auto access = "rpc_srv_access";
    constexpr auto stat = "rpc_srv_stat";
    constexpr auto unlink = "rpc_srv_unlink";
    constexpr auto remove = "rpc_srv_rm_node";
    constexpr auto update_metadentry = "rpc_srv_update_metadentry";
    constexpr auto update_metadentry_size = "rpc_srv_update_metadentry_size";
    constexpr auto write_data = "rpc_srv_write_data";
+5 −1
Original line number Diff line number Diff line
@@ -5,7 +5,11 @@

int adafs_open(const std::string& path, mode_t mode, int flags);

int adafs_access(const std::string& path, mode_t mode);
int adafs_mk_node(const std::string& path, const mode_t mode);

int adafs_rm_node(const std::string& path);

int adafs_access(const std::string& path, const int mask);

int adafs_stat(const std::string& path, struct stat* buf);

+4 −4
Original line number Diff line number Diff line
@@ -72,20 +72,20 @@ extern hg_addr_t daemon_svr_addr;
// IPC IDs
extern hg_id_t ipc_minimal_id;
extern hg_id_t ipc_config_id;
extern hg_id_t ipc_open_id;
extern hg_id_t ipc_mk_node_id;
extern hg_id_t ipc_access_id;
extern hg_id_t ipc_stat_id;
extern hg_id_t ipc_unlink_id;
extern hg_id_t ipc_rm_node_id;
extern hg_id_t ipc_update_metadentry_id;
extern hg_id_t ipc_update_metadentry_size_id;
extern hg_id_t ipc_write_data_id;
extern hg_id_t ipc_read_data_id;
// RPC IDs
extern hg_id_t rpc_minimal_id;
extern hg_id_t rpc_open_id;
extern hg_id_t rpc_mk_node_id;
extern hg_id_t rpc_stat_id;
extern hg_id_t rpc_access_id;
extern hg_id_t rpc_unlink_id;
extern hg_id_t rpc_rm_node_id;
extern hg_id_t rpc_update_metadentry_id;
extern hg_id_t rpc_update_metadentry_size_id;
extern hg_id_t rpc_write_data_id;
+3 −3
Original line number Diff line number Diff line
@@ -8,13 +8,13 @@

void send_minimal_rpc(hg_id_t minimal_id);

int rpc_send_open(const std::string& path, mode_t mode, int flags);
int rpc_send_mk_node(const std::string& path, const mode_t mode);

int rpc_send_access(const std::string& path, mode_t mode);
int rpc_send_access(const std::string& path, const int mask);

int rpc_send_stat(const std::string& path, std::string& attr);

int rpc_send_unlink(const std::string& path);
int rpc_send_rm_node(const std::string& path);

int rpc_send_update_metadentry(const std::string& path, const Metadentry& md, const MetadentryUpdateFlags& md_flags);

Loading