rbd: revalidate_disk upon rbd resize
authorLaurent Barbe <laurent@ksperis.com>
Wed, 10 Apr 2013 22:47:46 +0000 (17:47 -0500)
committerSage Weil <sage@inktank.com>
Thu, 2 May 2013 04:19:12 +0000 (21:19 -0700)
If rbd disk is open and rbd resize is done, new size is not
visible by filesystem.  Like is done in virtio-blk and dm driver,
revalidate_disk() permits to update the bd_inode size.

Signed-off-by: Laurent Barbe <laurent@ksperis.com>
Reviewed-by: Alex Elder <elder@inktank.com>
drivers/block/rbd.c

index 8a7216d784d7ed6cfb80d3d059b11a302f1f70df..b2819deced6b43c36b49f08d39b9cf8ce58a095f 100644 (file)
@@ -2781,6 +2781,7 @@ static int rbd_dev_refresh(struct rbd_device *rbd_dev, u64 *hver)
        else
                ret = rbd_dev_v2_refresh(rbd_dev, hver);
        mutex_unlock(&ctl_mutex);
+       revalidate_disk(rbd_dev->disk);
 
        return ret;
 }