Function gkfs::rpc::forward_write(const string&, const void *, const off64_t, const size_t, const int8_t)

Function Documentation

pair<int, ssize_t> gkfs::rpc::forward_write(const string &path, const void *buf, const off64_t offset, const size_t write_size, const int8_t num_copies)

Send an RPC request to write from a buffer. There is a bitset of 1024 chunks to tell the server which chunks to process. Exceeding this value will work without replication. Another way is to leverage mercury segments. TODO: Decide how to manage a write to a replica that doesn’t exist

Parameters:
  • path

  • buf

  • append_flag

  • write_size

  • num_copies – number of replicas

Returns:

pair<error code, written size>