Re: [PATCH 4/6] rbd: fix snapshot size type

[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:
> Snapshot sizes should be the same type as regular image sizes. This
> only affects their displayed size in sysfs, not the reported size of
> an actual block device sizes.
>
> Signed-off-by: Josh Durgin <josh.durgin@xxxxxxxxxxxxx>
> Reviewed-by: Alex Elder <elder@xxxxxxxxxxxxx>
> ---
>  drivers/block/rbd.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> Index: b/drivers/block/rbd.c
> ===================================================================
> --- a/drivers/block/rbd.c
> +++ b/drivers/block/rbd.c
> @@ -141,7 +141,7 @@
>  struct rbd_snap {
>        struct  device          dev;
>        const char              *name;
> -       size_t                  size;
> +       u64                     size;
>        struct list_head        node;
>        u64                     id;
>  };
> @@ -1936,7 +1936,7 @@
>  {
>        struct rbd_snap *snap = container_of(dev, struct rbd_snap, dev);
>
> -       return sprintf(buf, "%zd\n", snap->size);
> +       return sprintf(buf, "%llu\n", (unsigned long long)snap->size);
>  }
>
>  static ssize_t rbd_snap_id_show(struct device *dev,
> @@ -1945,7 +1945,7 @@
>  {
>        struct rbd_snap *snap = container_of(dev, struct rbd_snap, dev);
>
> -       return sprintf(buf, "%llu\n", (unsigned long long) snap->id);
> +       return sprintf(buf, "%llu\n", (unsigned long long)snap->id);
>  }
>
>  static DEVICE_ATTR(snap_size, S_IRUGO, rbd_snap_size_show, NULL);

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