summaryrefslogtreecommitdiffstats
path: root/qa/rbd/krbd_discard_granularity.t
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
commit19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch)
tree42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /qa/rbd/krbd_discard_granularity.t
parentInitial commit. (diff)
downloadceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.tar.xz
ceph-19fcec84d8d7d21e796c7624e521b60d28ee21ed.zip
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'qa/rbd/krbd_discard_granularity.t')
-rw-r--r--qa/rbd/krbd_discard_granularity.t40
1 files changed, 40 insertions, 0 deletions
diff --git a/qa/rbd/krbd_discard_granularity.t b/qa/rbd/krbd_discard_granularity.t
new file mode 100644
index 000000000..844643bae
--- /dev/null
+++ b/qa/rbd/krbd_discard_granularity.t
@@ -0,0 +1,40 @@
+
+ $ rbd create --size 20M img
+
+ $ DEV=$(sudo rbd map img)
+ $ blockdev --getiomin $DEV
+ 65536
+ $ blockdev --getioopt $DEV
+ 65536
+ $ cat /sys/block/${DEV#/dev/}/queue/discard_granularity
+ 65536
+ $ sudo rbd unmap $DEV
+
+ $ DEV=$(sudo rbd map -o alloc_size=512 img)
+ $ blockdev --getiomin $DEV
+ 512
+ $ blockdev --getioopt $DEV
+ 512
+ $ cat /sys/block/${DEV#/dev/}/queue/discard_granularity
+ 512
+ $ sudo rbd unmap $DEV
+
+ $ DEV=$(sudo rbd map -o alloc_size=4194304 img)
+ $ blockdev --getiomin $DEV
+ 4194304
+ $ blockdev --getioopt $DEV
+ 4194304
+ $ cat /sys/block/${DEV#/dev/}/queue/discard_granularity
+ 4194304
+ $ sudo rbd unmap $DEV
+
+ $ DEV=$(sudo rbd map -o alloc_size=8388608 img)
+ $ blockdev --getiomin $DEV
+ 4194304
+ $ blockdev --getioopt $DEV
+ 4194304
+ $ cat /sys/block/${DEV#/dev/}/queue/discard_granularity
+ 4194304
+ $ sudo rbd unmap $DEV
+
+ $ rbd rm --no-progress img