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
ed1cf943
Commit
ed1cf943
authored
Feb 27, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made Release dir-specific too.
parent
137b2461
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
11 deletions
+15
-11
file_system.go
file_system.go
+13
-9
fuseutil/not_implemented_file_system.go
fuseutil/not_implemented_file_system.go
+2
-2
No files found.
file_system.go
View file @
ed1cf943
...
...
@@ -32,6 +32,10 @@ type FileSystem interface {
ctx
context
.
Context
,
req
*
ForgetInodeRequest
)
(
*
ForgetInodeResponse
,
error
)
///////////////////////////////////
// Directory handles
///////////////////////////////////
// Open a directory inode. The kernel calls this method when setting up a
// struct file for a particular inode with type directory, usually in
// response to an open(2) call from a user-space process.
...
...
@@ -44,15 +48,15 @@ type FileSystem interface {
ctx
context
.
Context
,
req
*
ReadDirRequest
)
(
*
ReadDirResponse
,
error
)
// Release a previously-minted
handle. The kernel calls this when there are
//
no more references to an open file: all file descriptors are closed and
// all memory mappings are unmapped.
// Release a previously-minted
directory handle. The kernel calls this when
//
there are no more references to an open directory: all file descriptors
// a
re closed and a
ll memory mappings are unmapped.
//
// The kernel guarantees that the handle ID will not be used in further calls
// to the file system (unless it is reissued by the file system).
ReleaseHandle
(
Release
Dir
Handle
(
ctx
context
.
Context
,
req
*
Release
HandleRequest
)
(
*
Release
HandleResponse
,
error
)
req
*
Release
DirHandleRequest
)
(
*
ReleaseDir
HandleResponse
,
error
)
}
////////////////////////////////////////////////////////////////////////
...
...
@@ -223,10 +227,10 @@ type OpenDirResponse struct {
// The handle may be supplied to the following methods:
//
// * ReadDir
// * ReleaseHandle
// * Release
Dir
Handle
//
// The file system must ensure this ID remains valid until a later call to
// ReleaseHandle.
// Release
Dir
Handle.
Handle
HandleID
}
...
...
@@ -319,12 +323,12 @@ type ReadDirResponse struct {
Data
[]
byte
}
type
ReleaseHandleRequest
struct
{
type
Release
Dir
HandleRequest
struct
{
// The handle ID to be released. The kernel guarantees that this ID will not
// be used in further calls to the file system (unless it is reissued by the
// file system).
Handle
HandleID
}
type
ReleaseHandleResponse
struct
{
type
Release
Dir
HandleResponse
struct
{
}
fuseutil/not_implemented_file_system.go
View file @
ed1cf943
...
...
@@ -39,8 +39,8 @@ func (fs *NotImplementedFileSystem) ReadDir(
return
nil
,
fuse
.
ENOSYS
}
func
(
fs
*
NotImplementedFileSystem
)
ReleaseHandle
(
func
(
fs
*
NotImplementedFileSystem
)
Release
Dir
Handle
(
ctx
context
.
Context
,
req
*
fuse
.
Release
HandleRequest
)
(
*
fuse
.
Release
HandleResponse
,
error
)
{
req
*
fuse
.
Release
DirHandleRequest
)
(
*
fuse
.
ReleaseDir
HandleResponse
,
error
)
{
return
nil
,
fuse
.
ENOSYS
}
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