-
Notifications
You must be signed in to change notification settings - Fork 21
posix: disable space overallocation on append & fix 16k blocks tests #432
base: master
Are you sure you want to change the base?
Conversation
…nd the end of file Not caught because rw test is not executed for 16k block size.
Current block sizes are 16k, 256k and 2M, so there's no point in allocating more than 2M.
Reviewed 6 of 6 files at r1. Comments from Reviewable |
Codecov Report
@@ Coverage Diff @@
## master #432 +/- ##
==========================================
+ Coverage 75.95% 76.13% +0.18%
==========================================
Files 70 70
Lines 8815 8813 -2
Branches 1781 1782 +1
==========================================
+ Hits 6695 6710 +15
+ Misses 1628 1611 -17
Partials 492 492
Continue to review full report at Codecov.
|
pfp, 1, 1, 0, (env_block_size == 0x4000) ? bc_4k : bc)); | ||
|
||
if (env_block_size == 0x4000) | ||
EXPECT_TRUE(test_pmemfile_stats_match(pfp, 1, 1, 1, bc_4k)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, perhaps we should rename bc_4k -> bc_16k.
Not necessarily in this patch.
@@ -191,7 +191,8 @@ lseek_seek_data_or_hole(PMEMfilepool *pfp, struct pmemfile_vinode *vinode, | |||
if (vinode_is_regular_file(vinode)) { | |||
if (whence == PMEMFILE_SEEK_DATA) { | |||
offset = lseek_seek_data(pfp, vinode, offset, fsize); | |||
ASSERT(offset <= fsize); | |||
if (offset > fsize) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if this should be offset > fsize
or offset >= fsize
.
E.g. what should happen with an empty file, should offset == 0 be OK with SEEK_DATA?
This change is