]> git.ipfire.org Git - thirdparty/kernel/stable.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)
commitd721a43ff69cd473019c3b77aacb76b09102aca3
treee5d0ad183c923b7c09e9cdd34d92c75956d5568e
parent117f636ea695270fe492d0c0c9dfadc7a662af47
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