diff options
author | Mike Snitzer <snitzer@redhat.com> | 2018-08-02 16:08:52 -0400 |
---|---|---|
committer | Mike Snitzer <snitzer@redhat.com> | 2018-08-07 14:30:30 -0400 |
commit | fd2fa95416188a767a63979296fa3e169a9ef5ec (patch) | |
tree | 18fcd992ce788f48fd53964edaf3fa0d05ebb4c8 /mm/mlock.c | |
parent | 75294442d896f2767be34f75aca7cc2b0d01301f (diff) | |
download | linux-fd2fa95416188a767a63979296fa3e169a9ef5ec.tar.gz linux-fd2fa95416188a767a63979296fa3e169a9ef5ec.tar.bz2 linux-fd2fa95416188a767a63979296fa3e169a9ef5ec.zip |
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>
Diffstat (limited to 'mm/mlock.c')
0 files changed, 0 insertions, 0 deletions