diff --git a/cli/main.go b/cli/main.go index 8b9c85b..d7338ad 100644 --- a/cli/main.go +++ b/cli/main.go @@ -163,7 +163,6 @@ func fsDaemon( // By default fuse will use 128kb read-ahead even though we ask for 1024kb // If running as root on linux, raise read-ahead to 1024kb after mounting if user.Uid == "0" && runtime.GOOS == "linux" { - logger.Printf("Setting kernel read-ahead for dxfuse to 1024kb") mntInfo, err := os.Stat(mountpoint) if err != nil { logger.Printf(err.Error()) diff --git a/dx_ops.go b/dx_ops.go index b69a1e5..53c7bc4 100644 --- a/dx_ops.go +++ b/dx_ops.go @@ -256,6 +256,7 @@ func (ops *DxOps) DxFileCloseAndWait( switch fDesc.State { case "closed": // done. File is closed. + ops.log("Closed %s:%s", projectId, fid) return nil case "closing": // not done yet. diff --git a/dxfuse.go b/dxfuse.go index 29172f3..2ef97ac 100644 --- a/dxfuse.go +++ b/dxfuse.go @@ -1092,11 +1092,12 @@ func (fsys *Filesys) Unlink(ctx context.Context, op *fuseops.UnlinkOp) error { objectIds := make([]string, 1) objectIds[0] = fileToRemove.Id if err := fsys.ops.DxRemoveObjects(ctx, oph.httpClient, parentDir.ProjId, objectIds); err != nil { - fsys.log("Error in removing file (%s:%s/%s) on dnanexus: %s", + fsys.log("Error in removing %s:%s%s on dnanexus: %s", parentDir.ProjId, parentDir.ProjFolder, op.Name, err.Error()) return fsys.translateError(err) } + fsys.log("Removed %s, %s:%s%s", op.Name, parentDir.ProjId, parentDir.ProjFolder, op.Name) return nil } @@ -1577,8 +1578,6 @@ func (fsys *Filesys) WriteFile(ctx context.Context, op *fuseops.WriteFileOp) err fsys.opClose(oph) fsys.mutex.Unlock() fh.writeBuffer = fsys.uploader.AllocateWriteBuffer(partId, false) - fsys.log("allocated wb for %s", fh.Id) - } // all data copied into buffer slice, break if bytesCopied == len(bytesToWrite) { @@ -1729,7 +1728,9 @@ func (fsys *Filesys) ReleaseFileHandle(ctx context.Context, op *fuseops.ReleaseF case AM_AO_Remote: // Special case for empty files which are not uploaded during FlushFile since their size is 0 if fh.size == 0 && len(fh.writeBuffer) == 0 && fh.lastPartId == 0 { - fsys.log("Upload and close empty file") + if fsys.ops.options.Verbose { + fsys.log("Upload and close empty %s", fh.Id) + } fh.lastPartId++ partId := fh.lastPartId httpClient := <-fsys.httpClientPool diff --git a/metadata_db.go b/metadata_db.go index 2f2a1c0..bfe9958 100644 --- a/metadata_db.go +++ b/metadata_db.go @@ -1251,7 +1251,7 @@ func (mdb *MetadataDb) CreateFile( mode os.FileMode) (File, error) { if mdb.options.Verbose { mdb.log("CreateFile %s/%s projpath=%s%s", - dir.FullPath, fname, dir.ProjFolder, dir.ProjId) + dir.FullPath, fname, dir.ProjId, dir.ProjFolder) } // Create remote file @@ -1292,6 +1292,8 @@ func (mdb *MetadataDb) CreateFile( mdb.log("CreateFile error creating data object") return File{}, err } + mdb.log("Created file %s/%s %s:%s", + dir.FullPath, fname, dir.ProjId, fileId) // 3. return a File structure return File{