From 8e370aaec13e9a061e79ec062adb18c0176e16ab Mon Sep 17 00:00:00 2001 From: Alex Elder Date: Mon, 6 May 2013 09:51:30 -0500 Subject: [PATCH] --- yaml --- r: 375597 b: refs/heads/master c: 99a41ebcee1a1ea0463b1b29d2e888de21a60c66 h: refs/heads/master i: 375595: cfe1d9a9c86d1094f6af05575ab7c14c2c2398d9 v: v3 --- [refs] | 2 +- trunk/drivers/block/rbd.c | 21 ++++----------------- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/[refs] b/[refs] index 9e154280e87b..25b88f465b69 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 30d60ba2f258da24b91edb880338c7178f901de9 +refs/heads/master: 99a41ebcee1a1ea0463b1b29d2e888de21a60c66 diff --git a/trunk/drivers/block/rbd.c b/trunk/drivers/block/rbd.c index ae223819bbf0..6748fe2d67d6 100644 --- a/trunk/drivers/block/rbd.c +++ b/trunk/drivers/block/rbd.c @@ -788,7 +788,7 @@ static int rbd_header_from_disk(struct rbd_device *rbd_dev, * Copy the names, and fill in each snapshot's id * and size. * - * Note that rbd_dev_v1_header_read() guarantees the + * Note that rbd_dev_v1_header_info() guarantees the * ondisk buffer we're working with has * snap_names_len bytes beyond the end of the * snapshot id array, this memcpy() is safe. @@ -3050,7 +3050,7 @@ static int rbd_obj_read_sync(struct rbd_device *rbd_dev, * return, the rbd_dev->header field will contain up-to-date * information about the image. */ -static int rbd_dev_v1_header_read(struct rbd_device *rbd_dev) +static int rbd_dev_v1_header_info(struct rbd_device *rbd_dev) { struct rbd_image_header_ondisk *ondisk = NULL; u32 snap_count = 0; @@ -3105,14 +3105,6 @@ static int rbd_dev_v1_header_read(struct rbd_device *rbd_dev) return ret; } -/* - * only read the first part of the ondisk header, without the snaps info - */ -static int rbd_dev_v1_refresh(struct rbd_device *rbd_dev) -{ - return rbd_dev_v1_header_read(rbd_dev); -} - /* * Clear the rbd device's EXISTS flag if the snapshot it's mapped to * has disappeared from the (just updated) snapshot context. @@ -3141,7 +3133,7 @@ static int rbd_dev_refresh(struct rbd_device *rbd_dev) mapping_size = rbd_dev->mapping.size; mutex_lock_nested(&ctl_mutex, SINGLE_DEPTH_NESTING); if (rbd_dev->image_format == 1) - ret = rbd_dev_v1_refresh(rbd_dev); + ret = rbd_dev_v1_header_info(rbd_dev); else ret = rbd_dev_v2_refresh(rbd_dev); @@ -4467,11 +4459,6 @@ static void rbd_dev_unprobe(struct rbd_device *rbd_dev) memset(header, 0, sizeof (*header)); } -static int rbd_dev_v1_probe(struct rbd_device *rbd_dev) -{ - return rbd_dev_v1_header_read(rbd_dev); -} - static int rbd_dev_v2_probe(struct rbd_device *rbd_dev) { int ret; @@ -4714,7 +4701,7 @@ static int rbd_dev_image_probe(struct rbd_device *rbd_dev, bool read_only) goto out_header_name; if (rbd_dev->image_format == 1) - ret = rbd_dev_v1_probe(rbd_dev); + ret = rbd_dev_v1_header_info(rbd_dev); else ret = rbd_dev_v2_probe(rbd_dev); if (ret)