Adar Dembo has posted comments on this change.

Change subject: env: add ReadV() API
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/6779/1/src/kudu/util/env_posix.cc
File src/kudu/util/env_posix.cc:

Line 312: Status DoReadV(int fd, const string& filename, uint64_t offset, 
vector<Slice>* results) {
> This implementation seems to be structured in the following way:
One other note: iovs from the iov array are "consumed" from front to back, not 
back to front. So in addition to changing iov_size, you'll need to increment 
the pointer to the iov array itself. You could do that with some "iov_consumed" 
integer state and then the preadv() calls would look like this:

  preadv(fd, iov + iov_consumed, iov_size - iov_consumed, cur_offset);

Just double check that "iov + iov_consumed" is correct; may also need to 
multiply iov_consumed by sizeof(iov).


-- 
To view, visit http://gerrit.cloudera.org:8080/6779
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib8f7a62c8363b40baa064d9e63be1ece506f1e48
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Grant Henke <granthe...@gmail.com>
Gerrit-Reviewer: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Mike Percy <mpe...@apache.org>
Gerrit-Reviewer: Tidy Bot
Gerrit-HasComments: Yes

Reply via email to