Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jacobsa-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
jacobsa-fuse
Commits
c2e9acdd
Commit
c2e9acdd
authored
Apr 29, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made built-in fuse logging less verbose.
parent
88af4165
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
23 deletions
+23
-23
connection.go
connection.go
+4
-4
fuseops/convert.go
fuseops/convert.go
+1
-1
fuseops/ops.go
fuseops/ops.go
+18
-18
No files found.
connection.go
View file @
c2e9acdd
...
...
@@ -98,24 +98,24 @@ func (c *Connection) ReadOp() (op fuseops.Op, err error) {
c
.
nextOpID
++
// Log the receipt of the operation.
c
.
log
(
opID
,
1
,
"
Received:
%v"
,
bfReq
)
c
.
log
(
opID
,
1
,
"
<-
%v"
,
bfReq
)
// Special case: responding to this is required to make mounting work on OS
// X. We don't currently expose the capability for the file system to
// intercept this.
if
statfsReq
,
ok
:=
bfReq
.
(
*
bazilfuse
.
StatfsRequest
);
ok
{
c
.
log
(
opID
,
1
,
"
Responding OK to Statfs.
"
)
c
.
log
(
opID
,
1
,
"
-> (Statfs) OK
"
)
statfsReq
.
Respond
(
&
bazilfuse
.
StatfsResponse
{})
continue
}
// Convert it, if possible.
logForOp
:=
func
(
calldepth
int
,
format
string
,
v
...
interface
{})
{
c
.
log
(
opID
,
calldepth
+
1
,
format
,
v
)
c
.
log
(
opID
,
calldepth
+
1
,
format
,
v
...
)
}
if
op
=
fuseops
.
Convert
(
bfReq
,
logForOp
,
&
c
.
opsInFlight
);
op
==
nil
{
c
.
log
(
opID
,
1
,
"
Returning ENOSYS for unknown bazilfuse request
: %v"
,
bfReq
)
c
.
log
(
opID
,
1
,
"
-> ENOSYS
: %v"
,
bfReq
)
bfReq
.
RespondError
(
ENOSYS
)
continue
}
...
...
fuseops/convert.go
View file @
c2e9acdd
...
...
@@ -309,7 +309,7 @@ func (o *commonOp) respondErr(err error) {
}
o
.
Logf
(
"
Responding with error to %s
: %v"
,
"
-> (%s) error
: %v"
,
o
.
opType
,
err
)
...
...
fuseops/ops.go
View file @
c2e9acdd
...
...
@@ -107,7 +107,7 @@ func (o *InitOp) Respond(err error) {
resp
.
MaxReadahead
=
o
.
maxReadahead
// Respond.
o
.
Logf
(
"
Responding:
%v"
,
&
resp
)
o
.
Logf
(
"
->
%v"
,
&
resp
)
o
.
r
.
(
*
bazilfuse
.
InitRequest
)
.
Respond
(
&
resp
)
}
...
...
@@ -152,7 +152,7 @@ func (o *LookUpInodeOp) Respond(err error) {
resp
:=
bazilfuse
.
LookupResponse
{}
convertChildInodeEntry
(
&
o
.
Entry
,
&
resp
)
o
.
Logf
(
"
Responding:
%v"
,
&
resp
)
o
.
Logf
(
"
->
%v"
,
&
resp
)
o
.
r
.
(
*
bazilfuse
.
LookupRequest
)
.
Respond
(
&
resp
)
}
...
...
@@ -186,7 +186,7 @@ func (o *GetInodeAttributesOp) Respond(err error) {
AttrValid
:
convertExpirationTime
(
o
.
AttributesExpiration
),
}
o
.
Logf
(
"
Responding:
%v"
,
&
resp
)
o
.
Logf
(
"
->
%v"
,
&
resp
)
o
.
r
.
(
*
bazilfuse
.
GetattrRequest
)
.
Respond
(
&
resp
)
}
...
...
@@ -226,7 +226,7 @@ func (o *SetInodeAttributesOp) Respond(err error) {
AttrValid
:
convertExpirationTime
(
o
.
AttributesExpiration
),
}
o
.
Logf
(
"
Responding:
%v"
,
&
resp
)
o
.
Logf
(
"
->
%v"
,
&
resp
)
o
.
r
.
(
*
bazilfuse
.
SetattrRequest
)
.
Respond
(
&
resp
)
}
...
...
@@ -287,7 +287,7 @@ func (o *ForgetInodeOp) Respond(err error) {
return
}
o
.
Logf
(
"
Responding OK to ForgetInodeOp
"
)
o
.
Logf
(
"
-> (ForgetInodeOp) OK
"
)
o
.
r
.
(
*
bazilfuse
.
ForgetRequest
)
.
Respond
()
}
...
...
@@ -330,7 +330,7 @@ func (o *MkDirOp) Respond(err error) {
resp
:=
bazilfuse
.
MkdirResponse
{}
convertChildInodeEntry
(
&
o
.
Entry
,
&
resp
.
LookupResponse
)
o
.
Logf
(
"
Responding:
%v"
,
&
resp
)
o
.
Logf
(
"
->
%v"
,
&
resp
)
o
.
r
.
(
*
bazilfuse
.
MkdirRequest
)
.
Respond
(
&
resp
)
}
...
...
@@ -392,7 +392,7 @@ func (o *CreateFileOp) Respond(err error) {
}
convertChildInodeEntry
(
&
o
.
Entry
,
&
resp
.
LookupResponse
)
o
.
Logf
(
"
Responding:
%v"
,
&
resp
)
o
.
Logf
(
"
->
%v"
,
&
resp
)
o
.
r
.
(
*
bazilfuse
.
CreateRequest
)
.
Respond
(
&
resp
)
}
...
...
@@ -424,7 +424,7 @@ func (o *RmDirOp) Respond(err error) {
return
}
o
.
Logf
(
"
Responding OK to RmDirOp
"
)
o
.
Logf
(
"
-> (RmDirOp) OK
"
)
o
.
r
.
(
*
bazilfuse
.
RemoveRequest
)
.
Respond
()
}
...
...
@@ -450,7 +450,7 @@ func (o *UnlinkOp) Respond(err error) {
return
}
o
.
Logf
(
"
Responding OK to UnlinkOp
"
)
o
.
Logf
(
"
-> (UnlinkOp) OK
"
)
o
.
r
.
(
*
bazilfuse
.
RemoveRequest
)
.
Respond
()
}
...
...
@@ -496,7 +496,7 @@ func (o *OpenDirOp) Respond(err error) {
Handle
:
bazilfuse
.
HandleID
(
o
.
Handle
),
}
o
.
Logf
(
"
Responding:
%v"
,
&
resp
)
o
.
Logf
(
"
->
%v"
,
&
resp
)
o
.
r
.
(
*
bazilfuse
.
OpenRequest
)
.
Respond
(
&
resp
)
}
...
...
@@ -602,7 +602,7 @@ func (o *ReadDirOp) Respond(err error) {
Data
:
o
.
Data
,
}
o
.
Logf
(
"
Responding:
%v"
,
&
resp
)
o
.
Logf
(
"
->
%v"
,
&
resp
)
o
.
r
.
(
*
bazilfuse
.
ReadRequest
)
.
Respond
(
&
resp
)
}
...
...
@@ -631,7 +631,7 @@ func (o *ReleaseDirHandleOp) Respond(err error) {
return
}
o
.
Logf
(
"
Responding OK to ReleaseDirHandleOp
"
)
o
.
Logf
(
"
-> (ReleaseDirHandleOp) OK
"
)
o
.
r
.
(
*
bazilfuse
.
ReleaseRequest
)
.
Respond
()
}
...
...
@@ -676,7 +676,7 @@ func (o *OpenFileOp) Respond(err error) {
Handle
:
bazilfuse
.
HandleID
(
o
.
Handle
),
}
o
.
Logf
(
"
Responding:
%v"
,
&
resp
)
o
.
Logf
(
"
->
%v"
,
&
resp
)
o
.
r
.
(
*
bazilfuse
.
OpenRequest
)
.
Respond
(
&
resp
)
}
...
...
@@ -721,7 +721,7 @@ func (o *ReadFileOp) Respond(err error) {
Data
:
o
.
Data
,
}
o
.
Logf
(
"
Responding:
%v"
,
&
resp
)
o
.
Logf
(
"
->
%v"
,
&
resp
)
o
.
r
.
(
*
bazilfuse
.
ReadRequest
)
.
Respond
(
&
resp
)
}
...
...
@@ -807,7 +807,7 @@ func (o *WriteFileOp) Respond(err error) {
Size
:
len
(
o
.
Data
),
}
o
.
Logf
(
"
Responding:
%v"
,
&
resp
)
o
.
Logf
(
"
->
%v"
,
&
resp
)
o
.
r
.
(
*
bazilfuse
.
WriteRequest
)
.
Respond
(
&
resp
)
}
...
...
@@ -843,7 +843,7 @@ func (o *SyncFileOp) Respond(err error) {
return
}
o
.
Logf
(
"
Responding OK to SyncFileOp
"
)
o
.
Logf
(
"
-> (SyncFileOp) OK
"
)
o
.
r
.
(
*
bazilfuse
.
FsyncRequest
)
.
Respond
()
}
...
...
@@ -910,7 +910,7 @@ func (o *FlushFileOp) Respond(err error) {
return
}
o
.
Logf
(
"
Responding OK to FlushFileOp
"
)
o
.
Logf
(
"
-> (FlushFileOp) OK
"
)
o
.
r
.
(
*
bazilfuse
.
FlushRequest
)
.
Respond
()
}
...
...
@@ -939,6 +939,6 @@ func (o *ReleaseFileHandleOp) Respond(err error) {
return
}
o
.
Logf
(
"
Responding OK to ReleaseFileHandleOp
"
)
o
.
Logf
(
"
-> (ReleaseFileHandleOp) OK
"
)
o
.
r
.
(
*
bazilfuse
.
ReleaseRequest
)
.
Respond
()
}
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