]> git.ipfire.org Git - thirdparty/util-linux.git/commit
fdisk: fix io_size usage in new API
authorKarel Zak <kzak@redhat.com>
Wed, 6 Jun 2012 09:03:23 +0000 (11:03 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 6 Jun 2012 09:03:23 +0000 (11:03 +0200)
commitdf68ccd8b8354a84e57469a498997ab50aaa5dd3
tree695305893795902ada81b9edb6e432695725ee9d
parentdde32b6ccd21c0fcdd3bc4e0401364b7fa26e535
fdisk: fix io_size usage in new API

properly implemented fdisk_dev_has_topology() requires optimal
I/O size to detect that the device provides topology.

Unfortunately, currently used cxt->io_size maybe overwritten in
__discover_topology() to min_io_size.

This patch introduces cxt->optimal_io_size and keeps it independent on
cxt->io_size. The cxt->io_size is I/O size used by fdisk for alignment
calculation.

Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk/fdisk.h
fdisk/utils.c