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
ee4f4770
Commit
ee4f4770
authored
Sep 09, 2015
by
Aaron Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some out of date lock annotations.
parent
560105ca
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
samples/memfs/inode.go
samples/memfs/inode.go
+3
-5
samples/memfs/memfs.go
samples/memfs/memfs.go
+2
-0
No files found.
samples/memfs/inode.go
View file @
ee4f4770
...
...
@@ -37,7 +37,7 @@ type inode struct {
// INVARIANT: attrs.Mode &^ (os.ModePerm|os.ModeDir|os.ModeSymlink) == 0
// INVARIANT: !(isDir() && isSymlink())
// INVARIANT: attrs.Size == len(contents)
attrs
fuseops
.
InodeAttributes
// GUARDED_BY(mu)
attrs
fuseops
.
InodeAttributes
// For directories, entries describing the children of the directory. Unused
// entries are of type DT_Unknown.
...
...
@@ -50,18 +50,16 @@ type inode struct {
// INVARIANT: If !isDir(), len(entries) == 0
// INVARIANT: For each i, entries[i].Offset == i+1
// INVARIANT: Contains no duplicate names in used entries.
entries
[]
fuseutil
.
Dirent
// GUARDED_BY(mu)
entries
[]
fuseutil
.
Dirent
// For files, the current contents of the file.
//
// INVARIANT: If !isFile(), len(contents) == 0
contents
[]
byte
// GUARDED_BY(mu)
contents
[]
byte
// For symlinks, the target of the symlink.
//
// INVARIANT: If !isSymlink(), len(target) == 0
//
// GUARDED_BY(mu)
target
string
}
...
...
samples/memfs/memfs.go
View file @
ee4f4770
...
...
@@ -45,6 +45,8 @@ type memFS struct {
// be re-used have nil entries. No ID less than fuseops.RootInodeID is ever
// used.
//
// All inodes are protected by the file system mutex.
//
// INVARIANT: For each inode in, in.CheckInvariants() does not panic.
// INVARIANT: len(inodes) > fuseops.RootInodeID
// INVARIANT: For all i < fuseops.RootInodeID, inodes[i] == 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