LCOV - code coverage report
Current view: top level - include/common/rpc - rpc_types.hpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 20 20 100.0 %
Date: 2024-04-23 00:09:24 Functions: 20 20 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :   Copyright 2018-2024, Barcelona Supercomputing Center (BSC), Spain
       3             :   Copyright 2015-2024, Johannes Gutenberg Universitaet Mainz, Germany
       4             : 
       5             :   This software was partially supported by the
       6             :   EC H2020 funded project NEXTGenIO (Project ID: 671951, www.nextgenio.eu).
       7             : 
       8             :   This software was partially supported by the
       9             :   ADA-FS project under the SPPEXA project funded by the DFG.
      10             : 
      11             :   This file is part of GekkoFS.
      12             : 
      13             :   GekkoFS is free software: you can redistribute it and/or modify
      14             :   it under the terms of the GNU General Public License as published by
      15             :   the Free Software Foundation, either version 3 of the License, or
      16             :   (at your option) any later version.
      17             : 
      18             :   GekkoFS is distributed in the hope that it will be useful,
      19             :   but WITHOUT ANY WARRANTY; without even the implied warranty of
      20             :   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      21             :   GNU General Public License for more details.
      22             : 
      23             :   You should have received a copy of the GNU General Public License
      24             :   along with GekkoFS.  If not, see <https://www.gnu.org/licenses/>.
      25             : 
      26             :   SPDX-License-Identifier: GPL-3.0-or-later
      27             : */
      28             : 
      29             : #ifndef LFS_RPC_TYPES_HPP
      30             : #define LFS_RPC_TYPES_HPP
      31             : 
      32             : extern "C" {
      33             : #include <mercury_proc_string.h>
      34             : #include <margo.h>
      35             : }
      36             : 
      37             : /* visible API for RPC data types used in RPCS */
      38             : 
      39             : // misc generic rpc types
      40        3328 : MERCURY_GEN_PROC(rpc_err_out_t, ((hg_int32_t) (err)))
      41             : 
      42             : // Metadentry
      43        3206 : MERCURY_GEN_PROC(rpc_mk_node_in_t,
      44             :                  ((hg_const_string_t) (path))((uint32_t) (mode)))
      45             : 
      46        4122 : MERCURY_GEN_PROC(rpc_path_only_in_t, ((hg_const_string_t) (path)))
      47             : 
      48        4137 : MERCURY_GEN_PROC(rpc_stat_out_t,
      49             :                  ((hg_int32_t) (err))((hg_const_string_t) (db_val)))
      50             : 
      51          33 : MERCURY_GEN_PROC(rpc_rm_node_in_t, ((hg_const_string_t) (path)))
      52             : 
      53          24 : MERCURY_GEN_PROC(
      54             :         rpc_rm_metadata_out_t,
      55             :         ((hg_int32_t) (err))((hg_int64_t) (size))((hg_uint32_t) (mode)))
      56             : 
      57          15 : MERCURY_GEN_PROC(rpc_trunc_in_t,
      58             :                  ((hg_const_string_t) (path))((hg_uint64_t) (length)))
      59             : 
      60          33 : MERCURY_GEN_PROC(
      61             :         rpc_update_metadentry_in_t,
      62             :         ((hg_const_string_t) (path))((uint64_t) (nlink))((hg_uint32_t) (mode))(
      63             :                 (hg_uint32_t) (uid))((hg_uint32_t) (gid))((hg_int64_t) (size))(
      64             :                 (hg_int64_t) (blocks))((hg_int64_t) (atime))(
      65             :                 (hg_int64_t) (mtime))((hg_int64_t) (ctime))(
      66             :                 (hg_bool_t) (nlink_flag))((hg_bool_t) (mode_flag))(
      67             :                 (hg_bool_t) (size_flag))((hg_bool_t) (block_flag))(
      68             :                 (hg_bool_t) (atime_flag))((hg_bool_t) (mtime_flag))(
      69             :                 (hg_bool_t) (ctime_flag)))
      70             : 
      71         128 : MERCURY_GEN_PROC(rpc_update_metadentry_size_in_t,
      72             :                  ((hg_const_string_t) (path))((hg_uint64_t) (size))(
      73             :                          (hg_int64_t) (offset))((hg_bool_t) (append)))
      74             : 
      75         133 : MERCURY_GEN_PROC(rpc_update_metadentry_size_out_t,
      76             :                  ((hg_int32_t) (err))((hg_int64_t) (ret_offset)))
      77             : 
      78          15 : MERCURY_GEN_PROC(rpc_get_metadentry_size_out_t,
      79             :                  ((hg_int32_t) (err))((hg_int64_t) (ret_size)))
      80             : 
      81             : #ifdef HAS_SYMLINKS
      82          60 : MERCURY_GEN_PROC(rpc_mk_symlink_in_t, ((hg_const_string_t) (path))((
      83             :                                               hg_const_string_t) (target_path)))
      84             : 
      85             : #endif
      86             : 
      87             : // data
      88          88 : MERCURY_GEN_PROC(
      89             :         rpc_read_data_in_t,
      90             :         ((hg_const_string_t) (path))((int64_t) (offset))(
      91             :                 (hg_uint64_t) (host_id))((hg_uint64_t) (host_size))(
      92             :                 (hg_const_string_t) (wbitset))((hg_uint64_t) (chunk_n))(
      93             :                 (hg_uint64_t) (chunk_start))((hg_uint64_t) (chunk_end))(
      94             :                 (hg_uint64_t) (total_chunk_size))((hg_bulk_t) (bulk_handle)))
      95             : 
      96         225 : MERCURY_GEN_PROC(rpc_data_out_t, ((int32_t) (err))((hg_size_t) (io_size)))
      97             : 
      98         128 : MERCURY_GEN_PROC(
      99             :         rpc_write_data_in_t,
     100             :         ((hg_const_string_t) (path))((int64_t) (offset))(
     101             :                 (hg_uint64_t) (host_id))((hg_uint64_t) (host_size))(
     102             :                 (hg_const_string_t) (wbitset))((hg_uint64_t) (chunk_n))(
     103             :                 (hg_uint64_t) (chunk_start))((hg_uint64_t) (chunk_end))(
     104             :                 (hg_uint64_t) (total_chunk_size))((hg_bulk_t) (bulk_handle)))
     105             : 
     106          93 : MERCURY_GEN_PROC(rpc_get_dirents_in_t,
     107             :                  ((hg_const_string_t) (path))((hg_bulk_t) (bulk_handle)))
     108             : 
     109          99 : MERCURY_GEN_PROC(rpc_get_dirents_out_t,
     110             :                  ((hg_int32_t) (err))((hg_size_t) (dirents_size)))
     111             : 
     112             : 
     113         786 : MERCURY_GEN_PROC(
     114             :         rpc_config_out_t,
     115             :         ((hg_const_string_t) (mountdir))((hg_const_string_t) (rootdir))(
     116             :                 (hg_bool_t) (atime_state))((hg_bool_t) (mtime_state))(
     117             :                 (hg_bool_t) (ctime_state))((hg_bool_t) (link_cnt_state))(
     118             :                 (hg_bool_t) (blocks_state))((hg_uint32_t) (uid))(
     119             :                 (hg_uint32_t) (gid)))
     120             : 
     121             : 
     122           2 : MERCURY_GEN_PROC(rpc_chunk_stat_in_t, ((hg_int32_t) (dummy)))
     123             : 
     124           6 : MERCURY_GEN_PROC(
     125             :         rpc_chunk_stat_out_t,
     126             :         ((hg_int32_t) (err))((hg_uint64_t) (chunk_size))(
     127             :                 (hg_uint64_t) (chunk_total))((hg_uint64_t) (chunk_free)))
     128             : 
     129             : #endif // LFS_RPC_TYPES_HPP

Generated by: LCOV version 1.16