From aa6fa7f3cf0c7a2ab078ad4648eca742e5acd232 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 4 Oct 2015 15:43:46 +0200 Subject: Truncate: Logging improvements, show number of blocks as float --- pathfs_frontend/file_holes.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pathfs_frontend/file_holes.go') diff --git a/pathfs_frontend/file_holes.go b/pathfs_frontend/file_holes.go index db27805..f906aa6 100644 --- a/pathfs_frontend/file_holes.go +++ b/pathfs_frontend/file_holes.go @@ -2,6 +2,7 @@ package pathfs_frontend import ( "github.com/hanwen/go-fuse/fuse" + "github.com/rfjakob/gocryptfs/cryptfs" ) // Will a write to offset "off" create a file hole? @@ -19,6 +20,7 @@ func (f *file) zeroPad(plainSize uint64) fuse.Status { lastBlockLen := plainSize % f.cfs.PlainBS() missing := f.cfs.PlainBS() - lastBlockLen pad := make([]byte, missing) + cryptfs.Debug.Printf("zeroPad: Writing %d bytes\n", missing) _, status := f.doWrite(pad, int64(plainSize)) return status } -- cgit v1.2.3