WSL2-Linux-Kernel/drivers/md
Mike Snitzer fd2fa95416 dm cache metadata: save in-core policy_hint_size to on-disk superblock
policy_hint_size starts as 0 during __write_initial_superblock().  It
isn't until the policy is loaded that policy_hint_size is set in-core
(cmd->policy_hint_size).  But it never got recorded in the on-disk
superblock because __commit_transaction() didn't deal with transfering
the in-core cmd->policy_hint_size to the on-disk superblock.

The in-core cmd->policy_hint_size gets initialized by metadata_open()'s
__begin_transaction_flags() which re-reads all superblock fields.
Because the superblock's policy_hint_size was never properly stored, when
the cache was created, hints_array_available() would always return false
when re-activating a previously created cache.  This means
__load_mappings() always considered the hints invalid and never made use
of the hints (these hints served to optimize).

Another detremental side-effect of this oversight is the cache_check
utility would fail with: "invalid hint width: 0"

Cc: stable@vger.kernel.org
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
2018-08-07 14:30:30 -04:00
..
bcache docs: Fix some broken references 2018-06-15 18:10:01 -03:00
persistent-data
Kconfig dm: add writecache target 2018-06-08 11:59:51 -04:00
Makefile dm: add writecache target 2018-06-08 11:59:51 -04:00
dm-bio-prison-v1.c dm: adjust structure members to improve alignment 2018-06-08 11:53:14 -04:00
dm-bio-prison-v1.h
dm-bio-prison-v2.c dm: adjust structure members to improve alignment 2018-06-08 11:53:14 -04:00
dm-bio-prison-v2.h
dm-bio-record.h
dm-bufio.c
dm-builtin.c
dm-cache-background-tracker.c
dm-cache-background-tracker.h
dm-cache-block-types.h
dm-cache-metadata.c dm cache metadata: save in-core policy_hint_size to on-disk superblock 2018-08-07 14:30:30 -04:00
dm-cache-metadata.h
dm-cache-policy-internal.h
dm-cache-policy-smq.c treewide: Use array_size() in vzalloc() 2018-06-12 16:19:22 -07:00
dm-cache-policy.c
dm-cache-policy.h
dm-cache-target.c dm kcopyd: return void from dm_kcopyd_copy() 2018-07-31 17:33:21 -04:00
dm-core.h dm: adjust structure members to improve alignment 2018-06-08 11:53:14 -04:00
dm-crypt.c dm crypt: convert essiv from ahash to shash 2018-07-27 15:24:28 -04:00
dm-delay.c dm delay: add flush as a third class of IO 2018-07-27 15:24:19 -04:00
dm-era-target.c
dm-exception-store.c
dm-exception-store.h
dm-flakey.c
dm-integrity.c dm integrity: recalculate checksums on creation 2018-07-27 15:24:27 -04:00
dm-io.c
dm-ioctl.c dm: report which conflicting type caused error during table_load() 2018-06-08 09:50:15 -04:00
dm-kcopyd.c dm kcopyd: return void from dm_kcopyd_copy() 2018-07-31 17:33:21 -04:00
dm-linear.c
dm-log-userspace-base.c
dm-log-userspace-transfer.c
dm-log-userspace-transfer.h
dm-log-writes.c
dm-log.c
dm-mpath.c
dm-mpath.h
dm-path-selector.c
dm-path-selector.h
dm-queue-length.c
dm-raid.c dm raid: don't use 'const' in function return 2018-06-22 14:51:12 -04:00
dm-raid1.c dm kcopyd: return void from dm_kcopyd_copy() 2018-07-31 17:33:21 -04:00
dm-region-hash.c - Error path bug fix for overflow tests (Dan) 2018-06-12 18:28:00 -07:00
dm-round-robin.c
dm-rq.c
dm-rq.h
dm-service-time.c
dm-snap-persistent.c
dm-snap-transient.c
dm-snap.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
dm-stats.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
dm-stats.h
dm-stripe.c
dm-switch.c treewide: Use array_size() in vmalloc() 2018-06-12 16:19:22 -07:00
dm-sysfs.c
dm-table.c dm: prevent DAX mounts if not supported 2018-06-28 16:06:14 -04:00
dm-target.c
dm-thin-metadata.c dm thin metadata: remove needless work from __commit_transaction 2018-06-22 14:51:11 -04:00
dm-thin-metadata.h
dm-thin.c dm thin: stop no_space_timeout worker when switching to write-mode 2018-08-07 14:30:29 -04:00
dm-uevent.c
dm-uevent.h
dm-unstripe.c
dm-verity-fec.c
dm-verity-fec.h
dm-verity-target.c treewide: kvzalloc() -> kvcalloc() 2018-06-12 16:19:22 -07:00
dm-verity.h
dm-writecache.c dm writecache: report start_sector in status line 2018-07-27 15:28:58 -04:00
dm-zero.c
dm-zoned-metadata.c
dm-zoned-reclaim.c dm kcopyd: return void from dm_kcopyd_copy() 2018-07-31 17:33:21 -04:00
dm-zoned-target.c dm zoned: avoid triggering reclaim from inside dmz_map() 2018-06-22 14:51:12 -04:00
dm-zoned.h
dm.c dm: prevent DAX mounts if not supported 2018-06-28 16:06:14 -04:00
dm.h
md-bitmap.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
md-bitmap.h
md-cluster.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
md-cluster.h
md-faulty.c
md-linear.c
md-linear.h
md-multipath.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
md-multipath.h
md.c MD: cleanup resources in failure 2018-06-18 09:46:13 -07:00
md.h Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md 2018-06-09 12:01:36 -07:00
raid0.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
raid0.h
raid1-10.c
raid1.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
raid1.h
raid5-cache.c
raid5-log.h
raid5-ppl.c
raid5.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
raid5.h Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/shli/md 2018-06-09 12:01:36 -07:00
raid10.c md/raid10: fix that replacement cannot complete recovery after reassemble 2018-06-28 13:04:49 -07:00
raid10.h