fs/multipart: Append multipart parts in a proper Go routine in background. (#3282)

This commit is contained in:
Krishna Srinivas
2016-11-21 13:12:53 +05:30
committed by Harshavardhana
parent 38537c7df2
commit afa4c7c3ef
4 changed files with 240 additions and 131 deletions

View File

@@ -494,8 +494,11 @@ func (s *posix) ReadAll(volume, path string) (buf []byte, err error) {
// ReadFile reads exactly len(buf) bytes into buf. It returns the
// number of bytes copied. The error is EOF only if no bytes were
// read. On return, n == len(buf) if and only if err == nil. n == 0
// for io.EOF. Additionally ReadFile also starts reading from an
// offset.
// for io.EOF.
// If an EOF happens after reading some but not all the bytes,
// ReadFull returns ErrUnexpectedEOF.
// Additionally ReadFile also starts reading from an offset.
// ReadFile symantics are same as io.ReadFull
func (s *posix) ReadFile(volume string, path string, offset int64, buf []byte) (n int64, err error) {
defer func() {
if err == syscall.EIO {