pmem / pmemfile

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

posix: translate ENOMEM to ENOSPC when it's allowed #383

Closed marcinslusarz closed 6 years ago

marcinslusarz commented 7 years ago

There are few cases when ENOSPC would make sense, but I don't see it specified as valid errno in applicable man page.


This change is Reviewable

krzycz commented 7 years ago
:lgtm:

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


Comments from Reviewable

codecov[bot] commented 7 years ago

Codecov Report

Merging #383 into master will decrease coverage by 0.05%. The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #383      +/-   ##
==========================================
- Coverage   76.91%   76.86%   -0.06%     
==========================================
  Files          67       67              
  Lines        8261     8273      +12     
  Branches     1658     1664       +6     
==========================================
+ Hits         6354     6359       +5     
- Misses       1489     1495       +6     
- Partials      418      419       +1
Flag Coverage Δ
#ltp_tests 46.44% <0%> (+0.75%) :arrow_up:
#sqlite_tests 45.17% <0%> (-0.09%) :arrow_down:
#tests_antool 14.69% <0%> (-0.03%) :arrow_down:
#tests_posix_multi_threaded 25.08% <0%> (-0.01%) :arrow_down:
#tests_posix_single_threaded 54.19% <0%> (-0.13%) :arrow_down:
#tests_preload 44.68% <0%> (-0.12%) :arrow_down:
Impacted Files Coverage Δ
src/libpmemfile-posix/mkdir.c 97.05% <0%> (-2.95%) :arrow_down:
src/libpmemfile-posix/symlink.c 96.87% <0%> (-3.13%) :arrow_down:
src/libpmemfile-posix/link.c 96.9% <0%> (-2.05%) :arrow_down:
src/libpmemfile-posix/fallocate.c 60.46% <0%> (-1.44%) :arrow_down:
src/libpmemfile-posix/file.c 74.72% <0%> (-0.42%) :arrow_down:
src/libpmemfile-posix/rename.c 91.26% <0%> (-0.74%) :arrow_down:
src/libpmemfile-posix/inode.c 88.31% <0%> (-0.35%) :arrow_down:
src/libpmemfile-posix/data.c 94.02% <0%> (+0.39%) :arrow_up:
src/libpmemfile-posix/block_array.c 96.77% <0%> (+2.41%) :arrow_up:
src/libpmemfile-posix/blocks.c 70% <0%> (+5%) :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 e3f8791...1b82d92. Read the comment docs.

sarahjelinek commented 6 years ago
:lgtm:

Reviewed 6 of 6 files at r1. Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.


Comments from Reviewable

sarahjelinek commented 6 years ago

General comment... I am going to merge but do we need to add test cases for ENOSPC?

marcinslusarz commented 6 years ago

We definitely should. I don't have enough time now to do it properly and I didn't want to write trivial test just to get CodeCov green...