mirror of
https://github.com/pgsty/minio.git
synced 2026-10-10 19:55:59 +03:00
Fix healing whole file bitrot (#7123)
* Use 0-byte file for bitrot verification of whole-file-bitrot files Also pass the right checksum information for bitrot verification * Copy xlMeta info from latest meta except []checksums and []Parts while healing
This commit is contained in:
committed by
Harshavardhana
parent
74c2048ea9
commit
51ec61ee94
+3
-11
@@ -189,17 +189,9 @@ func newXLMetaV1(object string, dataBlocks, parityBlocks int) (xlMeta xlMetaV1)
|
||||
// Return a new xlMetaV1 initialized using the given xlMetaV1. Used in healing to make sure that we do not copy
|
||||
// over any part's checksum info which will differ for different disks.
|
||||
func newXLMetaFromXLMeta(meta xlMetaV1) xlMetaV1 {
|
||||
xlMeta := xlMetaV1{}
|
||||
xlMeta.Version = xlMetaVersion
|
||||
xlMeta.Format = xlMetaFormat
|
||||
xlMeta.Minio.Release = ReleaseTag
|
||||
xlMeta.Erasure = ErasureInfo{
|
||||
Algorithm: meta.Erasure.Algorithm,
|
||||
DataBlocks: meta.Erasure.DataBlocks,
|
||||
ParityBlocks: meta.Erasure.DataBlocks,
|
||||
BlockSize: meta.Erasure.BlockSize,
|
||||
Distribution: meta.Erasure.Distribution,
|
||||
}
|
||||
xlMeta := meta
|
||||
xlMeta.Erasure.Checksums = nil
|
||||
xlMeta.Parts = nil
|
||||
return xlMeta
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user