cleaner separation of posix client code and library api #651
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR includes code cleanup and restructuring of the client libraries to make sure the library API (i.e.,
libunifyfs_api
) does not rely on any of the POSIX I/O wrapping code. The support for file transfers in the library API has also been updated to use a new server-based transfer scheme where servers are responsible for writing their local data to the destination file. A summary of the various cleanup/changes follows:client changes:
unifyfs_mount()
core functionality, library API, and POSIX I/O support
unifyfs_client
state structure to avoid use of global variablesclient_api.c
unifyfs_wrap.h
posix_client.[ch]
to manage global state for POSIX I/Ounifyfs_fid.[ch]
to contain allunifyfs_fid_xxx()
functionsunifyfs_mount()
now checks for and uses environmentvariable setting for
UNIFYFS_MOUNTPOINT
client namespace
common changes:
arraylist_add()
now returns position of appended itemserver changes:
local file data copies it to the destination file
tests/examples changes:
testutil.h
write-transfer
exampletest_dir_is_empty()
to ignore trailing slashesHow Has This Been Tested?
Tested in Ubuntu Docker environment and on OLCF Summit
Types of changes
Checklist: