OSDN Git Service

block: Switch bdrv_io_limits_intercept() to byte granularity
authorKevin Wolf <kwolf@redhat.com>
Thu, 16 Jan 2014 12:29:10 +0000 (13:29 +0100)
committerKevin Wolf <kwolf@redhat.com>
Fri, 24 Jan 2014 16:40:28 +0000 (17:40 +0100)
commitd5103588aa39157c8eea3bb5fb6780bbd8be21b7
tree543f7cc92a36e0157cf35e474ee4eb74b8f6156e
parent9e1cb96d9a5e434f389a4d7b7ff4dcdd71e8ec0f
block: Switch bdrv_io_limits_intercept() to byte granularity

Request sizes used to be rounded down to the next sector boundary,
allowing to bypass the I/O limit. Now all requests are accounted for
with their exact byte size.

Reported-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
block.c