pmem / pmemfile

Userspace implementation of file APIs using persistent memory.
Other
34 stars 21 forks source link

posix: simplify read and pread functions #299

Closed GBuella closed 7 years ago

GBuella commented 7 years ago

This change is Reviewable

codecov-io commented 7 years ago

Codecov Report

Merging #299 into master will decrease coverage by 0.06%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #299      +/-   ##
==========================================
- Coverage    79.4%   79.33%   -0.07%     
==========================================
  Files          81       81              
  Lines       12127    12096      -31     
  Branches     1642     1636       -6     
==========================================
- Hits         9629     9596      -33     
  Misses       1891     1891              
- Partials      607      609       +2
Impacted Files Coverage Δ
src/libpmemfile-posix/read.c 92.85% <100%> (-0.23%) :arrow_down:
tests/posix/mt/mt.cpp 85.41% <0%> (-1.05%) :arrow_down:
src/libpmemfile-posix/rename.c 91.12% <0%> (-0.41%) :arrow_down:
src/libpmemfile-posix/file.c 65.93% <0%> (-0.28%) :arrow_down:
src/libpmemfile-posix/dir.c 82.06% <0%> (+0.04%) :arrow_up:
src/libpmemfile-posix/utils.c 73.43% <0%> (+0.42%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0787724...ff698c9. Read the comment docs.

krzycz commented 7 years ago
:lgtm:

Reviewed 1 of 1 files at r1. Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

marcinslusarz commented 7 years ago

Review status: all files reviewed at latest revision, 2 unresolved discussions, all commit checks successful.


src/libpmemfile-posix/read.c, line 220 at r1 (raw file):

pmemfile_read(PMEMfilepool *pfp, PMEMfile *file, void *buf, size_t count)
{
  return pmemfile_readv(pfp, file, &(pmemfile_iovec_t) {buf, count}, 1);

local variable please


src/libpmemfile-posix/read.c, line 260 at r1 (raw file):

{
  return pmemfile_preadv(pfp, file,
          &(pmemfile_iovec_t) {buf, count}, 1, offset);

and here


Comments from Reviewable

GBuella commented 7 years ago

Review status: 0 of 1 files reviewed at latest revision, 2 unresolved discussions.


src/libpmemfile-posix/read.c, line 220 at r1 (raw file):

Previously, marcinslusarz (Marcin Ślusarz) wrote…
local variable please

Done.


src/libpmemfile-posix/read.c, line 260 at r1 (raw file):

Previously, marcinslusarz (Marcin Ślusarz) wrote…
and here

Done.


Comments from Reviewable

marcinslusarz commented 7 years ago
:lgtm:

Reviewed 1 of 1 files at r2. Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

sarahjelinek commented 7 years ago
:lgtm:

Reviewed 1 of 1 files at r2. Review status: :shipit: all files reviewed at latest revision, all discussions resolved, all commit checks successful.


Comments from Reviewable