fs: cleanup - do not cache size of metafiles (#3630)

* Remove Size() method and size field from lock.LockedFile
* WriteTo method of fsMeta and uploadsV1 now takes concrete type *lock.LockedFile
This commit is contained in:
Krishna Srinivas
2017-01-25 12:29:06 -08:00
committed by Harshavardhana
parent 76b8abcd8e
commit 82373e3d50
10 changed files with 32 additions and 36 deletions

View File

@@ -89,14 +89,7 @@ func RLockedOpenFile(path string) (*RLockedFile, error) {
}
// LockedFile represents a locked file, implements a helper
// method Size(), represents the size of the underlying object.
// LockedFile represents a locked file
type LockedFile struct {
*os.File
size int64
}
// Size - size of the underlying locked file.
func (l *LockedFile) Size() int64 {
return l.size
}