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
62094b64
Commit
62094b64
authored
Oct 10, 2011
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set Nlink = 1 if not set by lookup method. This fixes hardlink on
newer kernels.
parent
76730696
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
fuse/fsconnector.go
fuse/fsconnector.go
+5
-0
unionfs/memunionfs_test.go
unionfs/memunionfs_test.go
+13
-0
No files found.
fuse/fsconnector.go
View file @
62094b64
...
...
@@ -83,6 +83,11 @@ func (me *FileSystemConnector) childLookup(fi *os.FileInfo, fsi FsNode) (out *En
out
=
n
.
mount
.
fileInfoToEntry
(
fi
)
out
.
Ino
=
me
.
lookupUpdate
(
n
)
out
.
NodeId
=
out
.
Ino
if
out
.
Nlink
==
0
{
// With Nlink == 0, newer kernels will refuse link
// operations.
out
.
Nlink
=
1
}
return
out
}
...
...
unionfs/memunionfs_test.go
View file @
62094b64
...
...
@@ -338,6 +338,19 @@ func TestMemUnionFsLink(t *testing.T) {
}
}
func
TestMemUnionFsCreateLink
(
t
*
testing
.
T
)
{
wd
,
_
,
clean
:=
setupMemUfs
(
t
)
defer
clean
()
content
:=
"blabla"
fn
:=
wd
+
"/mnt/file"
err
:=
ioutil
.
WriteFile
(
fn
,
[]
byte
(
content
),
0666
)
CheckSuccess
(
err
)
err
=
os
.
Link
(
wd
+
"/mount/file"
,
wd
+
"/mount/linked"
)
CheckSuccess
(
err
)
}
func
TestMemUnionFsTruncate
(
t
*
testing
.
T
)
{
wd
,
_
,
clean
:=
setupMemUfs
(
t
)
defer
clean
()
...
...
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