summaryrefslogtreecommitdiffstats
path: root/drivers/block/rbd.c
diff options
context:
space:
mode:
authorAlex Elder2013-04-26 16:43:47 +0200
committerSage Weil2013-05-02 06:19:39 +0200
commit500d0c0fbb85b59e5e75fc83ff701b7d8aa285f9 (patch)
tree0c8c0f955bc6fb00606e4eeaf001077e14c33465 /drivers/block/rbd.c
parentrbd: make rbd spec names pointer to const (diff)
downloadkernel-qcow2-linux-500d0c0fbb85b59e5e75fc83ff701b7d8aa285f9.tar.gz
kernel-qcow2-linux-500d0c0fbb85b59e5e75fc83ff701b7d8aa285f9.tar.xz
kernel-qcow2-linux-500d0c0fbb85b59e5e75fc83ff701b7d8aa285f9.zip
rbd: move stripe_unit and stripe_count into header
This commit added fetching if fancy striping parameters: 09186ddb rbd: get and check striping parameters They are almost unused, but the two fields storing the information really belonged in the rbd_image_header structure. This patch moves them there. Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'drivers/block/rbd.c')
-rw-r--r--drivers/block/rbd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index e728e11096b4..8e56fbd1fcf7 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -108,6 +108,9 @@ struct rbd_image_header {
char *snap_names;
u64 *snap_sizes;
+ u64 stripe_unit;
+ u64 stripe_count;
+
u64 obj_version;
};
@@ -316,9 +319,6 @@ struct rbd_device {
u64 parent_overlap;
struct rbd_device *parent;
- u64 stripe_unit;
- u64 stripe_count;
-
/* protects updating the header */
struct rw_semaphore header_rwsem;
@@ -3695,8 +3695,8 @@ static int rbd_dev_v2_striping_info(struct rbd_device *rbd_dev)
"(got %llu want 1)", stripe_count);
return -EINVAL;
}
- rbd_dev->stripe_unit = stripe_unit;
- rbd_dev->stripe_count = stripe_count;
+ rbd_dev->header.stripe_unit = stripe_unit;
+ rbd_dev->header.stripe_count = stripe_count;
return 0;
}