bcache-tools: add to_cache_sb() and to_cache_sb_disk()

This patch adds routines to_cache_sb() to_cache_sb_disk() to lib.c,
which convert bcache super block between in-memory and on-disk formats.

This is a preparation to separate current struct cache_sb into two
structures,
- struct cache_sb is for in-memory super block
- struct cache_sb_disk is for on-disk super block

Signed-off-by: Coly Li <colyli@suse.de>
2 files changed