Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAOS-6709 rsvc: xfer only attr size and fix tests #4745

Merged
merged 7 commits into from
Mar 23, 2021
Merged
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
24 changes: 23 additions & 1 deletion src/rsvc/srv_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ ds_rsvc_get_attr(struct ds_rsvc *svc, struct rdb_tx *tx, rdb_path_t *path,
crt_bulk_t local_bulk;
daos_size_t bulk_size;
daos_size_t input_size;
daos_size_t local_offset, remote_offset;
d_iov_t *iovs;
d_sg_list_t sgl;
void *data;
Expand Down Expand Up @@ -259,7 +260,28 @@ ds_rsvc_get_attr(struct ds_rsvc *svc, struct rdb_tx *tx, rdb_path_t *path,
goto out_iovs;

rc = attr_bulk_transfer(rpc, CRT_BULK_PUT, local_bulk, remote_bulk,
0, key_length, bulk_size - key_length);
0, key_length, count * sizeof(*sizes));
if (rc != 0)
goto out_iovs;

local_offset = count * sizeof(*sizes);
remote_offset = key_length + count * sizeof(*sizes);

for (i = 1; i < sgl.sg_nr; i++) {
daos_size_t size;

size = min(sgl.sg_iovs[i].iov_len,
sgl.sg_iovs[i].iov_buf_len);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sgl.sg_iovs[i].iov_buf_len);
sgl.sg_iovs[i].iov_buf_len);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you need to refresh, fix this one. Not a huge issue but indent does look a bit off.

rc = attr_bulk_transfer(rpc, CRT_BULK_PUT, local_bulk,
remote_bulk, local_offset,
remote_offset, size);
if (rc != 0)
goto out_iovs;

local_offset += sgl.sg_iovs[i].iov_buf_len;
remote_offset += sgl.sg_iovs[i].iov_buf_len;
}

crt_bulk_free(local_bulk);
if (rc != 0)
goto out_iovs;
Expand Down