Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions 05clnt/client_imp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ uint32_t global_clnt_context::bdev_ctl_get_num_in_air_ios(const backend_bdev_id&
* It will definitely call get_error() at least once
* Calling cancel make no sense from callback but user can do this (will get io already done as reply).
* Incoming io completions from Server
* With server backend - completion ring wakes up and calls client_receive_server_finish_io(), race with cancel ans stop all io's
* With server backend - completion ring wakes up and calls client_receive_server_finish_io(), race with cancel and stop all io's
* IO executor ris responsible for managing executor completions separately from user requests (like cancel / io poling)
* Stop all ios (Server disconnect and reconnect)
* Generate internal cancellation. Behaves like user requested cancel but on all ios.
Expand All @@ -610,7 +610,7 @@ uint32_t global_clnt_context::bdev_ctl_get_num_in_air_ios(const backend_bdev_id&
* Poll the same io status from a different thread. done() will be called while another thread does polling
* Another thread may run { cancel() / done() } / stop all io and have a race of which thread call done()
* Polling IO from 1 thread in parallel to callback arriving on another thread.
* Inherent race condition: seting io rv and issuing callback. GUSLI assumes that polling is potentially done so once
* Inherent race condition: setting io rv and issuing callback. GUSLI assumes that polling is potentially done so once
rv of io is set, immediately done() can be called and io can be free() from the polling thread.
* Calling done() and freeing the io too early with async io. A callback of completion may arrive before submit_io() finished
It is not advisable to free the io before user submission finished as even harmless prints ("submitted successfully")
Expand Down
4 changes: 2 additions & 2 deletions 05clnt/io_executors.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class io_request_executor_base : no_implicit_constructors {
}

virtual int run(void) = 0; // Start IO execution, Return -1 if constructor had failure. Otherwise return 0;
virtual enum io_request::cancel_rv cancel(void) { // Assume IO calls cancel() or detach_io() exactly once, no concurency here
virtual enum io_request::cancel_rv cancel(void) { // Assume IO calls cancel() or detach_io() exactly once, no concurrency here
io_request::cancel_rv rv;
cmp.lock.lock(); // Multiple cancel calls??? protect with atomic compare exchange
if (cmp.was_canceled) {
Expand Down Expand Up @@ -316,7 +316,7 @@ class wrap_remote_io_exec_async : public io_request_executor_base {
};

/*****************************************************************************/
// Executor for testing. Finishes IO only after it is explicitly canceled by user, effectively makeing IO stuck forever until canceled.
// Executor for testing. Finishes IO only after it is explicitly canceled by user, effectively making IO stuck forever until canceled.
class never_reply_executor : public io_request_executor_base {
public:
never_reply_executor(in_air_ios_holder &_ina, io_request_base &_io) : io_request_executor_base(_ina, _io, true) {}
Expand Down
2 changes: 1 addition & 1 deletion 07examples/client/sample_client.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ int client_test_write_read_verify_multi(const gusli::bdev_info& info, const std:
return 0;
}

/* Simple test of clinet process: Connect to server, Write IO and verify it
/* Simple test of client process: Connect to server, Write IO and verify it
with read. Do 1 range and multi-range io. Stop the server at the end */
int client_simple_test_of_server(const char* clnt_name, const int n_devs, const char* const bdev_uuid[], const char* const srvr_addr[]) {
gusli::global_clnt_context::init_params p;
Expand Down
2 changes: 1 addition & 1 deletion 80scripts/integration_with_nixl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fi;
# Step 3.0: Install generic stuff
apt-get update; apt-get install -y libgflags-dev meson autoconf libtool gdb htop libgtest-dev liburing-dev libaio-dev clangd tree xxd sudo;

# Step 3.1: Install latests gusli lib
# Step 3.1: Install latest gusli lib
cd /home/danielhe/projects/nixl;
if false; then # Debugging / Developing GUSLI-NIXL integration
rm -rf ./gusli; cp -r ../gusli .; # Copy local dev version
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ OBJECTS_SPDK_BOTH_APP = $(patsubst %.cpp, $(OBJ_DIR)/%.o, $(SOURCES_SPDK_BOTH_AP
OBJECTS_SPDK_SRVR_APP = $(patsubst %.cpp, $(OBJ_DIR)/%.o, $(SOURCES_SPDK_SRVR_APP))
OBJECTS_ALL = $(OBJECTS_BASE) $(OBJECTS_CLNT) $(OBJECTS_SRVR) $(OBJECTS_TEST_CLNT) $(OBJECTS_SPDK_BOTH_APP) $(OBJECTS_SPDK_SRVR_APP)

# Include dependency files if they exist, causes recompilation .cpp files when .hpp files cahnge
# Include dependency files if they exist, causes recompilation .cpp files when .hpp files change
DEPEND_FILES_ALL = $(OBJECTS_ALL:.o=.d)
DFLAGS = -MP -MMD

Expand Down Expand Up @@ -312,7 +312,7 @@ install: $(OBJ_DIR)/$(LIB_CLNT_NAME).so $(OBJ_DIR)/$(LIB_SRVR_NAME).so gusli_cli
# ldconfig

uninstall:
@printf "+-->Unistall from |\e[1;45m$(INSTALL_DIR)\e[0;0m|\n"
@printf "+-->Uninstall from |\e[1;45m$(INSTALL_DIR)\e[0;0m|\n"
@rm -f $(INSTALL_DIR)/lib/lib$(PROJECT_PREFIX)_*
@rm -f $(INSTALL_DIR)/lib/$(PROJECT_PREFIX)_*
@rm -f $(INSTALL_DIR)/include/$(PROJECT_PREFIX)_*
Expand Down
4 changes: 2 additions & 2 deletions gusli_client_api.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace gusli {
/***************************** block device configuration ********************/
// Note: Library does not manage local block devices, it assumes they exist and library can connect to them. Like local disks
struct backend_bdev_id { // Unique ID of volume / block device / disk
char uuid[16]; // Deliberatly no dependency on uuid.lib
char uuid[16]; // Deliberately no dependency on uuid.lib
friend bool operator==(const backend_bdev_id& a, const backend_bdev_id& b) noexcept {
return (memcmp(a.uuid, b.uuid, sizeof(a.uuid)) == 0);
}
Expand Down Expand Up @@ -67,7 +67,7 @@ struct bdev_config_params {
enum connect_how { SHARED_RW = 'W', READ_ONLY = 'R', EXCLUSIVE_RW = 'X'} how; // Access permissions for block device
bool is_direct_io; // Attempt for direct io if possible (avoid page cache)
union connection_addr_t { // Path/address of server/block-device. Kernel block device (like /dev/nvme0n2), Local file path (like: /tmp/my_file.txt)
char any[64]; // Remote server addres: uds/udp/tcp socket. like: /tmp/gs_uds", "t127.0.0.2" /*tcp*/, "u127.0.0.1" /*udp*/
char any[64]; // Remote server address: uds/udp/tcp socket. like: /tmp/gs_uds", "t127.0.0.2" /*tcp*/, "u127.0.0.1" /*udp*/
} conn;
char security_cookie[16]; // 16[bytes] Utf-8 string, Used for handshake with server, to verify library is authorized to access this bdev
bdev_config_params() { memset(this, 0, sizeof(*this)); }
Expand Down