How does btrfs behave on checksum mismatch?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I came across the tidbit that ZFS has a contract guarantee that the
data read back will either be correct (the checksum computed over the
data read from the disk matches the checksum stored on disk), or you
get an I/O error. Obviously, this greatly reduces the probability that
the data is invalid. (Particularly when taken in combination with the
disk firmware's own ECC and checksumming.)

With the default options, does btrfs make any similar guarantees? If
not, then are there any options to force it to make such guarantees?

I'm interested in this both from a specification and an implementation
point of view.

The last thing anyone wants is probably undetected bit rot, and with
today's large drives, even with the quite low bit rot numbers it can
be a real concern. If even the act of simply successfully reading a
file guarantees, to the extent of the checksumming algorithm's ability
to detect changes, that the data read is the same as was once written,
that would be a major selling point for btrfs for me personally.

The closest I was able to find was that btrfs uses crc32c currently
for data and metadata checksumming and that this can be turned off if
so desired (using the "nodatasum" mount option), but nothing about
what the file system code does or is supposed to do in the face of a
checksum mismatch.

-- 
Michael Kjörling • http://michael.kjorling.se • michael@xxxxxxxxxxx
                “People who think they know everything really annoy
                those of us who know we don’t.” (Bjarne Stroustrup)
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux