]> Pileus Git - ~andy/linux/commit
rbd: revalidate only for mapping size changes
authorAlex Elder <elder@inktank.com>
Mon, 6 May 2013 12:40:30 +0000 (07:40 -0500)
committerAlex Elder <elder@inktank.com>
Wed, 8 May 2013 12:40:48 +0000 (07:40 -0500)
commite627db085e0dab7744b68f3c927be6ed6df2f7f9
treea84b1ae0d0217ebb66ebb1b6d7ca29b7909df8e1
parent49ece554288caf1a8ea9e546ab1ff5bc4b175456
rbd: revalidate only for mapping size changes

This commit:
    d98df63e rbd: revalidate_disk upon rbd resize
instituted a call to revalidate_disk() to notify interested parties
that a mapped image has changed size.  This works well, as long as
the the rbd device doesn't map a snapshot.

A snapshot will never change size.  However, the base image the
snapshot is associated with can, and it can do so while the snapshot
is mapped.

The problem is that the test for the size is looking at the size of
the base image, not the size of the mapped snapshot.  This patch
corrects that.

Update the warning message shown in the event of error, and move
it into the callers.

This resolves:
    http://tracker.ceph.com/issues/4911

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
drivers/block/rbd.c