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
92582b33
Commit
92582b33
authored
Mar 20, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
5dfa6050
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
wcfs/wcfs.go
wcfs/wcfs.go
+10
-2
No files found.
wcfs/wcfs.go
View file @
92582b33
...
...
@@ -918,6 +918,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.
func
(
f
*
BigFile
)
invalidateAttr
()
(
err
error
)
{
defer
xerr
.
Contextf
(
&
err
,
"%s: invalidate attr"
,
f
.
path
())
fsconn
:=
gfsconn
...
...
@@ -950,6 +952,8 @@ func (root *Root) mkrevfile(rev zodb.Tid, fid zodb.Oid) (_ *BigFile, release fun
xfrev
:=
fsconn
.
LookupNode
(
root
.
Inode
(),
frevpath
)
if
xfrev
!=
nil
{
// FIXME checking for "node{0}" is fragile, but currently no other way
// XXX the node could be still forgotten since we are not holding open on it
// XXX -> always os.open unconditionally? or it is ok since it is just a cache?
if
xfrev
.
String
()
!=
"node{0}"
{
return
xfrev
.
Node
()
.
(
*
BigFile
),
func
(){},
nil
}
...
...
@@ -969,6 +973,10 @@ func (root *Root) mkrevfile(rev zodb.Tid, fid zodb.Oid) (_ *BigFile, release fun
// ----------------------------------------
// XXX Move Read here
// ----------------------------------------
// /(head|<rev>)/at -> readAt serves read.
func
(
h
*
Head
)
readAt
()
[]
byte
{
h
.
zconnMu
.
RLock
()
...
...
@@ -1039,8 +1047,6 @@ func (bfdir *BigFileDir) lookup(out *fuse.Attr, name string, fctx *fuse.Context)
return
f
,
nil
}
// XXX do we need to support unlink? -> no, @<revX>/ are automatically garbage-collected.
// / -> Lookup receives client request to create @<rev>/.
func
(
root
*
Root
)
Lookup
(
out
*
fuse
.
Attr
,
name
string
,
fctx
*
fuse
.
Context
)
(
*
nodefs
.
Inode
,
fuse
.
Status
)
{
revd
,
err
:=
root
.
lookup
(
name
,
fctx
)
...
...
@@ -1604,6 +1610,8 @@ func main() {
// TODO -> teach go-fuse to handle Init.MaxPages (Linux 4.20+).
MaxWrite
:
2
*
1024
*
1024
,
// XXX tune MaxReadAhead? MaxBackground?
// OS cache that we populate with bigfile data is precious;
// we precisely propagate ZODB invalidations into file invalidations.
PreciseDataCacheControl
:
true
,
...
...
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