From: Ilya Dryomov Date: Tue, 13 May 2014 07:19:27 +0000 (+0400) Subject: rbd: make sure we have latest osdmap on 'rbd map' X-Git-Tag: omap-for-v3.16/fixes-against-rc1~24^2~8 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30ba1f020221991cf239d905c82984958f29bdfe;p=pandora-kernel.git rbd: make sure we have latest osdmap on 'rbd map' Given an existing idle mapping (img1), mapping an image (img2) in a newly created pool (pool2) fails: $ ceph osd pool create pool1 8 8 $ rbd create --size 1000 pool1/img1 $ sudo rbd map pool1/img1 $ ceph osd pool create pool2 8 8 $ rbd create --size 1000 pool2/img2 $ sudo rbd map pool2/img2 rbd: sysfs write failed rbd: map failed: (2) No such file or directory This is because client instances are shared by default and we don't request an osdmap update when bumping a ref on an existing client. The fix is to use the mon_get_version request to see if the osdmap we have is the latest, and block until the requested update is received if it's not. Fixes: http://tracker.ceph.com/issues/8184 Signed-off-by: Ilya Dryomov Reviewed-by: Sage Weil --- Reading git-diff-tree failed