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