From: Luis Chamberlain <mcgrof@kernel.org>
To: kdevops@lists.linux.dev
Cc: Luis Chamberlain <mcgrof@kernel.org>
Subject: [PATCH 3/5] guestfs_q35: use libvirt_extra_storage_nvme_logical_block_size
Date: Wed, 6 Mar 2024 16:14:24 -0800 [thread overview]
Message-ID: <20240307001426.565390-4-mcgrof@kernel.org> (raw)
In-Reply-To: <20240307001426.565390-1-mcgrof@kernel.org>
The libvirt_extra_storage_nvme_logical_block_size was not being used, so
fix that. Also clarify on the defaults why only one variable is set.
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
playbooks/roles/gen_nodes/defaults/main.yml | 2 ++
playbooks/roles/gen_nodes/templates/guestfs_q35.j2.xml | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/playbooks/roles/gen_nodes/defaults/main.yml b/playbooks/roles/gen_nodes/defaults/main.yml
index 0e41e0ad..5f46a7da 100644
--- a/playbooks/roles/gen_nodes/defaults/main.yml
+++ b/playbooks/roles/gen_nodes/defaults/main.yml
@@ -63,6 +63,8 @@ libvirt_extra_storage_drive_virtio: False
libvirt_extra_storage_drive_ide: False
libvirt_extra_storage_aio_mode: "native"
libvirt_extra_storage_aio_cache_mode: "none"
+# Note that NVMe on qemu does not allow the physical block size
+# to differ from the logical block size so we just have one variable.
libvirt_extra_storage_nvme_logical_block_size: 512
libvirt_extra_storage_virtio_logical_block_size: 512
libvirt_extra_storage_virtio_physical_block_size: 512
diff --git a/playbooks/roles/gen_nodes/templates/guestfs_q35.j2.xml b/playbooks/roles/gen_nodes/templates/guestfs_q35.j2.xml
index ee340aca..266ced32 100644
--- a/playbooks/roles/gen_nodes/templates/guestfs_q35.j2.xml
+++ b/playbooks/roles/gen_nodes/templates/guestfs_q35.j2.xml
@@ -204,7 +204,7 @@
<qemu:arg value='-device'/>
<qemu:arg value='nvme,id=nvme{{ n }},serial=kdevops{{ n }},bus=pcie-port-for-nvme-{{ n }},addr=0x0'/>
<qemu:arg value='-device'/>
- <qemu:arg value='nvme-ns,drive=drv{{ n }},bus=nvme{{ n }},nsid=1,logical_block_size=512,physical_block_size=512'/>
+ <qemu:arg value='nvme-ns,drive=drv{{ n }},bus=nvme{{ n }},nsid=1,logical_block_size={{ libvirt_extra_storage_nvme_logical_block_size }},physical_block_size={{ libvirt_extra_storage_nvme_logical_block_size }}'/>
{% endfor %}
{% endif %}
{% if bootlinux_9p %}
--
2.43.0
next prev parent reply other threads:[~2024-03-07 0:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-07 0:14 [PATCH 0/5] guestfs: start moving guest data to macros Luis Chamberlain
2024-03-07 0:14 ` [PATCH 1/5] bringup_guestfs.sh: use bash as the default shell Luis Chamberlain
2024-03-07 0:14 ` [PATCH 2/5] guestfs_q35: use hex for pci addr Luis Chamberlain
2024-03-07 0:14 ` Luis Chamberlain [this message]
2024-03-07 0:14 ` [PATCH 4/5] gen_nodes: move drive generation for guestfs to macros Luis Chamberlain
2024-03-07 0:14 ` [PATCH 5/5] guestfs: add large IO support Luis Chamberlain
2024-03-07 18:43 ` [PATCH 0/5] guestfs: start moving guest data to macros Luis Chamberlain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240307001426.565390-4-mcgrof@kernel.org \
--to=mcgrof@kernel.org \
--cc=kdevops@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.