mrc0mmand / rpms / lvm2

Forked from rpms/lvm2 2 years ago
Clone

Blame SOURCES/lvm2-2_03_06-tests-large-physical-sector-size.patch

26e710
 test/shell/large-physical-sector-size.sh | 43 ++++++++++++++++++++++++++++++++
26e710
 1 file changed, 43 insertions(+)
26e710
 create mode 100644 test/shell/large-physical-sector-size.sh
26e710
26e710
diff --git a/test/shell/large-physical-sector-size.sh b/test/shell/large-physical-sector-size.sh
26e710
new file mode 100644
26e710
index 0000000..891f409
26e710
--- /dev/null
26e710
+++ b/test/shell/large-physical-sector-size.sh
26e710
@@ -0,0 +1,43 @@
26e710
+#!/usr/bin/env bash
26e710
+
26e710
+# Copyright (C) 2019 Red Hat, Inc. All rights reserved.
26e710
+#
26e710
+# This copyrighted material is made available to anyone wishing to use,
26e710
+# modify, copy, or redistribute it subject to the terms and conditions
26e710
+# of the GNU General Public License v.2.
26e710
+#
26e710
+# You should have received a copy of the GNU General Public License
26e710
+# along with this program; if not, write to the Free Software Foundation,
26e710
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
26e710
+
26e710
+SKIP_WITH_LVMPOLLD=1
26e710
+
26e710
+. lib/inittest
26e710
+
26e710
+LOGICAL_BLOCK_SIZE=4096
26e710
+
26e710
+# PHYSICAL_BLOCK_SIZE is set with physblk_exp which
26e710
+# shifts the logical block size value.
26e710
+
26e710
+# 4096 << 9 = 2MB physical block size
26e710
+PHYSICAL_BLOCK_SHIFT=9
26e710
+
26e710
+aux prepare_scsi_debug_dev 256 sector_size=$LOGICAL_BLOCK_SIZE physblk_exp=$PHYSICAL_BLOCK_SHIFT
26e710
+
26e710
+check sysfs "$(< SCSI_DEBUG_DEV)" queue/logical_block_size "$LOGICAL_BLOCK_SIZE"
26e710
+
26e710
+aux prepare_pvs 1 256
26e710
+
26e710
+get_devs
26e710
+
26e710
+vgcreate $SHARED $vg "$dev1"
26e710
+
26e710
+for i in `seq 1 40`; do lvcreate -an -l1 $vg; done;
26e710
+
26e710
+lvs $vg
26e710
+
26e710
+lvremove -y $vg
26e710
+
26e710
+vgremove $vg
26e710
+
26e710
+aux cleanup_scsi_debug_dev