mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-04 09:18:36 +03:00
tests: check kernel_cache_ funcs
This commit is contained in:
parent
e04a0184cb
commit
49839b6d96
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (C) 2014 Red Hat, Inc. All rights reserved.
|
# Copyright (C) 2014-2016 Red Hat, Inc. All rights reserved.
|
||||||
#
|
#
|
||||||
# This copyrighted material is made available to anyone wishing to use,
|
# This copyrighted material is made available to anyone wishing to use,
|
||||||
# modify, copy, or redistribute it subject to the terms and conditions
|
# modify, copy, or redistribute it subject to the terms and conditions
|
||||||
@ -31,44 +31,52 @@ not lvchange --cachepolicy mq $vg/noncache
|
|||||||
not lvchange --cachesettings foo=bar $vg/noncache
|
not lvchange --cachesettings foo=bar $vg/noncache
|
||||||
|
|
||||||
lvchange --cachepolicy cleaner $vg/corigin
|
lvchange --cachepolicy cleaner $vg/corigin
|
||||||
dmsetup status | grep $vg-corigin | grep 'cleaner'
|
check lv_field $vg/corigin kernel_cache_policy "cleaner"
|
||||||
|
|
||||||
lvchange --cachepolicy mq --cachesettings migration_threshold=333 $vg/corigin
|
lvchange --cachepolicy mq --cachesettings migration_threshold=333 $vg/corigin
|
||||||
dmsetup status | grep $vg-corigin | not grep 'cleaner'
|
|
||||||
dmsetup status | grep $vg-corigin | grep 'mq'
|
# TODO once mq->smq happens we will get here some 0 for mq settings
|
||||||
dmsetup status | grep $vg-corigin | grep 'migration_threshold 333'
|
check lv_field $vg/corigin kernel_cache_policy "mq"
|
||||||
|
get lv_field $vg/corigin kernel_cache_settings | grep 'migration_threshold=333'
|
||||||
|
|
||||||
lvchange --refresh $vg/corigin
|
lvchange --refresh $vg/corigin
|
||||||
dmsetup status | grep $vg-corigin | grep 'migration_threshold 333'
|
get lv_field $vg/corigin kernel_cache_settings | grep 'migration_threshold=333'
|
||||||
lvchange -an $vg
|
lvchange -an $vg
|
||||||
lvchange -ay $vg
|
lvchange -ay $vg
|
||||||
dmsetup status | grep $vg-corigin | grep 'migration_threshold 333'
|
get lv_field $vg/corigin kernel_cache_settings | grep 'migration_threshold=333'
|
||||||
|
|
||||||
lvchange --cachesettings 'migration_threshold = 233 sequential_threshold = 13' $vg/corigin
|
lvchange --cachesettings 'migration_threshold = 233 sequential_threshold = 13' $vg/corigin
|
||||||
dmsetup status | grep $vg-corigin | grep 'migration_threshold 233'
|
get lv_field $vg/corigin kernel_cache_settings | tee out
|
||||||
dmsetup status | grep $vg-corigin | grep 'sequential_threshold 13'
|
grep 'migration_threshold=233' out
|
||||||
|
grep 'sequential_threshold=13' out
|
||||||
|
|
||||||
lvchange --cachesettings 'migration_threshold = 17' $vg/corigin
|
lvchange --cachesettings 'migration_threshold = 17' $vg/corigin
|
||||||
dmsetup status | grep $vg-corigin | grep 'migration_threshold 17'
|
get lv_field $vg/corigin kernel_cache_settings | tee out
|
||||||
dmsetup status | grep $vg-corigin | grep 'sequential_threshold 13'
|
grep 'migration_threshold=17' out
|
||||||
|
grep 'sequential_threshold=13' out
|
||||||
|
|
||||||
lvchange --cachesettings 'migration_threshold = default' $vg/corigin
|
lvchange --cachesettings 'migration_threshold = default' $vg/corigin
|
||||||
dmsetup status | grep $vg-corigin | grep 'migration_threshold 2048'
|
get lv_field $vg/corigin kernel_cache_settings | tee out
|
||||||
dmsetup status | grep $vg-corigin | grep 'sequential_threshold 13'
|
grep 'migration_threshold=2048' out
|
||||||
|
grep 'sequential_threshold=13' out
|
||||||
|
|
||||||
lvchange --cachesettings 'migration_threshold = 233 sequential_threshold = 13 random_threshold = 1' $vg/corigin
|
lvchange --cachesettings 'migration_threshold = 233 sequential_threshold = 13 random_threshold = 1' $vg/corigin
|
||||||
lvchange --cachesettings 'random_threshold = default migration_threshold = default' $vg/corigin
|
lvchange --cachesettings 'random_threshold = default migration_threshold = default' $vg/corigin
|
||||||
dmsetup status | grep $vg-corigin | grep 'migration_threshold 2048'
|
get lv_field $vg/corigin kernel_cache_settings | tee out
|
||||||
dmsetup status | grep $vg-corigin | grep 'sequential_threshold 13'
|
grep 'migration_threshold=2048' out
|
||||||
dmsetup status | grep $vg-corigin | grep 'random_threshold 4'
|
grep 'sequential_threshold=13' out
|
||||||
|
grep 'random_threshold=4' out
|
||||||
|
|
||||||
lvchange --cachesettings migration_threshold=233 --cachesettings sequential_threshold=13 --cachesettings random_threshold=1 $vg/corigin
|
lvchange --cachesettings migration_threshold=233 --cachesettings sequential_threshold=13 --cachesettings random_threshold=1 $vg/corigin
|
||||||
dmsetup status | grep $vg-corigin | grep 'migration_threshold 233 '
|
get lv_field $vg/corigin kernel_cache_settings | tee out
|
||||||
dmsetup status | grep $vg-corigin | grep 'sequential_threshold 13 '
|
grep 'migration_threshold=233' out
|
||||||
dmsetup status | grep $vg-corigin | grep 'random_threshold 1 '
|
grep 'sequential_threshold=13' out
|
||||||
|
grep 'random_threshold=1' out
|
||||||
|
|
||||||
lvchange --cachesettings random_threshold=default --cachesettings migration_threshold=default $vg/corigin
|
lvchange --cachesettings random_threshold=default --cachesettings migration_threshold=default $vg/corigin
|
||||||
dmsetup status | grep $vg-corigin | grep 'migration_threshold 2048 '
|
get lv_field $vg/corigin kernel_cache_settings | tee out
|
||||||
dmsetup status | grep $vg-corigin | grep 'sequential_threshold 13 '
|
grep 'migration_threshold=2048' out
|
||||||
dmsetup status | grep $vg-corigin | grep 'random_threshold 4 '
|
grep 'sequential_threshold=13' out
|
||||||
|
grep 'random_threshold=4' out
|
||||||
|
|
||||||
vgremove -f $vg
|
vgremove -f $vg
|
||||||
|
Loading…
Reference in New Issue
Block a user