Loading include/config.hpp +3 −0 Original line number Diff line number Diff line Loading @@ -137,6 +137,9 @@ constexpr auto create_exist_check = true; constexpr auto use_inline_data = true; constexpr auto inline_data_size = 4096; // in bytes constexpr auto create_write_optimization = true; constexpr auto read_inline_prefetch = true; } // namespace metadata namespace data { // directory name below rootdir where chunks are placed Loading src/client/gkfs_functions.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -340,7 +340,8 @@ gkfs_open(const std::string& path, mode_t mode, int flags) { } } auto file = std::make_shared<gkfs::filemap::OpenFile>(path, flags); if(!md.inline_data().empty()) { if(gkfs::config::metadata::read_inline_prefetch and !md.inline_data().empty()) { file->inline_data(md.inline_data()); } auto fd = CTX->file_map()->add(file); Loading Loading @@ -1424,8 +1425,7 @@ gkfs_do_read(const gkfs::filemap::OpenFile& file, char* buf, size_t count, offset < gkfs::config::metadata::inline_data_size) { // OPTIMIZATION: Check if we have the inline data cached if(!file.inline_data().empty() && count <= file.inline_data().size()) { if(!file.inline_data().empty() && count <= file.inline_data().size()) { LOG(DEBUG, "{}() Using cached inline data", __func__); memcpy(buf, file.inline_data().c_str() + offset, count); return count; Loading tests/integration/harness/gkfs.py +4 −8 Original line number Diff line number Diff line Loading @@ -594,18 +594,14 @@ class Client: logger.debug(f"patched env: {pformat(self._patched_env)}") out = self._cmd( [ str(cmd) ] + [ str(a) for a in args ], [ str(cmd) ] + list(args), _env = self._env, # _out=sys.stdout, # _err=sys.stderr, ) out = str(out) logger.debug(f"command output: {out}") json_start = out.find('{') if json_start != -1: out = out[json_start:] return self._parser.parse(cmd, out) logger.debug(f"command output: {out.stdout}") return self._parser.parse(cmd, out.stdout) def __getattr__(self, name): return _proxy_exec(self, name) Loading Loading
include/config.hpp +3 −0 Original line number Diff line number Diff line Loading @@ -137,6 +137,9 @@ constexpr auto create_exist_check = true; constexpr auto use_inline_data = true; constexpr auto inline_data_size = 4096; // in bytes constexpr auto create_write_optimization = true; constexpr auto read_inline_prefetch = true; } // namespace metadata namespace data { // directory name below rootdir where chunks are placed Loading
src/client/gkfs_functions.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -340,7 +340,8 @@ gkfs_open(const std::string& path, mode_t mode, int flags) { } } auto file = std::make_shared<gkfs::filemap::OpenFile>(path, flags); if(!md.inline_data().empty()) { if(gkfs::config::metadata::read_inline_prefetch and !md.inline_data().empty()) { file->inline_data(md.inline_data()); } auto fd = CTX->file_map()->add(file); Loading Loading @@ -1424,8 +1425,7 @@ gkfs_do_read(const gkfs::filemap::OpenFile& file, char* buf, size_t count, offset < gkfs::config::metadata::inline_data_size) { // OPTIMIZATION: Check if we have the inline data cached if(!file.inline_data().empty() && count <= file.inline_data().size()) { if(!file.inline_data().empty() && count <= file.inline_data().size()) { LOG(DEBUG, "{}() Using cached inline data", __func__); memcpy(buf, file.inline_data().c_str() + offset, count); return count; Loading
tests/integration/harness/gkfs.py +4 −8 Original line number Diff line number Diff line Loading @@ -594,18 +594,14 @@ class Client: logger.debug(f"patched env: {pformat(self._patched_env)}") out = self._cmd( [ str(cmd) ] + [ str(a) for a in args ], [ str(cmd) ] + list(args), _env = self._env, # _out=sys.stdout, # _err=sys.stderr, ) out = str(out) logger.debug(f"command output: {out}") json_start = out.find('{') if json_start != -1: out = out[json_start:] return self._parser.parse(cmd, out) logger.debug(f"command output: {out.stdout}") return self._parser.parse(cmd, out.stdout) def __getattr__(self, name): return _proxy_exec(self, name) Loading