fusefronted: log more details on WriteAt failures

Also log inode number, fd number, offset and length.

Maybe help debugging https://github.com/rfjakob/gocryptfs/issues/269 .
This commit is contained in:
Jakob Unterwurzacher 2018-10-17 22:16:06 +02:00
parent 3cd892ccde
commit 4cdf6b9af9
1 changed files with 2 additions and 1 deletions

View File

@ -342,7 +342,8 @@ func (f *File) doWrite(data []byte, off int64) (uint32, fuse.Status) {
// Return memory to CReqPool
f.fs.contentEnc.CReqPool.Put(ciphertext)
if err != nil {
tlog.Warn.Printf("doWrite: Write failed: %s", err.Error())
tlog.Warn.Printf("ino%d fh%d: doWrite: WriteAt off=%d len=%d failed: %v",
f.qIno.Ino, f.intFd(), cOff, len(ciphertext), err)
return 0, fuse.ToStatus(err)
}
return uint32(len(data)), fuse.OK