]> git.baikalelectronics.ru Git - kernel.git/commit
bcache: increase super block version for cache device and backing device
authorColy Li <colyli@suse.de>
Sat, 25 Jul 2020 12:00:27 +0000 (20:00 +0800)
committerJens Axboe <axboe@kernel.dk>
Sat, 25 Jul 2020 13:38:20 +0000 (07:38 -0600)
commit247e89860e34998f7fcea381b9aa4036726ff385
treee5d0ad183c923b7c09e9cdd34d92c75956d5568e
parentca5c7728e3f26b36e2f18736efc5ef1d2bf6d32a
bcache: increase super block version for cache device and backing device

The new added super block version BCACHE_SB_VERSION_BDEV_WITH_FEATURES
(5) BCACHE_SB_VERSION_CDEV_WITH_FEATURES value (6), is for the feature
set bits.

Devices have super block version equal to the new version will have
three new members for feature set bits in the on-disk super block,
        __le64                  feature_compat;
        __le64                  feature_incompat;
        __le64                  feature_ro_compat;

They are used for further new features which may introduce on-disk
format change, and avoid unncessary super block version increase.

The very basic features handling code skeleton is also initialized in
this patch.

Signed-off-by: Coly Li <colyli@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/bcache/features.h [new file with mode: 0644]
drivers/md/bcache/super.c
include/uapi/linux/bcache.h