[PATCH] formatdomain.rst: update slice xml in "Hard drives" part

“Meina posted 1 patch 3 years ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20210422084959.853057-1-meili@redhat.com
There is a newer version of this series
docs/formatdomain.rst | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
[PATCH] formatdomain.rst: update slice xml in "Hard drives" part
Posted by “Meina 3 years ago
Update slice xml from block lun disk because it doesn't support storage slice

Signed-off-by: Meina Li <meili@redhat.com>
---
 docs/formatdomain.rst | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
index 1b9b221611..44aee9fa77 100644
--- a/docs/formatdomain.rst
+++ b/docs/formatdomain.rst
@@ -2381,9 +2381,6 @@ paravirtualized driver is specified via the ``disk`` element.
      <disk type='block' device='lun'>
        <driver name='qemu' type='raw'/>
        <source dev='/dev/sda'>
-         <slices>
-           <slice type='storage' offset='12345' size='123'/>
-         </slices>
          <reservations managed='no'>
            <source type='unix' path='/path/to/qemu-pr-helper' mode='client'/>
          </reservations>
@@ -2393,10 +2390,14 @@ paravirtualized driver is specified via the ``disk`` element.
      </disk>
      <disk type='block' device='disk'>
        <driver name='qemu' type='raw'/>
-       <source dev='/dev/sda'/>
+       <source dev='/dev/sda'>
+         <slices>
+           <slice type='storage' offset='12345' size='123'/>
+         </slices>
+       </source>
        <geometry cyls='16383' heads='16' secs='63' trans='lba'/>
        <blockio logical_block_size='512' physical_block_size='4096'/>
-       <target dev='hdj' bus='ide'/>
+       <target dev='sda' bus='scsi'/>
      </disk>
      <disk type='volume' device='disk'>
        <driver name='qemu' type='raw'/>
-- 
2.27.0

Re: [PATCH] formatdomain.rst: update slice xml in "Hard drives" part
Posted by Han Han 3 years ago
On Thu, Apr 22, 2021 at 4:50 PM “Meina <meili@redhat.com> wrote:

> Update slice xml from block lun disk because it doesn't support storage
> slice
>
> Signed-off-by: Meina Li <meili@redhat.com>
> ---
>  docs/formatdomain.rst | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
> index 1b9b221611..44aee9fa77 100644
> --- a/docs/formatdomain.rst
> +++ b/docs/formatdomain.rst
> @@ -2381,9 +2381,6 @@ paravirtualized driver is specified via the ``disk``
> element.
>       <disk type='block' device='lun'>
>         <driver name='qemu' type='raw'/>
>         <source dev='/dev/sda'>
> -         <slices>
> -           <slice type='storage' offset='12345' size='123'/>
> -         </slices>
>           <reservations managed='no'>
>             <source type='unix' path='/path/to/qemu-pr-helper'
> mode='client'/>
>           </reservations>
> @@ -2393,10 +2390,14 @@ paravirtualized driver is specified via the
> ``disk`` element.
>       </disk>
>       <disk type='block' device='disk'>
>         <driver name='qemu' type='raw'/>
> -       <source dev='/dev/sda'/>
> +       <source dev='/dev/sda'>
> +         <slices>
> +           <slice type='storage' offset='12345' size='123'/>
> +         </slices>
> +       </source>
>         <geometry cyls='16383' heads='16' secs='63' trans='lba'/>

        <blockio logical_block_size='512' physical_block_size='4096'/>
> -       <target dev='hdj' bus='ide'/>
>
Unluckily, the disk->geometry.trans is only supported on IDE disk:
https://github.com/libvirt/libvirt/blob/master/src/qemu/qemu_validate.c#L2461
Please don't update the disk target.

> +       <target dev='sda' bus='scsi'/>
>       </disk>
>       <disk type='volume' device='disk'>
>         <driver name='qemu' type='raw'/>
> --
> 2.27.0
>
>
Re: [PATCH] formatdomain.rst: update slice xml in "Hard drives" part
Posted by Han Han 3 years ago
On Thu, Apr 22, 2021 at 4:50 PM “Meina <meili@redhat.com> wrote:

> Update slice xml from block lun disk because it doesn't support storage
> slice
>
> Better if mentioning the bug or the commit of forbidding slice element
with lun device
https://bugzilla.redhat.com/show_bug.cgi?id=1820040
5d72c3ce28 qemu: domain: Forbid slice/encryption/copy_on_read with disk
type='lun'


> Signed-off-by: Meina Li <meili@redhat.com>
> ---
>  docs/formatdomain.rst | 11 ++++++-----
>  1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
> index 1b9b221611..44aee9fa77 100644
> --- a/docs/formatdomain.rst
> +++ b/docs/formatdomain.rst
> @@ -2381,9 +2381,6 @@ paravirtualized driver is specified via the ``disk``
> element.
>       <disk type='block' device='lun'>
>         <driver name='qemu' type='raw'/>
>         <source dev='/dev/sda'>
> -         <slices>
> -           <slice type='storage' offset='12345' size='123'/>
> -         </slices>
>           <reservations managed='no'>
>             <source type='unix' path='/path/to/qemu-pr-helper'
> mode='client'/>
>           </reservations>
> @@ -2393,10 +2390,14 @@ paravirtualized driver is specified via the
> ``disk`` element.
>       </disk>
>       <disk type='block' device='disk'>
>         <driver name='qemu' type='raw'/>
> -       <source dev='/dev/sda'/>
> +       <source dev='/dev/sda'>
> +         <slices>
> +           <slice type='storage' offset='12345' size='123'/>
> +         </slices>
> +       </source>
>         <geometry cyls='16383' heads='16' secs='63' trans='lba'/>
>         <blockio logical_block_size='512' physical_block_size='4096'/>
> -       <target dev='hdj' bus='ide'/>
> +       <target dev='sda' bus='scsi'/>
>       </disk>
>       <disk type='volume' device='disk'>
>         <driver name='qemu' type='raw'/>
> --
> 2.27.0
>
>