From 4cdf6b9af94232912857138cc1ddcec520d9ceca Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Wed, 17 Oct 2018 22:16:06 +0200 Subject: 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 . --- internal/fusefrontend/file.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'internal') diff --git a/internal/fusefrontend/file.go b/internal/fusefrontend/file.go index 32f615b..9230bed 100644 --- a/internal/fusefrontend/file.go +++ b/internal/fusefrontend/file.go @@ -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 -- cgit v1.2.3