Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
0273dfef
Commit
0273dfef
authored
Apr 14, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
25f07b48
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
5 deletions
+24
-5
bigfile/file_zodb.py
bigfile/file_zodb.py
+13
-0
bigfile/tests/test_virtmem.c
bigfile/tests/test_virtmem.c
+1
-1
bigfile/virtmem.c
bigfile/virtmem.c
+9
-3
include/wendelin/bigfile/virtmem.h
include/wendelin/bigfile/virtmem.h
+1
-1
No files found.
bigfile/file_zodb.py
View file @
0273dfef
...
...
@@ -596,6 +596,19 @@ class ZBigFile(LivePersistent):
# invalidate data .blktab[blk] invalidated -> invalidate page
def
invalidateblk
(
self
,
blk
):
for
fileh
in
self
.
_v_filehset
:
# wcfs: there is no need to propagate ZODB -> fileh invalidation by
# client since WCFS handles invalidations from ZODB by itself.
#
# More: the algorythm to compute δ(ZODB) -> δ(blk) is more complex
# than 1-1 ZBlk <-> blk mapping: ZBlk could stay constant, but if
# ZBigFile.blktab topology is changed, affected file blocks have to
# be invalidated. Currently both !wcfs and wcfs codepaths fail to
# handle that, but wcfs will be improved and !wcfs will be deprecated.
#
# -> don't propagate ZODB -> WCFS invalidation by client to fully
# rely on and test wcfs subsystem.
if
fileh
.
uses_mmap_overlay
():
continue
fileh
.
invalidate_page
(
blk
)
# XXX assumes blksize == pagesize
...
...
bigfile/tests/test_virtmem.c
View file @
0273dfef
...
...
@@ -1633,7 +1633,7 @@ void test_file_access_mmapoverlay(void)
ok1
(
!
M
(
vma
,
2
));
CHECK_NOPAGE
(
102
);
ok1
(
!
M
(
vma
,
3
));
CHECK_NOPAGE
(
103
);
/
/ XXX invalidation ?
/
* no invalidation - fileh_invalidate_page is forbidden for "mmap overlay" mode */
/* free resources */
...
...
bigfile/virtmem.c
View file @
0273dfef
...
...
@@ -551,9 +551,15 @@ void fileh_invalidate_page(BigFileH *fileh, pgoff_t pgoffset)
/* it's an error to invalidate fileh while writeout is in progress */
BUG_ON
(
fileh
->
writeout_inprogress
);
// XXX wcfs: invalidate_page must not be called (wcfs handles invalidations itself)
// XXX or allow invalidate anyway (e.g. DIRTY -> base) ?
// XXX yes -> allow invalidate for wcfs too - means forget in-ram page and mmap to base memory
/* wcfs: even though the operation to invalidate a page is well defined (it
* is subset of discard), we forbid it since wcfs handles invalidations
* from ZODB by itself inside wcfs server.
*
* It was kind of mistake to expose in 92bfd03e (bigfile: ZODB -> BigFileH
* invalidate propagation) fileh_invalidate_page as public API, since such
* invalidation should be handled by a BigFile instance internally. */
BUG_ON
(
fileh
->
mmap_overlay
);
page
=
pagemap_get
(
&
fileh
->
pagemap
,
pgoffset
);
if
(
page
)
{
...
...
include/wendelin/bigfile/virtmem.h
View file @
0273dfef
...
...
@@ -320,7 +320,7 @@ VIRTMEM_API void fileh_dirty_discard(BigFileH *fileh);
* file was changed externally )
*
* it's an error to call fileh_invalidate_page() while writeout for fileh is in
* progress.
* progress
, or for fileh opened in MMAP_OVERLAY mode
.
*/
VIRTMEM_API
void
fileh_invalidate_page
(
BigFileH
*
fileh
,
pgoff_t
pgoffset
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment