aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/rbd.c
diff options
context:
space:
mode:
authorJosh Durgin <josh.durgin@dreamhost.com>2011-12-05 21:25:13 -0500
committerAlex Elder <elder@dreamhost.com>2012-05-14 13:13:03 -0400
commit3591538fb272d2432d112d47d7e0ddd0be4cded2 (patch)
tree11b8dbe116875b4596b8415d0bd7b073f36858d6 /drivers/block/rbd.c
parentb06e6a6be796bc365a19b0ac5176b553c13abf2f (diff)
rbd: fix snapshot size type
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@dreamhost.com> Reviewed-by: Alex Elder <elder@dreamhost.com> Reviewed-by: Yehuda Sadeh <yehuda@hq.newdream.net>
Diffstat (limited to 'drivers/block/rbd.c')
-rw-r--r--drivers/block/rbd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 4a0a829f79d1..83597965c486 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -141,7 +141,7 @@ struct rbd_request {
141struct rbd_snap { 141struct rbd_snap {
142 struct device dev; 142 struct device dev;
143 const char *name; 143 const char *name;
144 size_t size; 144 u64 size;
145 struct list_head node; 145 struct list_head node;
146 u64 id; 146 u64 id;
147}; 147};
@@ -1935,7 +1935,7 @@ static ssize_t rbd_snap_size_show(struct device *dev,
1935{ 1935{
1936 struct rbd_snap *snap = container_of(dev, struct rbd_snap, dev); 1936 struct rbd_snap *snap = container_of(dev, struct rbd_snap, dev);
1937 1937
1938 return sprintf(buf, "%zd\n", snap->size); 1938 return sprintf(buf, "%llu\n", (unsigned long long)snap->size);
1939} 1939}
1940 1940
1941static ssize_t rbd_snap_id_show(struct device *dev, 1941static ssize_t rbd_snap_id_show(struct device *dev,
@@ -1944,7 +1944,7 @@ static ssize_t rbd_snap_id_show(struct device *dev,
1944{ 1944{
1945 struct rbd_snap *snap = container_of(dev, struct rbd_snap, dev); 1945 struct rbd_snap *snap = container_of(dev, struct rbd_snap, dev);
1946 1946
1947 return sprintf(buf, "%llu\n", (unsigned long long) snap->id); 1947 return sprintf(buf, "%llu\n", (unsigned long long)snap->id);
1948} 1948}
1949 1949
1950static DEVICE_ATTR(snap_size, S_IRUGO, rbd_snap_size_show, NULL); 1950static DEVICE_ATTR(snap_size, S_IRUGO, rbd_snap_size_show, NULL);