Re: [PATCH 5/6] rbd: rename __rbd_update_snaps to __rbd_refresh_header

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 18, 2012 at 7:41 AM, Alex Elder <elder@xxxxxxxxxxxxx> wrote:
> This function rereads the entire header and handles any changes in
> it, not just changes in snapshots.
>
> Signed-off-by: Josh Durgin <josh.durgin@xxxxxxxxxxxxx>
> Reviewed-by: Alex Elder <elder@xxxxxxxxxxxxx>
> ---
>  drivers/block/rbd.c |   12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> Index: b/drivers/block/rbd.c
> ===================================================================
> --- a/drivers/block/rbd.c
> +++ b/drivers/block/rbd.c
> @@ -240,7 +240,7 @@
>        put_device(&rbd_dev->dev);
>  }
>
> -static int __rbd_update_snaps(struct rbd_device *rbd_dev);
> +static int __rbd_refresh_header(struct rbd_device *rbd_dev);
>
>  static int rbd_open(struct block_device *bdev, fmode_t mode)
>  {
> @@ -1223,7 +1223,7 @@
>        dout("rbd_watch_cb %s notify_id=%lld opcode=%d\n", dev->obj_md_name,
>                notify_id, (int)opcode);
>        mutex_lock_nested(&ctl_mutex, SINGLE_DEPTH_NESTING);
> -       rc = __rbd_update_snaps(dev);
> +       rc = __rbd_refresh_header(dev);
>        mutex_unlock(&ctl_mutex);
>        if (rc)
>                pr_warning(RBD_DRV_NAME "%d got notification but failed to "
> @@ -1690,7 +1690,7 @@
>  /*
>  * only read the first part of the ondisk header, without the snaps info
>  */
> -static int __rbd_update_snaps(struct rbd_device *rbd_dev)
> +static int __rbd_refresh_header(struct rbd_device *rbd_dev)
>  {
>        int ret;
>        struct rbd_image_header h;
> @@ -1877,7 +1877,7 @@
>
>        mutex_lock_nested(&ctl_mutex, SINGLE_DEPTH_NESTING);
>
> -       rc = __rbd_update_snaps(rbd_dev);
> +       rc = __rbd_refresh_header(rbd_dev);
>        if (rc < 0)
>                ret = rc;
>
> @@ -2160,7 +2160,7 @@
>                                         rbd_dev->header.obj_version);
>                if (ret == -ERANGE) {
>                        mutex_lock_nested(&ctl_mutex, SINGLE_DEPTH_NESTING);
> -                       rc = __rbd_update_snaps(rbd_dev);
> +                       rc = __rbd_refresh_header(rbd_dev);
>                        mutex_unlock(&ctl_mutex);
>                        if (rc < 0)
>                                return rc;
> @@ -2545,7 +2545,7 @@
>        if (ret < 0)
>                goto err_unlock;
>
> -       ret = __rbd_update_snaps(rbd_dev);
> +       ret = __rbd_refresh_header(rbd_dev);
>        if (ret < 0)
>                goto err_unlock;
>

Reviewed-by: Yehuda Sadeh <yehuda@xxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux