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
aaca62ff
Commit
aaca62ff
authored
Oct 19, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
edddfbe7
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
wcfs/client/wcfs.cpp
wcfs/client/wcfs.cpp
+1
-0
wcfs/internal/wcfs_test.pyx
wcfs/internal/wcfs_test.pyx
+1
-1
wcfs/wcfs.go
wcfs/wcfs.go
+7
-6
No files found.
wcfs/client/wcfs.cpp
View file @
aaca62ff
...
...
@@ -183,6 +183,7 @@
// (*) see "Wcfs locking organization" in wcfs.go
// (%) see related comment in Conn.__pin1 for details.
// Handling of fork
//
// When a process calls fork, OS copies its memory and creates child process
...
...
wcfs/internal/wcfs_test.pyx
View file @
aaca62ff
...
...
@@ -160,7 +160,7 @@ cdef extern from "<fcntl.h>" nogil:
int
posix_fadvise
(
int
fd
,
off_t
offset
,
off_t
len
,
int
advice
);
enum
:
POSIX_FADV_DONTNEED
# fadvise_dontneed te
e
ls the kernel that file<fd>[offset +len) is not needed.
# fadvise_dontneed te
l
ls the kernel that file<fd>[offset +len) is not needed.
#
# see fadvise(2) for details.
def
fadvise_dontneed
(
int
fd
,
off_t
offset
,
off_t
len
):
...
...
wcfs/wcfs.go
View file @
aaca62ff
...
...
@@ -602,7 +602,8 @@ type BigFileDir struct {
// δ tail of tracked BTree nodes of all BigFiles + -> which file
// (used only for head/, not revX/)
δFmu
sync
.
RWMutex
// zheadMu.W | zheadMu.R + δFmu.X XXX kill δFmu
// XXX read/write access protected by zheadMu
// δFmu sync.RWMutex // zheadMu.W | zheadMu.R + δFmu.X XXX kill δFmu
δFtail
*
zdata
.
ΔFtail
}
...
...
@@ -1533,10 +1534,10 @@ func (f *BigFile) readPinWatchers(ctx context.Context, blk int64, treepath []btr
// see "3) for */head/data the following invariant is maintained..."
bfdir
:=
f
.
head
.
bfdir
δFtail
:=
bfdir
.
δFtail
bfdir
.
δFmu
.
Lock
()
// XXX locking correct? XXX -> better push down?
//
bfdir.δFmu.Lock() // XXX locking correct? XXX -> better push down?
δFtail
.
Track
(
f
.
zfile
,
blk
,
treepath
,
blkcov
,
zblk
)
// XXX pass in zblk.rev here?
f
.
accessed
.
Add
(
blk
)
bfdir
.
δFmu
.
Unlock
()
//
bfdir.δFmu.Unlock()
// make sure that file[blk] on clients side stays as of @w.at state.
...
...
@@ -1634,7 +1635,7 @@ func (wlink *WatchLink) setupWatch(ctx context.Context, foid zodb.Oid, at zodb.T
defer
head
.
zheadMu
.
RUnlock
()
headAt
:=
head
.
zconn
.
At
()
// XXX δFtail locking? (or ForgetPast is called only with zheadMu.W ?
)
// // XXX δFtail locking? (or ForgetPast is called only with zheadMu.W ? - yes
)
if
at
!=
zodb
.
InvalidTid
&&
at
<
bfdir
.
δFtail
.
Tail
()
{
return
fmt
.
Errorf
(
"too far away back from head/at (@%s); δt = %s"
,
headAt
,
headAt
.
Time
()
.
Sub
(
at
.
Time
()
.
Time
))
...
...
@@ -2264,9 +2265,9 @@ func (head *Head) bigopen(ctx context.Context, oid zodb.Oid) (_ *BigFile, err er
// only head/ needs δFtail, f.δtail and watches.
if
head
.
rev
==
0
{
// see "3) for */head/data the following invariant is maintained..."
head
.
bfdir
.
δFmu
.
Lock
()
// XXX locking ok?
//
head.bfdir.δFmu.Lock() // XXX locking ok?
head
.
bfdir
.
δFtail
.
Track
(
f
.
zfile
,
-
1
,
sizePath
,
blkCov
,
nil
)
head
.
bfdir
.
δFmu
.
Unlock
()
//
head.bfdir.δFmu.Unlock()
// FIXME: scan zfile.blktab - so that we can detect all btree changes
// see "XXX building δFtail lazily ..." in notes.txt
...
...
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