linux-sg2042/drivers/md/bcache
Coly Li 0df28cad06 bcache: only check feature sets when sb->version >= BCACHE_SB_VERSION_CDEV_WITH_FEATURES
For super block version < BCACHE_SB_VERSION_CDEV_WITH_FEATURES, it
doesn't make sense to check the feature sets. This patch checks
super block version in bch_has_feature_* routines, if the version
doesn't have feature sets yet, returns 0 (false) to the caller.

Fixes: 5342fd4255 ("bcache: set bcache device into read-only mode for BCH_FEATURE_INCOMPAT_OBSO_LARGE_BUCKET")
Fixes: ffa4703275 ("bcache: add bucket_size_hi into struct cache_sb_disk for large bucket")
Cc: stable@vger.kernel.org # 5.9+
Reported-and-tested-by: Bockholdt Arne <a.bockholdt@precitec-optronik.de>
Signed-off-by: Coly Li <colyli@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2021-01-28 07:35:07 -07:00
..
Kconfig bcache: Fix typo in Kconfig name 2020-07-25 07:38:19 -06:00
Makefile bcache: add sysfs file to display feature sets information of cache set 2020-07-25 07:38:21 -06:00
alloc.c bcache: remove embedded struct cache_sb from struct cache_set 2020-10-02 14:25:30 -06:00
bcache.h bcache: remove embedded struct cache_sb from struct cache_set 2020-10-02 14:25:30 -06:00
bset.c bcache: allocate meta data pages as compound pages 2020-07-25 07:38:19 -06:00
bset.h bcache: explicity type cast in bset_bkey_last() 2020-02-01 07:55:39 -07:00
btree.c bcache: remove embedded struct cache_sb from struct cache_set 2020-10-02 14:25:30 -06:00
btree.h bcache: remove embedded struct cache_sb from struct cache_set 2020-10-02 14:25:30 -06:00
closure.c bcache: Convert to DEFINE_SHOW_ATTRIBUTE 2020-10-02 14:25:29 -06:00
closure.h bcache: fix typo in code comments of closure_return_with_destructor() 2018-10-08 08:19:43 -06:00
debug.c bcache: only use block_bytes() on struct cache 2020-10-02 14:25:30 -06:00
debug.h bcache: add identifier names to arguments of function definitions 2018-08-11 15:46:41 -06:00
extents.c bcache: remove embedded struct cache_sb from struct cache_set 2020-10-02 14:25:30 -06:00
extents.h bcache: add identifier names to arguments of function definitions 2018-08-11 15:46:41 -06:00
features.c bcache: introduce BCH_FEATURE_INCOMPAT_LOG_LARGE_BUCKET_SIZE for large bucket 2021-01-09 09:21:03 -07:00
features.h bcache: only check feature sets when sb->version >= BCACHE_SB_VERSION_CDEV_WITH_FEATURES 2021-01-28 07:35:07 -07:00
io.c bcache: remove embedded struct cache_sb from struct cache_set 2020-10-02 14:25:30 -06:00
journal.c bcache: remove embedded struct cache_sb from struct cache_set 2020-10-02 14:25:30 -06:00
journal.h Revert "bcache: fix fifo index swapping condition in journal_pin_cmp()" 2019-11-18 08:35:47 -07:00
movinggc.c bcache: remove for_each_cache() 2020-10-02 14:25:29 -06:00
request.c block: switch partition lookup to use struct block_device 2020-12-01 14:53:40 -07:00
request.h block: move ->make_request_fn to struct block_device_operations 2020-07-01 07:27:24 -06:00
stats.c bcache: fix memory corruption in bch_cache_accounting_clear() 2020-02-01 07:55:39 -07:00
stats.h bcache: add identifier names to arguments of function definitions 2018-08-11 15:46:41 -06:00
super.c bcache: set bcache device into read-only mode for BCH_FEATURE_INCOMPAT_OBSO_LARGE_BUCKET 2021-01-09 09:21:03 -07:00
sysfs.c md/bcache: convert comma to semicolon 2020-12-23 09:25:15 -07:00
sysfs.h bcache: add sysfs_strtoul_bool() for setting bit-field variables 2019-02-09 07:18:32 -07:00
trace.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
util.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
util.h bcache: Revert "bcache: fix high CPU occupancy during journal" 2019-06-28 07:39:17 -06:00
writeback.c bcache: fix race between setting bdev state to none and new write request direct to backing 2020-12-07 13:25:16 -07:00
writeback.h bcache: fix overflow in offset_to_stripe() 2020-07-25 07:38:20 -06:00