bcache-tools: recover the missing sb.csum for showing bcache device super block
Commit 2891723d7075 ("bcache-tools: define separated super block for
in-memory and on-disk format") does following change in detail_base(),
base->magic = "ok";
base->first_sector = SB_SECTOR;
- base->csum = sb.csum;
base->version = sb.version;
because sb (in type struct cache_sb) doesn't have csum of the on-disk
super block anymore. The aftermath is base.csum was missing, and the
"show" command always display sb.csum as 0.
This patch recovers the csum value setting for base.csum, then command
"bcache show -d" may display the correct super block check sum.
Fixes: 2891723d7075 ("bcache-tools: define separated super block for in-memory and on-disk format")
Signed-off-by: Coly Li <email@example.com>
1 file changed