• Christoph Hellwig's avatar
    btrfs: fix fast csum implementation detection · 68d99ab0
    Christoph Hellwig authored
    The BTRFS_FS_CSUM_IMPL_FAST flag is currently set whenever a non-generic
    crc32c is detected, which is the incorrect check if the file system uses
    a different checksumming algorithm.  Refactor the code to only check
    this if crc32c is actually used.  Note that in an ideal world the
    information if an algorithm is hardware accelerated or not should be
    provided by the crypto API instead, but that's left for another day.
    
    CC: stable@vger.kernel.org # 5.4.x: c8a5f8ca: btrfs: print checksum type and implementation at mount time
    CC: stable@vger.kernel.org # 5.4.x
    Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
    Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    68d99ab0
disk-io.c 145 KB