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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
wendelin.core
Commits
44f1d222
Commit
44f1d222
authored
Mar 02, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
8337bde5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
bigfile/virtmem.c
bigfile/virtmem.c
+1
-2
include/wendelin/bigfile/file.h
include/wendelin/bigfile/file.h
+3
-3
wcfs/client/wcfs.cpp
wcfs/client/wcfs.cpp
+5
-4
No files found.
bigfile/virtmem.c
View file @
44f1d222
...
...
@@ -163,7 +163,7 @@ int fileh_open(BigFileH *fileh, BigFile *file, RAM *ram, FileHOpenFlags flags)
if
(
flags
==
MMAP_OVERLAY
)
{
ASSERT
(
fops
->
mmap_setup_read
);
ASSERT
(
fops
->
remmap_blk_read
);
// XXX assert fops->munmap
ASSERT
(
fops
->
munmap
);
}
if
(
flags
==
DONT_MMAP_OVERLAY
)
{
ASSERT
(
fops
->
loadblk
);
...
...
@@ -287,7 +287,6 @@ int fileh_mmap(VMA *vma, BigFileH *fileh, pgoff_t pgoffset, pgoff_t pglen)
if
(
!
vma_page_infilerange
(
vma
,
page
))
continue
;
/* page is out of requested mmap coverage */
// XXX notify watcher that we mmap RAM page in its range? -> no need
vma_mmap_page
(
vma
,
page
);
}
}
...
...
include/wendelin/bigfile/file.h
View file @
44f1d222
...
...
@@ -130,7 +130,7 @@ struct bigfile_ops {
*
* XXX mention VMA.mmap_overlay_server?
*
* Called under virtmem lock.
* Called under virtmem lock.
XXX easy to rework to call with !virt_lock
*
* NOTE blk and blklen are in blocks, not pages.
*
...
...
@@ -143,14 +143,14 @@ struct bigfile_ops {
// remmap_blk_read is called to remmap a block into vma again, after e.g.
// RW dirty page was discarded.
//
// Called under virtmem lock.
// Called under virtmem lock.
NOTE hard to rework to call with !virt_lock
//
// XXX error -> bug (must not fail)
int
(
*
remmap_blk_read
)
(
VMA
*
vma
,
BigFile
*
file
,
blk_t
blk
);
/* munmap is called when vma set up via mmap_setup_read is going to be unmapped.
*
* Called under virtmem lock.
* Called under virtmem lock.
XXX easy to rework to call with !virt_lock
* Must not fail.
*/
void
(
*
munmap
)
(
VMA
*
vma
,
BigFile
*
file
);
...
...
wcfs/client/wcfs.cpp
View file @
44f1d222
...
...
@@ -321,7 +321,7 @@ error _Conn::_pinner(context::Context ctx) {
if
(
wconn
.
_downErr
==
nil
)
{
wconn
.
_downErr
=
fmt
::
errorf
(
"no longer operational due to: %w"
,
err
!=
nil
?
err
:
fmt
::
errorf
(
"pinner exit"
));
// XXX make all fileh and mapping invalid.
// XXX
error ->
make all fileh and mapping invalid.
}
wconn
.
_filehMu
.
Unlock
();
...
...
@@ -386,12 +386,13 @@ error _Conn::__pin1(PinReq *req) {
});
// lock wconn.filehMu.R to lookup fileh in wconn.filehTab.
// keep wconn.filehMu.R during whole __pin1 to make sure that e.g.
// simultaneous close does not remove f from wconn.filehTab.
//
// keep wconn.filehMu.R locked during whole __pin1 run to make sure that
// e.g. simultaneous FileH.close does not remove f from wconn.filehTab.
// TODO keeping filehMu.R during whole pin is not needed and locking can be made more granular.
//
// NOTE no deadlock wrt Conn.resync, Conn.open, FileH.close - they all send
// "watch" outside of wconn.filehMu.
// "watch"
requests to wcfs server
outside of wconn.filehMu.
wconn
.
_filehMu
.
RLock
();
defer
([
&
]()
{
wconn
.
_filehMu
.
RUnlock
();
...
...
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