-
Notifications
You must be signed in to change notification settings - Fork 307
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
+23
−1
Merged
Changes from 2 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e508f8e
DAOS-6709 rsvc: xfer only attr size and fix tests
bfaccini 885a6ff
Merge branch 'master' into DAOS-6709_2nd
bfaccini 04bf17b
Merge branch 'master' into DAOS-6709_2nd
bfaccini 637617d
Merge branch 'master' into DAOS-6709_2nd
bfaccini 8e5819d
Merge branch 'master' into DAOS-6709_2nd
bfaccini af2534e
Merge branch 'master' into DAOS-6709_2nd
bfaccini d9c7dca
DAOS-6709 rsvc: send each segment as a single bulk
bfaccini File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see you only want to transfer the real size for each attribute, but the handling here is incorrect.
You may refer obj_bulk_transfer()'s code, just FYI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, Bruno's change looks right to me. The problem is that the original author fell into the crt pitfall that crt looks at iov_buf_len instead of iov_len when creating a bulk handle, no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in client's attr_bulk_create(), the bulk handle is created by -
2267 > /* values */
2268 > if (sizes != NULL && values != NULL) {
2269 > > for (j = 0; j < n; ++j)
2270 > > > if (sizes[j] > 0)
2271 > > > > d_iov_set(&sgl.sg_iovs[i++],
2272 > > > > > values[j], sizes[j]);
2273 > }
i.e. for the attr values, each bulk segment is set to user provided buffer list.
Then at server-side, need to start multi-bulk-transferring to fill to each attr's value's segment, if the real size of some middle segments is less than user provided buffer.
For example, client read 2 attrs, each provide 1KB buffer. But actually at server side, it finds that each attr only with value of 0.5KB. Then should start 2 bulk transfer, 1st transfer to first segment's 0-0.5KB, 2nd transfer to 2nd segment's 0-0.5KB. This is what this patch want to do, no?
or I may mis-understood it...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. I mistakenly assumed that the client-side buffer is one continuous segment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @liuxuezhao and @liw for these very interesting and helpful comments. I think I had to have a look to the similar behaviour in obj_bulk_transfer() before !!... And also it seems to me that attr_bulk_transfer() has been designed to work with a single/common buffer at some point of time...
Will try to push a new commit soon, based on your comments, many thanks again !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you are planning to update this PR @bfaccini ? I noticed that @liw approved it after that comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or perhaps it's just github being weird. It shows this comment block and afterward, the approval but the approval appears tied to the prior comment from @liw, not the most recent one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jolivier23 , yes I will try to implement the fix for DAOS-6709 based on these comments.
I think @liw had first approved and then felt ok with @liuxuezhao about the way that should be used to fix...