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
a73d5f2b
Commit
a73d5f2b
authored
Jul 01, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
69181fdb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
wcfs/wcfs.go
wcfs/wcfs.go
+6
-5
No files found.
wcfs/wcfs.go
View file @
a73d5f2b
...
...
@@ -605,6 +605,7 @@ type WatchLink struct {
// was queried also send pins.
//
// XXX locking?
// XXX -> watchByFile?
byfile
map
[
zodb
.
Oid
]
*
Watch
// {} foid -> Watch
// IO
...
...
@@ -822,7 +823,7 @@ retry:
}
file
:=
file
wg
.
Go
(
func
()
error
{
return
file
.
invalidateAttr
()
// XXX pass ctx?
return
file
.
invalidateAttr
()
// NOTE does not accept ctx
})
}
err
=
wg
.
Wait
()
...
...
@@ -928,8 +929,7 @@ func (head *Head) zheadWait(ctx context.Context, at zodb.Tid) (err error) {
// invalidateBlk invalidates 1 file block in kernel cache.
//
// see "4.4) for all file/blk to in invalidate we do"
//
// called with f.head.zheadMu wlocked.
// called with zheadMu wlocked.
func
(
f
*
BigFile
)
invalidateBlk
(
ctx
context
.
Context
,
blk
int64
)
(
err
error
)
{
defer
xerr
.
Contextf
(
&
err
,
"%s: invalidate blk #%d:"
,
f
.
path
(),
blk
)
...
...
@@ -951,7 +951,7 @@ func (f *BigFile) invalidateBlk(ctx context.Context, blk int64) (err error) {
delete
(
f
.
loading
,
blk
)
}
//
XXX
skip retrieve/store if len(f.watches) == 0
//
TODO
skip retrieve/store if len(f.watches) == 0
// try to retrieve cache of current head/data[blk], if we got nothing from f.loading
if
blkdata
==
nil
{
blkdata
=
make
([]
byte
,
blksize
)
...
...
@@ -996,7 +996,8 @@ func (f *BigFile) invalidateBlk(ctx context.Context, blk int64) (err error) {
// invalidateAttr invalidates file attributes in kernel cache.
//
// Complements invalidateBlk and is used to invalidate file size.
// complements invalidateBlk and is used to invalidate file size.
// called with zheadMu wlocked.
func
(
f
*
BigFile
)
invalidateAttr
()
(
err
error
)
{
defer
xerr
.
Contextf
(
&
err
,
"%s: invalidate attr"
,
f
.
path
())
fsconn
:=
gfsconn
...
...
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