]> git.baikalelectronics.ru Git - kernel.git/commit
virtio-blk: Call revalidate_disk() upon online disk resize
authorVivek Goyal <vgoyal@redhat.com>
Thu, 29 Mar 2012 08:09:44 +0000 (10:09 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 29 Mar 2012 08:09:44 +0000 (10:09 +0200)
commitf1401f19b1ac1228a60932acecfdc6fd18b3abad
tree2b13f119efc6984c70b7e3570c8cffde0c1f53c7
parent952f7783ee67628d8f4a55f23be90173727e20fb
virtio-blk: Call revalidate_disk() upon online disk resize

If a virtio disk is open in guest and a disk resize operation is done,
(virsh blockresize), new size is not visible to tools like "fdisk -l".
This seems to be happening as we update only part->nr_sects and not
bdev->bd_inode size.

Call revalidate_disk() which should take care of it. I tested growing disk
size of already open disk and it works for me.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/virtio_blk.c