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
549c0c90
Commit
549c0c90
authored
Aug 25, 2024
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fuse: print tweaks for passthrough support
Change-Id: I513d6344ff0d22649c240bbf31ef901dca70f4e2
parent
f0fd3eaf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
fuse/passthrough_linux.go
fuse/passthrough_linux.go
+8
-3
fuse/print.go
fuse/print.go
+1
-1
No files found.
fuse/passthrough_linux.go
View file @
549c0c90
...
...
@@ -35,7 +35,9 @@ func (ms *Server) RegisterBackingFd(fd int, flags uint32) (int32, syscall.Errno)
ms
.
writeMu
.
Lock
()
id
,
_
,
errno
:=
syscall
.
Syscall
(
syscall
.
SYS_IOCTL
,
uintptr
(
ms
.
mountFd
),
uintptr
(
_DEV_IOC_BACKING_OPEN
),
uintptr
(
unsafe
.
Pointer
(
&
m
)))
ms
.
writeMu
.
Unlock
()
if
ms
.
opts
.
Debug
{
ms
.
opts
.
Logger
.
Printf
(
"ioctl: BACKING_OPEN %d (flags %x): id %d (%v)"
,
fd
,
flags
,
id
,
errno
)
}
return
int32
(
id
),
errno
}
...
...
@@ -43,8 +45,11 @@ func (ms *Server) RegisterBackingFd(fd int, flags uint32) (int32, syscall.Errno)
// should have been acquired before using RegisterBackingFd.
func
(
ms
*
Server
)
UnregisterBackingFd
(
id
int32
)
syscall
.
Errno
{
ms
.
writeMu
.
Lock
()
_
,
_
,
e
p
:=
syscall
.
Syscall
(
syscall
.
SYS_IOCTL
,
uintptr
(
ms
.
mountFd
),
uintptr
(
_DEV_IOC_BACKING_CLOSE
),
uintptr
(
unsafe
.
Pointer
(
&
id
)))
_
,
_
,
e
rrno
:=
syscall
.
Syscall
(
syscall
.
SYS_IOCTL
,
uintptr
(
ms
.
mountFd
),
uintptr
(
_DEV_IOC_BACKING_CLOSE
),
uintptr
(
unsafe
.
Pointer
(
&
id
)))
ms
.
writeMu
.
Unlock
()
return
ep
if
ms
.
opts
.
Debug
{
ms
.
opts
.
Logger
.
Printf
(
"ioctl: BACKING_CLOSE id %d: %v"
,
id
,
errno
)
}
return
errno
}
fuse/print.go
View file @
549c0c90
...
...
@@ -215,7 +215,7 @@ func (in *OpenOut) string() string {
if
in
.
BackingID
!=
0
{
backing
=
fmt
.
Sprintf
(
"backing=%d "
,
in
.
BackingID
)
}
return
fmt
.
Sprintf
(
"{Fh %d %s
%s}"
,
in
.
Fh
,
backing
,
return
fmt
.
Sprintf
(
"{Fh %d %s%s}"
,
in
.
Fh
,
backing
,
flagString
(
fuseOpenFlagNames
,
int64
(
in
.
OpenFlags
),
""
))
}
...
...
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