]> git.baikalelectronics.ru Git - kernel.git/commit
md/raid5-cache: fix crc in rewrite_data_only_stripes()
authorSong Liu <songliubraving@fb.com>
Wed, 7 Dec 2016 17:42:05 +0000 (09:42 -0800)
committerShaohua Li <shli@fb.com>
Thu, 8 Dec 2016 18:34:03 +0000 (10:34 -0800)
commitea8d77df839faf10b24c3396cbbcf83c7f4b56bc
tree63a30076fc9664afc1c991dbb72caa3ad73be565
parentd7d14a5acff416176c050d35c36a8499ea36e427
md/raid5-cache: fix crc in rewrite_data_only_stripes()

r5l_recovery_create_empty_meta_block() creates crc for the empty
metablock. After the metablock is updated, we need clear the
checksum before recalculate it.

Shaohua: moved checksum calculation out of
r5l_recovery_create_empty_meta_block. We should calculate it after all fields
are updated.

Signed-off-by: Song Liu <songliubraving@fb.com>
Signed-off-by: Shaohua Li <shli@fb.com>
drivers/md/raid5-cache.c