Closed marcinslusarz closed 6 years ago
Merging #422 into master will decrease coverage by
0.13%
. The diff coverage is88%
.
@@ Coverage Diff @@
## master #422 +/- ##
==========================================
- Coverage 76.02% 75.88% -0.14%
==========================================
Files 68 68
Lines 8767 8763 -4
Branches 1776 1775 -1
==========================================
- Hits 6665 6650 -15
- Misses 1608 1624 +16
+ Partials 494 489 -5
Flag | Coverage Δ | |
---|---|---|
#ltp_tests | 44.77% <84%> (-0.31%) |
:arrow_down: |
#sqlite_tests | 44.94% <84%> (-0.06%) |
:arrow_down: |
#tests_antool | 14.65% <0%> (ø) |
:arrow_up: |
#tests_posix_multi_threaded | 25.51% <84%> (-0.04%) |
:arrow_down: |
#tests_posix_single_threaded | 53.48% <84%> (ø) |
:arrow_up: |
#tests_preload | 44.75% <88%> (+0.22%) |
:arrow_up: |
Impacted Files | Coverage Δ | |
---|---|---|
src/libpmemfile-posix/inode.c | 89.07% <88%> (+0.51%) |
:arrow_up: |
src/libpmemfile-posix/fcntl.c | 49.38% <0%> (-13.59%) |
:arrow_down: |
src/libpmemfile-posix/dir.c | 85.78% <0%> (-0.5%) |
:arrow_down: |
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 b7e34b3...d4e8bfd. Read the comment docs.
Review status: 0 of 1 files reviewed at latest revision, 2 unresolved discussions.
src/libpmemfile-posix/inode.c, line 226 at r1 (raw file):
inode = vinode->inode = NULL; } else if (vinode->atime_dirty) { bool atime_slot = inode_next_atime_slot(inode);
Perhaps this is a good opportunity to fix the type name here.
src/libpmemfile-posix/inode.c, line 234 at r1 (raw file):
} to_unregister = vinode;
This to_unregister variable always throws me off track when I try to read this code. In fact, it is the same as the vinode pointer, we just have two variables referring to the same thing now. Can't we get rid of it? We could have this in the beginning of the loop:
struct pmemfile_vinode *parent = NULL;
if (vinode->parent != vinode)
parent = vinode->parent;
and this at the end of the loop:
vinode = parent;
Or we could call it next
instead of parent
.
Comments from Reviewable
Reviewed 1 of 1 files at r1. Review status: all files reviewed at latest revision, 2 unresolved discussions.
Comments from Reviewable
Review status: 0 of 1 files reviewed at latest revision, 2 unresolved discussions.
src/libpmemfile-posix/inode.c, line 226 at r1 (raw file):
Perhaps this is a good opportunity to fix the type name here.
Done.
src/libpmemfile-posix/inode.c, line 234 at r1 (raw file):
This to_unregister variable always throws me off track when I try to read this code. In fact, it is the same as the vinode pointer, we just have two variables referring to the same thing now. Can't we get rid of it? We could have this in the beginning of the loop: ``` struct pmemfile_vinode *parent = NULL; if (vinode->parent != vinode) parent = vinode->parent; ``` and this at the end of the loop: ``` vinode = parent; ``` Or we could call it `next` instead of `parent`.
Done.
Comments from Reviewable
Reviewed 1 of 1 files at r2. Review status: all files reviewed at latest revision, all discussions resolved.
Comments from Reviewable
vinode->parent was compared to vinode (as a "is_root" check) without holding vinode lock. However exchange won't ever set vinode->parent to parent, so this race is harmless. Fixing this race actually simplifies vinode_unref code.
Introduced by 3e3782e41f4f13836a033328130ff1a3b3ac8701.
This change is