aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/rbd.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-06-26 14:47:46 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-06-26 14:47:46 -0400
commit78750f1908869c3bfcbf2a1f1f00f078f2948271 (patch)
tree8d5b2444f8966e696a8da772eca465995c111204 /drivers/block/rbd.c
parent1e876e3b1a9df25bb04682b0d48aaa7e8ae1fc82 (diff)
parent1617e40c1eeeeb857ff4b66acee20ed2acc1b5e7 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
Pull Ceph fix from Sage Weil: "This fixes another problem with using v2 images on 3.10 due to the order in which fields are read from the image header. Hopefully this is the last one" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: rbd: fetch object order before using it
Diffstat (limited to 'drivers/block/rbd.c')
-rw-r--r--drivers/block/rbd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 49394e3f31bc..247bf3099731 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -4243,6 +4243,10 @@ static int rbd_dev_v2_header_info(struct rbd_device *rbd_dev)
4243 4243
4244 down_write(&rbd_dev->header_rwsem); 4244 down_write(&rbd_dev->header_rwsem);
4245 4245
4246 ret = rbd_dev_v2_image_size(rbd_dev);
4247 if (ret)
4248 goto out;
4249
4246 if (first_time) { 4250 if (first_time) {
4247 ret = rbd_dev_v2_header_onetime(rbd_dev); 4251 ret = rbd_dev_v2_header_onetime(rbd_dev);
4248 if (ret) 4252 if (ret)
@@ -4276,10 +4280,6 @@ static int rbd_dev_v2_header_info(struct rbd_device *rbd_dev)
4276 "is EXPERIMENTAL!"); 4280 "is EXPERIMENTAL!");
4277 } 4281 }
4278 4282
4279 ret = rbd_dev_v2_image_size(rbd_dev);
4280 if (ret)
4281 goto out;
4282
4283 if (rbd_dev->spec->snap_id == CEPH_NOSNAP) 4283 if (rbd_dev->spec->snap_id == CEPH_NOSNAP)
4284 if (rbd_dev->mapping.size != rbd_dev->header.image_size) 4284 if (rbd_dev->mapping.size != rbd_dev->header.image_size)
4285 rbd_dev->mapping.size = rbd_dev->header.image_size; 4285 rbd_dev->mapping.size = rbd_dev->header.image_size;