[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v5 10/12] fdc: rework pick_geometry
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v5 10/12] fdc: rework pick_geometry |
Date: |
Mon, 25 Jan 2016 10:48:46 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 |
On 01/22/2016 01:59 PM, John Snow wrote:
>
>
> On 01/22/2016 03:51 PM, John Snow wrote:
>> This one is the crazy one.
>>
>> fd_revalidate currently uses pick_geometry to tell if the diskette
>> geometry has changed upon an eject/insert event, but it won't allow us
>> to insert a 1.44MB diskette into a 2.88MB drive. This is inflexible.
>>
>> The new algorithm applies a new heuristic to guessing disk geometries
>> that allows us to switch diskette types as long as the physical size
>> matches before falling back to the old heuristic.
>>
>> The old one is roughly:
>> - If the size (sectors) and type matches, choose it.
>> - Fall back to the first geometry that matched our type.
>>
>> The new one is:
>> - If the size (sectors) and type matches, choose it.
>> - If the size (sectors) and physical size match, choose it.
>> - If the size (sectors) matches at all, choose it begrudgingly.
>> - Fall back to the first geometry that matched our type.
>>
>
> Goofed and didn't update commit. Will change on PULL to omit the third
> line if the patch is otherwise OK.
Yep, that's the only thing I noticed.
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v5 01/12] fdc: move pick_geometry, (continued)
- [Qemu-devel] [PATCH v5 01/12] fdc: move pick_geometry, John Snow, 2016/01/22
- [Qemu-devel] [PATCH v5 05/12] fdc: Throw an assertion on misconfigured fd_formats table, John Snow, 2016/01/22
- [Qemu-devel] [PATCH v5 03/12] fdc: add drive type qapi enum, John Snow, 2016/01/22
- [Qemu-devel] [PATCH v5 07/12] fdc: Add fallback option, John Snow, 2016/01/22
- [Qemu-devel] [PATCH v5 08/12] fdc: add drive type option, John Snow, 2016/01/22
- [Qemu-devel] [PATCH v5 11/12] qtest/fdc: Support for 2.88MB drives, John Snow, 2016/01/22
- [Qemu-devel] [PATCH v5 04/12] fdc: add disk field, John Snow, 2016/01/22
- [Qemu-devel] [PATCH v5 06/12] fdc: add pick_drive, John Snow, 2016/01/22
- [Qemu-devel] [PATCH v5 10/12] fdc: rework pick_geometry, John Snow, 2016/01/22
- [Qemu-devel] [PATCH v5 09/12] fdc: add physical disk sizes, John Snow, 2016/01/22
- [Qemu-devel] [PATCH v5 12/12] fdc: change auto fallback drive for ISA FDC to 288, John Snow, 2016/01/22