XL: Multipart update uploads.json properly. (#1741)

This commit is contained in:
Harshavardhana
2016-05-24 13:35:43 -07:00
committed by Harshavardhana
parent ed43d5e02b
commit a00a5c6e7e
4 changed files with 18 additions and 15 deletions

View File

@@ -77,7 +77,7 @@ func (m *xlMetaV1) ReadFrom(reader io.Reader) (n int64, err error) {
// WriteTo - write to implements io.WriterTo interface for marshalling xlMetaV1.
func (m xlMetaV1) WriteTo(writer io.Writer) (n int64, err error) {
metadataBytes, err := json.Marshal(m)
metadataBytes, err := json.Marshal(&m)
if err != nil {
return 0, err
}
@@ -231,6 +231,8 @@ func (xl xlObjects) writeXLMetadata(bucket, prefix string, xlMeta xlMetaV1) erro
var mErrs = make([]error, len(xl.storageDisks))
// Initialize metadata map, save all erasure related metadata.
xlMeta.Version = "1"
xlMeta.Format = "xl"
xlMeta.Minio.Release = minioReleaseTag
xlMeta.Erasure.DataBlocks = xl.dataBlocks
xlMeta.Erasure.ParityBlocks = xl.parityBlocks