Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go-fuse
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
Levin Zimmermann
go-fuse
Commits
ce1a82ae
Commit
ce1a82ae
authored
Jan 18, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Split out negative entries into fuse.NegativeEntry()
parent
15a0b00c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
fuse/misc.go
fuse/misc.go
+9
-1
fuse/pathfilesystem.go
fuse/pathfilesystem.go
+1
-4
No files found.
fuse/misc.go
View file @
ce1a82ae
// Random odds and ends.
// Random odds and ends.
package
fuse
...
...
@@ -283,3 +283,11 @@ func CountCpus() int {
return
len
(
re
.
FindAllString
(
string
(
contents
[
:
n
]),
100
))
}
// Creates a return entry for a non-existent path.
func
NegativeEntry
(
time
float64
)
*
EntryOut
{
out
:=
new
(
EntryOut
)
out
.
NodeId
=
0
SplitNs
(
time
,
&
out
.
EntryValid
,
&
out
.
EntryValidNsec
)
return
out
}
fuse/pathfilesystem.go
View file @
ce1a82ae
...
...
@@ -266,10 +266,7 @@ func (self *PathFileSystemConnector) Lookup(header *InHeader, name string) (out
fullPath
:=
path
.
Join
(
parent
.
GetPath
(),
name
)
attr
,
err
:=
self
.
fileSystem
.
GetAttr
(
fullPath
)
if
err
==
ENOENT
&&
self
.
options
.
NegativeTimeout
>
0.0
{
out
=
new
(
EntryOut
)
out
.
NodeId
=
0
SplitNs
(
self
.
options
.
NegativeTimeout
,
&
out
.
EntryValid
,
&
out
.
EntryValidNsec
)
return
out
,
OK
return
NegativeEntry
(
self
.
options
.
NegativeTimeout
),
OK
}
if
err
!=
OK
{
...
...
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