]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libfdisk: ignore misaligned optimal I/O size
authorKarel Zak <kzak@redhat.com>
Thu, 18 Jun 2015 09:55:29 +0000 (11:55 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 18 Jun 2015 09:55:29 +0000 (11:55 +0200)
commitacb7651f8897ae73d0f45dd75bc87630001c61b9
tree656e32f6363e93b66fc99b4d6c76a8921d525e71
parent7f5769182f521c13b27f46c1f0e2a06f328c03f7
libfdisk: ignore misaligned optimal I/O size

For example:

 # modprobe scsi_debug dev_size_mb=1000 opt_blks=65535 physblk_exp=3

creates a disk with:

 Sector size (logical/physical): 512 bytes / 4096 bytes
 I/O size (minimum/optimal): 4096 bytes / 33553920 bytes

where 33553920 % 4096 != 0, it means that use Optimal I/O size to
align partition results that partition is not aligned to physical
sector boundary.

Reported-by: Tom Yan <tom.ty89@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk/src/alignment.c