Commit 6e51804c authored by Marc Vef's avatar Marc Vef
Browse files

Merge branch 'dirs' into 'master'



Support basic directory functionalities

See merge request zdvresearch_bsc/adafs!38

Signed-off-by: default avatarMarc Vef <vef@uni-mainz.de>
parents bd20f794 b8281adb
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -26,4 +26,6 @@ void update_metadentry(const std::string& path, Metadata& md);

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

std::vector<std::pair<std::string, bool>> get_dirents(const std::string& dir);

#endif //IFS_METADENTRY_HPP
+1 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ class MetadataDB {
        bool exists(const std::string& key);
        void update(const std::string& old_key, const std::string& new_key, const std::string& val);
        void update_size(const std::string& key, size_t size, bool append);
        std::vector<std::pair<std::string, bool>> get_dirents(const std::string& dir) const;
        void iterate_all();
};

+2 −0
Original line number Diff line number Diff line
@@ -27,6 +27,8 @@ DECLARE_MARGO_RPC_HANDLER(rpc_srv_get_metadentry_size)

DECLARE_MARGO_RPC_HANDLER(rpc_srv_update_metadentry_size)

DECLARE_MARGO_RPC_HANDLER(rpc_srv_get_dirents)

// data
DECLARE_MARGO_RPC_HANDLER(rpc_srv_read_data)

+3 −0
Original line number Diff line number Diff line
@@ -68,6 +68,9 @@
// sets the threshold in milliseconds when a log entry should be created
#define MARGO_FORWARD_TIMER_THRESHOLD 1000

//size of preallocated buffer to hold directory entries in rpc call
#define RPC_DIRENTS_BUFF_SIZE (8 * 1024 * 1024) // 8 mega

// Debug configurations
//#define RPC_TEST //unused

+1 −0
Original line number Diff line number Diff line
@@ -14,6 +14,7 @@ namespace hg_tag {
    constexpr auto update_metadentry = "rpc_srv_update_metadentry";
    constexpr auto get_metadentry_size = "rpc_srv_get_metadentry_size";
    constexpr auto update_metadentry_size = "rpc_srv_update_metadentry_size";
    constexpr auto get_dirents = "rpc_srv_get_dirents";
    constexpr auto write_data = "rpc_srv_write_data";
    constexpr auto read_data = "rpc_srv_read_data";
}
Loading