mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-20 18:09:23 +03:00
tests: update for readahead
This commit is contained in:
parent
5ccf3e6f30
commit
30f4d0fcd4
@ -180,16 +180,16 @@ check lv_field $vg/$lv4 lv_read_ahead "auto"
|
||||
# figure RA value of a PV origin device
|
||||
DEVICE=$(dmsetup deps -o blkdevname "$dev1" | sed -e "s,.*:\ (\(.*\)),/dev/\1,")
|
||||
RASZ=$(( $(blockdev --getra "$DEVICE" ) / 2 ))
|
||||
SZ="$RASZ.00k"
|
||||
test "$RASZ" -ge 128 || SZ="128.00k"
|
||||
check lv_field $vg/$lv4 lv_kernel_read_ahead "$SZ" --units k
|
||||
lvcreate -L 8 -n $lv5 -i2 --stripesize 16k --readahead auto $vg
|
||||
test "$RASZ" -ge 128 || RASZ="128"
|
||||
check lv_field $vg/$lv4 lv_kernel_read_ahead "${RASZ}.00k" --units k
|
||||
lvcreate -vvvvv -L 8 -n $lv5 -i2 --stripesize 16k --readahead auto $vg
|
||||
check lv_field $vg/$lv5 lv_read_ahead "auto"
|
||||
check lv_field $vg/$lv5 lv_kernel_read_ahead "$SZ" --units k
|
||||
# For 16k stripe we set '128k' as the is the minimum size we get when creating DM device
|
||||
check lv_field $vg/$lv5 lv_kernel_read_ahead "128.00k" --units k
|
||||
lvcreate -L 8 -n $lv6 -i2 --stripesize 128k --readahead auto $vg
|
||||
check lv_field $vg/$lv6 lv_read_ahead "auto"
|
||||
test "$RASZ" -ge 512 || SZ="512.00k"
|
||||
check lv_field $vg/$lv6 lv_kernel_read_ahead "$SZ" --units k
|
||||
# For striped device we set double of strip size unrelated to underlaying dev RA size
|
||||
check lv_field $vg/$lv6 lv_kernel_read_ahead "512.00k" --units k
|
||||
lvremove -ff $vg
|
||||
|
||||
#
|
||||
|
@ -35,12 +35,11 @@ lvremove -ff $vg
|
||||
#COMM "read ahead is properly inherited from underlying PV"
|
||||
blockdev --setra 768 "$dev1"
|
||||
vgscan
|
||||
DEVICE=$(dmsetup deps -o blkdevname "$dev1" | sed -e "s,.*:\ (\(.*\)),/dev/\1,")
|
||||
RASZ=$(blockdev --getra "$DEVICE")
|
||||
SZ=$RASZ
|
||||
test "$RASZ" -ge 768 || SZ=768
|
||||
# is there something in the system changing readahead settings behind the scene...
|
||||
RASZ=$(blockdev --getra "$dev1")
|
||||
test "$RASZ" -ge 768 || RASZ=768
|
||||
lvcreate -n $lv -L4m $vg "$dev1"
|
||||
test "$(blockdev --getra "$DM_DEV_DIR/$vg/$lv")" -eq "$SZ"
|
||||
test "$(blockdev --getra "$DM_DEV_DIR/$vg/$lv")" -eq "$RASZ"
|
||||
lvremove -ff $vg
|
||||
|
||||
# Check default, active/inactive values for read_ahead / kernel_read_ahead
|
||||
|
Loading…
x
Reference in New Issue
Block a user