Bug #4833
closedkrbd: fix a bug in resizing a mapping
0%
Description
When a snapshot context update occurs, rbd_update_mapping_size() is
called to set the capacity of the disk to record the updated
size of the image in case it has changed.
There's a bug though. The mapping size is in units of bytes. The
code that updates the mapping size field is assigning a value that
has been scaled down to sectors.
Fix that. Also, check to see if the size has actually changed, and
don't bother updating things (specifically, calling set_capacity())
if it has not.
Signed-off-by: Alex Elder <elder@inktank.com>
Updated by Alex Elder almost 11 years ago
- Status changed from In Progress to Fix Under Review
The following has been posted for review:
[PATCH] rbd: fix a bug in resizing a mapping
It was posted together with a series of 4 and a series of 6,
and they are all available in the "review/wip-rbd-cleanup-3"
branch of the ceph-client git respository.
Updated by Alex Elder almost 11 years ago
- Status changed from Fix Under Review to Resolved
I forgot to close this.
This has been committed to the "testing" branch:
e28626a rbd: fix a bug in resizing a mapping