Bug 1196531

Summary: fail to specify the physical_block_size value(not 512) for IDE disk
Product: Red Hat Enterprise Linux 6 Reporter: Sibiao Luo <sluo>
Component: qemu-kvmAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED WORKSFORME QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.7CC: bsarathy, chayang, famz, juzhang, kwolf, michen, mkenneth, pbonzini, qzhang, rbalakri, sluo, virt-maint, xfu
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-27 02:03:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Sibiao Luo 2015-02-26 07:59:31 UTC
Description of problem:
separate this bug from bug 1134693 for ide fail to specify the physical_block_size.

Version-Release number of selected component (if applicable):
host info:
# uname -r && rpm -q qemu-kvm
2.6.32-538.el6.x86_64
qemu-kvm-0.12.1.2-2.454.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.launch a KVM guest with physical_block_size=1024 specified.
e.g:...-drive file=/home/my-data-disk1.qcow2,if=none,id=drive-data-disk1,format=qcow2,cache=none,aio=native -device ide-drive,drive=drive-data-disk1,id=data-disk1,bus=ide.0,unit=0,physical_block_size=1024

2.(qemu) info qtree
...
          type IDE
          dev: ide-drive, id "data-disk1"
            dev-prop: unit = 0
            dev-prop: drive = drive-data-disk1
            dev-prop: logical_block_size = 512
            dev-prop: physical_block_size = 1024
3.check the physical_block_size from guest.
# cat /sys/block/sda/queue/physical_block_size

Actual results:
after step 3, it fail to emulate the physical_block_size correctly.
# cat /sys/block/sda/queue/physical_block_size
512

Expected results:
the physical_block_size should be 1024 in guest.

Additional info:

Comment 1 Kevin Wolf 2015-02-26 10:38:35 UTC
Are you sure that you reproduced this with the fix for bug 1134693? For me, it
just works now.

Comment 2 Sibiao Luo 2015-02-27 02:03:27 UTC
(In reply to Kevin Wolf from comment #1)
> Are you sure that you reproduced this with the fix for bug 1134693? For me,
> it
> just works now.
It also works for me now, did not find any unusual, thanks.

# rpm -q qemu-kvm
qemu-kvm-0.12.1.2-2.454.el6.x86_64
# rpm -q --changelog qemu-kvm-0.12.1.2-2.454.el6.x86_64 | grep 1134693
- kvm-ide-Check-validity-of-logical-block-size.patch [bz#1134693]
- Resolves: bz#1134693

e.g:...-drive file=/home/my-data-disk1.qcow2,if=none,id=drive-data-disk1,format=qcow2,cache=none,aio=native -device ide-drive,drive=drive-data-disk1,id=data-disk1,bus=ide.0,unit=0,physical_block_size=1024

# cat /sys/block/sda/queue/physical_block_size
1024