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
df20e4bf
Commit
df20e4bf
authored
Jun 30, 2013
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document more methods of the Serve type.
parent
b8a27afb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
fuse/server.go
fuse/server.go
+13
-5
unionfs/autounion.go
unionfs/autounion.go
+1
-1
No files found.
fuse/server.go
View file @
df20e4bf
...
...
@@ -53,6 +53,9 @@ func (ms *Server) SetDebug(dbg bool) {
ms
.
debug
=
dbg
}
// KernelSettings returns the Init message from the kernel, so
// filesystems can adapt to availability of features of the kernel
// driver.
func
(
ms
*
Server
)
KernelSettings
()
raw
.
InitIn
{
ms
.
reqMu
.
Lock
()
s
:=
ms
.
kernelSettings
...
...
@@ -73,6 +76,8 @@ type LatencyMap interface {
Add
(
name
string
,
dt
time
.
Duration
)
}
// RecordLatencies switches on collection of timing for each request
// coming from the kernel.P assing a nil argument switches off the
func
(
ms
*
Server
)
RecordLatencies
(
l
LatencyMap
)
{
ms
.
latencies
=
l
}
...
...
@@ -175,7 +180,9 @@ func NewServer(fs RawFileSystem, mountPoint string, opts *MountOptions) (*Server
return
ms
,
nil
}
func
(
ms
*
Server
)
BufferPoolStats
()
string
{
// DebugData returns internal status information for debugging
// purposes.
func
(
ms
*
Server
)
DebugData
()
string
{
s
:=
ms
.
opts
.
Buffers
.
String
()
var
r
int
...
...
@@ -250,6 +257,7 @@ func (ms *Server) readRequest(exitIdle bool) (req *request, code Status) {
return
req
,
OK
}
// returnRequest returns a request to the pool of unused requests.
func
(
ms
*
Server
)
returnRequest
(
req
*
request
)
{
ms
.
recordStats
(
req
)
...
...
@@ -277,7 +285,7 @@ func (ms *Server) recordStats(req *request) {
}
}
//
Loop initiates the FUSE loop. Normally, callers should run Loop
()
//
Serve initiates the FUSE loop. Normally, callers should run Serve
()
// and wait for it to exit, but tests will want to run this in a
// goroutine.
//
...
...
@@ -473,9 +481,9 @@ func init() {
defaultBufferPool
=
NewBufferPool
()
}
// Wait
for the first request to be served. Use this to avoid racing
//
between accessing the (empty) mountpoint, and the OS trying to
// setup the user-space mount.
// Wait
Mount waits for the first request to be served. Use this to
//
avoid racing between accessing the (empty) mountpoint, and the OS
//
trying to
setup the user-space mount.
func
(
ms
*
Server
)
WaitMount
()
{
<-
ms
.
started
}
unionfs/autounion.go
View file @
df20e4bf
...
...
@@ -411,7 +411,7 @@ func (fs *autoUnionFs) DebugData() string {
"Bufferpool: %v
\n
"
+
"Kernel: %v
\n
"
,
fuse
.
Version
(),
fs
.
mountState
.
BufferPoolStats
(),
fs
.
mountState
.
DebugData
(),
&
setting
)
if
fs
.
connector
!=
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