Revert "btrfs: update superblock checksum on write"
This reverts commit caf05af5dd
.
This commit is contained in:
parent
f02f815ed4
commit
5fb44dff84
@ -66,7 +66,7 @@ static uint32 kCrcTable[256] = {
|
||||
\param data Pointer to the byte stream.
|
||||
\param length Length of the byte stream in bytes.
|
||||
|
||||
\return The crc checksum.
|
||||
\return The crc checksum, or 0 if an error occurred.
|
||||
*/
|
||||
uint32
|
||||
calculate_crc(uint32 crc, uint8* data, uint16 length)
|
||||
|
@ -656,9 +656,7 @@ Volume::FindBlock(off_t logical, off_t& physical)
|
||||
status_t
|
||||
Volume::WriteSuperBlock()
|
||||
{
|
||||
fSuperBlock.checksum = calculate_crc((uint32)~1,
|
||||
(uint8 *)(*(&fSuperBlock + sizeof(fSuperBlock.checksum))),
|
||||
sizeof(fSuperBlock) - sizeof(fSuperBlock.checksum));
|
||||
// TODO(lesderid): Calculate checksum
|
||||
|
||||
if (write_pos(fDevice, BTRFS_SUPER_BLOCK_OFFSET, &fSuperBlock,
|
||||
sizeof(btrfs_super_block))
|
||||
|
Loading…
Reference in New Issue
Block a user