diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-06-26 08:47:46 -1000 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-06-26 08:47:46 -1000 |
commit | 78750f1908869c3bfcbf2a1f1f00f078f2948271 (patch) | |
tree | 8d5b2444f8966e696a8da772eca465995c111204 /drivers | |
parent | 1e876e3b1a9df25bb04682b0d48aaa7e8ae1fc82 (diff) | |
parent | 1617e40c1eeeeb857ff4b66acee20ed2acc1b5e7 (diff) | |
download | linux-78750f1908869c3bfcbf2a1f1f00f078f2948271.tar.bz2 |
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')
-rw-r--r-- | drivers/block/rbd.c | 8 |
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) down_write(&rbd_dev->header_rwsem); + ret = rbd_dev_v2_image_size(rbd_dev); + if (ret) + goto out; + if (first_time) { ret = rbd_dev_v2_header_onetime(rbd_dev); if (ret) @@ -4276,10 +4280,6 @@ static int rbd_dev_v2_header_info(struct rbd_device *rbd_dev) "is EXPERIMENTAL!"); } - ret = rbd_dev_v2_image_size(rbd_dev); - if (ret) - goto out; - if (rbd_dev->spec->snap_id == CEPH_NOSNAP) if (rbd_dev->mapping.size != rbd_dev->header.image_size) rbd_dev->mapping.size = rbd_dev->header.image_size; |