]> Pileus Git - ~andy/linux/commit
rbd: don't revalidate so much
authorAlex Elder <elder@inktank.com>
Tue, 30 Apr 2013 05:44:32 +0000 (00:44 -0500)
committerSage Weil <sage@inktank.com>
Thu, 2 May 2013 04:20:11 +0000 (21:20 -0700)
commita3fbe5d447bf1f63efa7f4d8c222002ef136cf4b
tree1348d05858c4319f9b8fe9b5d73e983c13dcf52f
parent96882f55c40dcb4cd80b81a4374fdd297109ec98
rbd: don't revalidate so much

Whenever a header object event causes a mapped rbd image to refresh
its header information, revalidate_disk() is being called.  This was
done in rbd_dev_refresh() outside the control mutex in order to
avoid a lock inversion.  Although a an event like this *might*
indicate the image has changed size, most of the time it does not.

Record the image size before and after the refresh, and only
call revalidate_disk() if it changes.

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

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