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
ad8ff46a
Commit
ad8ff46a
authored
Oct 21, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
763a9837
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
wcfs/wcfs.go
wcfs/wcfs.go
+8
-7
No files found.
wcfs/wcfs.go
View file @
ad8ff46a
...
...
@@ -2133,17 +2133,17 @@ func (root *Root) lookup(name string, fctx *fuse.Context) (_ *Head, err error) {
}
revDir
=
&
Head
{
//
XXX
how to test forgets:
//
TODO
how to test forgets:
// echo 2 >/proc/sys/vm/drop_caches (root)
// mount -i -oremount $mntpt (root ?) (shrinks dcache)
// notify invalidate dentry from inside fs
fsNode
:
newFSNode
(
&
fsOptions
{
Sticky
:
false
}),
// XXX
+ Head.OnForget() -> del root.revTab[]
fsNode
:
newFSNode
(
&
fsOptions
{
Sticky
:
false
}),
// TODO
+ Head.OnForget() -> del root.revTab[]
rev
:
rev
,
zconn
:
zconnRev
,
// XXX
+ Head.OnForget() -> release zconn (= abort zconn.TxnCtx)
zconn
:
zconnRev
,
// TODO
+ Head.OnForget() -> release zconn (= abort zconn.TxnCtx)
}
bfdir
:=
&
BigFileDir
{
fsNode
:
newFSNode
(
&
fsOptions
{
Sticky
:
false
}),
//
XXX
+ BigFileDir.OnForget()
fsNode
:
newFSNode
(
&
fsOptions
{
Sticky
:
false
}),
//
TODO
+ BigFileDir.OnForget()
head
:
revDir
,
fileTab
:
make
(
map
[
zodb
.
Oid
]
*
BigFile
),
δFtail
:
nil
,
// δFtail not needed/used for @revX/
...
...
@@ -2209,7 +2209,7 @@ func (head *Head) bigfopen(ctx context.Context, oid zodb.Oid) (_ *BigFile, err e
}
f
:=
&
BigFile
{
fsNode
:
newFSNode
(
&
fsOptions
{
Sticky
:
false
}),
// XXX
+ BigFile.OnForget -> del .head.bfdir.fileTab[]
fsNode
:
newFSNode
(
&
fsOptions
{
Sticky
:
false
}),
// TODO
+ BigFile.OnForget -> del .head.bfdir.fileTab[]
head
:
head
,
zfile
:
zfile
,
blksize
:
blksize
,
...
...
@@ -2319,7 +2319,7 @@ func (zh *_wcfs_Zhead) Open(flags uint32, fctx *fuse.Context) (nodefs.File, fuse
groot
.
head
.
zheadMu
.
Lock
()
// TODO +fctx -> cancel
defer
groot
.
head
.
zheadMu
.
Unlock
()
//
XXX
del zheadSockTab[sk] on sk.File.Release (= client drops opened handle)
//
TODO
del zheadSockTab[sk] on sk.File.Release (= client drops opened handle)
gdebug
.
zheadSockTab
[
sk
]
=
struct
{}{}
return
sk
.
File
(),
fuse
.
OK
}
...
...
@@ -2531,7 +2531,8 @@ func _main() (err error) {
}
// wait for unmount
// XXX the kernel does not send FORGETs on unmount - release left node resources ourselves?
// NOTE the kernel does not send FORGETs on unmount - but we don't need
// to release left node resources ourselves, because it is just memory.
<-
serveCtx
.
Done
()
log
.
Infof
(
"stop %q %q"
,
mntpt
,
zurl
)
return
nil
...
...
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