Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit85297cd

Browse files
committed
fusefrontend: doWrite: report readFileID errors as I/O error
It used to be reported as "function not implemented", accompaniedwith this log output: go-fuse: can't convert error type: ParseHeader: header is all-zero. Header hexdump: 000000000000000000000000000000000000Now we report EIO and log this: doWrite 1372183: corrupt header: ParseHeader: header is all-zero. Header hexdump: 000000000000000000000000000000000000
1 parente9a5b89 commit85297cd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎internal/fusefrontend/file.go‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,10 @@ func (f *File) doWrite(data []byte, off int64) (uint32, syscall.Errno) {
273273
iferr==io.EOF {
274274
fileID,err=f.createHeader()
275275
fileWasEmpty=true
276+
}elseiferr!=nil {
277+
// Other errors mean readFileID() found a corrupt header
278+
tlog.Warn.Printf("doWrite %d: corrupt header: %v",f.qIno.Ino,err)
279+
return0,syscall.EIO
276280
}
277281
iferr!=nil {
278282
return0,fs.ToErrno(err)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp