On Mon, Nov 24, 2014 at 03:07:45PM -0500, Chris Mason wrote: > On Mon, Nov 24, 2014 at 12:23 AM, Liu Bo <bo.li....@oracle.com> wrote: > >This brings a strong-but-slow checksum algorithm, sha256. > > > >Actually btrfs used sha256 at the early time, but then moved to > >crc32c for > >performance purposes. > > > >As crc32c is sort of weak due to its hash collision issue, we need > >a stronger > >algorithm as an alternative. > > > >Users can choose sha256 from mkfs.btrfs via > > > >$ mkfs.btrfs -C 256 /device > > Agree with others about -C 256...-C sha256 is only three letters more ;)
That's right, #stupidme > > What's the target for this mode? Are we trying to find evil people > scribbling on the drive, or are we trying to find bad hardware? This is actually inspired by ZFS, who offers checksum functions ranging from the simple-and-fast fletcher2 to the slower-but-secure sha256. Back to btrfs, crc32c is the only choice. And also for the slowness of sha256, Intel has a set of instructions for it, "Intel SHA Extensions", that may help a lot. Not insisting on it, I'm always open to any suggestions. Btw, having played with merkle tree for a while, however, making good use of our existing scrub looks more promising for implemening the feature that detects changes between mounts. thanks, -liubo -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html