qemu-e2k/block
Markus Armbruster 4480e0f924 vvfat: Do not clobber the user's geometry
vvfat creates a virtual VFAT filesystem with a certain logical
geometry that depends on its options.  It sets the "geometry hint" to
this geometry.  It is the only block driver to do this.

The geometry hint is about about *physical* geometry, and used only by
certain hard disk device models.

vvfat's hint is normally invisible for device models, because
bdrv_open() puts a raw format on top of vvfat's fat protocol.  That
raw format is where drive_init() puts the user's geometry (if any),
and where the device model gets it from.

Nobody complained, because the default physical geometry is the same
as vvfat's logical geometry:

    opts        LCHS        def. PCHS
                1024,16,63  same
    :32:        1024,16,63  same
    :16:        1024,16,63  same
    :12:          64,16,63  same

Except when you specify :floppy:

    opts        LCHS        def. PCHS
       :floppy:   80, 2,36  5,16,63
    :32:floppy:   80, 2,36  5,16,63
    :16:floppy:   80, 2,36  5,16,63
    :12:floppy:   80, 2,18  2,16,63

Silly thing to do for use with a hard disk.

However, the "raw" format can be suppressed by adding an
redundant-looking "format=vvfat" to "file=fat:FOO".  Then, vvfat's
hint clobbers the user's geometry, i.e. -drive options cyls, heads,
secs get silently ignored.  Don't do that.

No change without format=vvfat.  With it, the user's hard disk
geometry (-drive options cyls, heads, secs) is now obeyed, and the
default hard disk geometry with :floppy: now matches the one without
format=vvfat.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2012-07-17 16:48:30 +02:00
..
blkdebug.c blkdebug: optionally tie errors to a specific sector 2012-07-09 15:53:02 +02:00
blkverify.c
bochs.c
cloop.c
cow.c
curl.c allow qemu_iovec_from_buffer() to specify offset from which to start copying 2012-06-11 23:12:11 +04:00
dmg.c
iscsi.c Merge remote-tracking branch 'mjt/mjt-iov2' into staging 2012-07-09 12:35:06 -05:00
Makefile.objs build: move block/ objects to nested Makefile.objs 2012-06-07 09:21:13 +02:00
nbd.c cleanup qemu_co_sendv(), qemu_co_recvv() and friends 2012-06-11 23:12:11 +04:00
parallels.c
qcow2-cache.c qcow2: always operate caches in writeback mode 2012-06-15 14:03:43 +02:00
qcow2-cluster.c qcow2: Fix avail_sectors in cluster allocation code 2012-06-15 14:03:43 +02:00
qcow2-refcount.c qcow2: preserve free_byte_offset when qcow2_alloc_bytes() fails 2012-07-09 15:53:01 +02:00
qcow2-snapshot.c qcow2: fix #ifdef'd qcow2_check_refcounts() callers 2012-07-09 15:53:01 +02:00
qcow2.c Merge remote-tracking branch 'mjt/mjt-iov2' into staging 2012-07-09 12:35:06 -05:00
qcow2.h qcow2: always operate caches in writeback mode 2012-06-15 14:03:43 +02:00
qcow.c change qemu_iovec_to_buf() to match other to,from_buf functions 2012-06-11 23:12:11 +04:00
qed-check.c qemu-img check: Print fixed clusters and recheck 2012-06-15 14:03:42 +02:00
qed-cluster.c
qed-gencb.c
qed-l2-cache.c
qed-table.c
qed.c Merge remote-tracking branch 'mjt/mjt-iov2' into staging 2012-07-09 12:35:06 -05:00
qed.h
raw-posix-aio.h
raw-posix.c raw-posix: Fix build without is_allocated support 2012-06-24 01:04:45 +02:00
raw-win32.c
raw.c raw: hook into blkdebug 2012-07-09 15:53:02 +02:00
rbd.c Merge remote-tracking branch 'mjt/mjt-iov2' into staging 2012-07-09 12:35:06 -05:00
sheepdog.c sheepdog: do not blindly memset all read buffers 2012-07-17 16:48:29 +02:00
stream.c stream: move rate limiting to a separate header file 2012-06-15 14:03:42 +02:00
vdi.c qemu-img check -r for repairing images 2012-06-15 14:03:42 +02:00
vmdk.c
vpc.c
vvfat.c vvfat: Do not clobber the user's geometry 2012-07-17 16:48:30 +02:00