Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
bake
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
7
Issues
7
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sds
bake
Commits
5a7c5572
Commit
5a7c5572
authored
Dec 14, 2017
by
Shane Snyder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement the create-write-persist-proxy call
parent
c8ba2435
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
79 additions
and
0 deletions
+79
-0
include/bake-client.h
include/bake-client.h
+22
-0
src/bake-client.c
src/bake-client.c
+57
-0
No files found.
include/bake-client.h
View file @
5a7c5572
...
...
@@ -121,6 +121,28 @@ int bake_create_write_persist(
uint64_t
buf_size
,
bake_region_id_t
*
rid
);
/**
*
* @param [in] bti BAKE target identifier
* @param [in] region_size size of region to be created
* @param [in] region_offset offset into the target region to write
* @param [in] remote_bulk bulk_handle for remote data region to write from
* @param [in] remote_offset offset in the remote bulk handle to write from
* @param [in] remote_addr address string of the remote target to write from
* @param [in] size size to write from remote bulk handle
* @param [out] rid identifier for new region
* @returns 0 on success, -1 on failure
*/
int
bake_create_write_persist_proxy
(
bake_target_id_t
bti
,
uint64_t
region_size
,
uint64_t
region_offset
,
hg_bulk_t
remote_bulk
,
uint64_t
remote_offset
,
const
char
*
remote_addr
,
uint64_t
size
,
bake_region_id_t
*
rid
);
/**
* Checks the size of an existing BAKE region.
*
...
...
src/bake-client.c
View file @
5a7c5572
...
...
@@ -541,6 +541,63 @@ int bake_create_write_persist(
return
(
ret
);
}
int
bake_create_write_persist_proxy
(
bake_target_id_t
bti
,
uint64_t
region_size
,
uint64_t
region_offset
,
hg_bulk_t
remote_bulk
,
uint64_t
remote_offset
,
const
char
*
remote_addr
,
uint64_t
size
,
bake_region_id_t
*
rid
)
{
hg_return_t
hret
;
hg_handle_t
handle
;
bake_create_write_persist_in_t
in
;
bake_create_write_persist_out_t
out
;
int
ret
;
struct
bake_instance
*
instance
=
NULL
;
HASH_FIND
(
hh
,
instance_hash
,
&
bti
,
sizeof
(
bti
),
instance
);
if
(
!
instance
)
return
(
-
1
);
in
.
bti
=
bti
;
in
.
region_size
=
region_size
;
in
.
region_offset
=
region_offset
;
in
.
bulk_handle
=
remote_bulk
;
in
.
bulk_offset
=
remote_offset
;
in
.
bulk_size
=
size
;
in
.
remote_addr_str
=
(
char
*
)
remote_addr
;
hret
=
margo_create
(
g_margo_inst
.
mid
,
instance
->
dest
,
g_margo_inst
.
bake_create_write_persist_id
,
&
handle
);
if
(
hret
!=
HG_SUCCESS
)
return
(
-
1
);
hret
=
margo_forward
(
handle
,
&
in
);
if
(
hret
!=
HG_SUCCESS
)
{
margo_destroy
(
handle
);
return
(
-
1
);
}
hret
=
margo_get_output
(
handle
,
&
out
);
if
(
hret
!=
HG_SUCCESS
)
{
margo_destroy
(
handle
);
return
(
-
1
);
}
ret
=
out
.
ret
;
if
(
ret
==
0
)
*
rid
=
out
.
rid
;
margo_free_output
(
handle
,
&
out
);
margo_destroy
(
handle
);
return
(
ret
);
}
int
bake_get_size
(
bake_target_id_t
bti
,
bake_region_id_t
rid
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment