pmem / pmemfile

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

posix: fix lseek to DATA or HOLE on directory #305

Closed szychows closed 7 years ago

szychows commented 7 years ago

Implemented lseek to DATA or HOLE on directory.


This change is Reviewable

codecov-io commented 7 years ago

Codecov Report

Merging #305 into master will increase coverage by <.01%. The diff coverage is 86.04%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #305      +/-   ##
=========================================
+ Coverage    79.3%   79.3%   +<.01%     
=========================================
  Files          81      81              
  Lines       12069   12092      +23     
  Branches     1629    1635       +6     
=========================================
+ Hits         9571    9590      +19     
- Misses       1893    1895       +2     
- Partials      605     607       +2
Impacted Files Coverage Δ
tests/posix/rw/rw.cpp 92.87% <100%> (+0.06%) :arrow_up:
src/libpmemfile-posix/lseek.c 89.51% <80.64%> (-1.97%) :arrow_down:
src/libpmemfile-posix/utils.c 73.01% <0%> (-0.43%) :arrow_down:
src/libpmemfile-posix/rename.c 91.9% <0%> (-0.04%) :arrow_down:
src/libpmemfile-posix/file.c 65.93% <0%> (ø) :arrow_up:
src/libpmemfile-posix/data.c 92.27% <0%> (+0.02%) :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 e1d95a6...3c5bb7e. Read the comment docs.

krzycz commented 7 years ago

Reviewed 2 of 2 files at r1. Review status: all files reviewed at latest revision, 2 unresolved discussions.


Comments from Reviewable

szychows commented 7 years ago

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


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

Previously, marcinslusarz (Marcin Ślusarz) wrote…
"else return -ENXIO;" just in case we'll support more file types

Done.


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

Previously, marcinslusarz (Marcin Ślusarz) wrote…
offset >= end lseek_end_directory returns offset *after* the last entry, so offset == end is above "file" size

Done.


Comments from Reviewable

marcinslusarz commented 7 years ago

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

Previously, marcinslusarz (Marcin Ślusarz) wrote…
"else return -ENXIO;" just in case we'll support more file types

well, please put new line after else...


Comments from Reviewable

szychows commented 7 years ago

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


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

Previously, marcinslusarz (Marcin Ślusarz) wrote…
well, please put new line after else...

Done.


Comments from Reviewable

marcinslusarz commented 7 years ago
:lgtm:

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


Comments from Reviewable

sarahjelinek commented 7 years ago
:lgtm:

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


Comments from Reviewable