Loading src/daemon/handler/srv_metadata.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -1087,8 +1087,10 @@ rpc_srv_write_data_inline(hg_handle_t handle) { } // 1. Check limits if(in.offset + in.count > gkfs::config::metadata::inline_data_size) { out.err = EFBIG; // File too large for inline if(in.offset + in.count > gkfs::config::metadata::inline_data_size || md.size() > gkfs::config::metadata::inline_data_size || (md.size() > 0 && md.inline_data().empty())) { out.err = EFBIG; // File too large for inline or already in chunks } else { // 2. Prepare data string from input buffer // Note: in.data is a hg_const_string_t (char*) Loading tests/integration/data/test_inline_data.py +2 −0 Original line number Diff line number Diff line Loading @@ -161,3 +161,5 @@ def test_inline_overflow_pwrite(gkfs_daemon, gkfs_client): assert read_buf[0:100] == buf1 assert read_buf[100:offset] == b'\x00' * (offset - 100) assert read_buf[offset:offset+100] == buf2 Loading
src/daemon/handler/srv_metadata.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -1087,8 +1087,10 @@ rpc_srv_write_data_inline(hg_handle_t handle) { } // 1. Check limits if(in.offset + in.count > gkfs::config::metadata::inline_data_size) { out.err = EFBIG; // File too large for inline if(in.offset + in.count > gkfs::config::metadata::inline_data_size || md.size() > gkfs::config::metadata::inline_data_size || (md.size() > 0 && md.inline_data().empty())) { out.err = EFBIG; // File too large for inline or already in chunks } else { // 2. Prepare data string from input buffer // Note: in.data is a hg_const_string_t (char*) Loading
tests/integration/data/test_inline_data.py +2 −0 Original line number Diff line number Diff line Loading @@ -161,3 +161,5 @@ def test_inline_overflow_pwrite(gkfs_daemon, gkfs_client): assert read_buf[0:100] == buf1 assert read_buf[100:offset] == b'\x00' * (offset - 100) assert read_buf[offset:offset+100] == buf2