xl: Fix ReadFile to keep the order always for reading the data back. (#1339)

Also fixes a stackoverflow bug in namespace locking.
This commit is contained in:
Harshavardhana
2016-04-19 21:58:11 -07:00
committed by Harshavardhana
parent c7bf471c9e
commit 141a44bfbf
4 changed files with 72 additions and 64 deletions
+3
View File
@@ -297,6 +297,9 @@ func (o objectAPI) NewMultipartUpload(bucket, object string) (string, *probe.Err
// uploadIDPath doesn't exist, so create empty file to reserve the name
var w io.WriteCloser
if w, e = o.storage.CreateFile(minioMetaVolume, uploadIDPath); e == nil {
// Just write some data for erasure code, rather than zero bytes.
w.Write([]byte(uploadID))
// Close the writer.
if e = w.Close(); e != nil {
return "", probe.NewError(e)
}