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
Kirill Smelkov
go-fuse
Commits
035be141
Commit
035be141
authored
May 28, 2012
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add outstanding number of pipes to debug output.
parent
6a9ca360
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
5 deletions
+23
-5
splice/pool.go
splice/pool.go
+18
-5
unionfs/autounion.go
unionfs/autounion.go
+5
-0
No files found.
splice/pool.go
View file @
035be141
...
...
@@ -21,6 +21,10 @@ func Get() (*Pair, error) {
return
splicePool
.
get
()
}
func
Total
()
int
{
return
splicePool
.
total
()
}
func
Used
()
int
{
return
splicePool
.
used
()
}
...
...
@@ -35,17 +39,26 @@ func newSplicePairPool() *pairPool {
func
(
me
*
pairPool
)
clear
()
{
me
.
Lock
()
defer
me
.
Unlock
()
for
_
,
p
:=
range
me
.
unused
{
p
.
Close
()
}
me
.
unused
=
me
.
unused
[
:
0
]
me
.
Unlock
()
}
func
(
me
*
pairPool
)
used
()
int
{
func
(
me
*
pairPool
)
used
()
(
n
int
)
{
me
.
Lock
()
defer
me
.
Unlock
()
return
me
.
usedCount
n
=
me
.
usedCount
me
.
Unlock
()
return
n
}
func
(
me
*
pairPool
)
total
()
int
{
me
.
Lock
()
n
:=
me
.
usedCount
+
len
(
me
.
unused
)
me
.
Unlock
()
return
n
}
func
(
me
*
pairPool
)
get
()
(
p
*
Pair
,
err
error
)
{
...
...
@@ -79,9 +92,9 @@ func (me *pairPool) done(p *Pair) {
DiscardAll
(
p
.
r
)
me
.
Lock
()
defer
me
.
Unlock
()
me
.
usedCount
--
me
.
unused
=
append
(
me
.
unused
,
p
)
me
.
Unlock
()
}
func
init
()
{
...
...
unionfs/autounion.go
View file @
035be141
...
...
@@ -3,6 +3,7 @@ package unionfs
import
(
"fmt"
"github.com/hanwen/go-fuse/fuse"
"github.com/hanwen/go-fuse/splice"
"io/ioutil"
"log"
"os"
...
...
@@ -373,6 +374,10 @@ func (fs *AutoUnionFs) DebugData() string {
if
fs
.
connector
!=
nil
{
msg
+=
fmt
.
Sprintf
(
"Live inodes: %d
\n
"
,
fs
.
connector
.
InodeHandleCount
())
}
pairs
:=
splice
.
Total
()
if
pairs
>
0
{
msg
+=
fmt
.
Sprintf
(
"Pipes: %d
\n
"
,
pairs
)
}
return
msg
}
...
...
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