Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3591538f authored by Josh Durgin's avatar Josh Durgin Committed by Alex Elder
Browse files

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: default avatarJosh Durgin <josh.durgin@dreamhost.com>
Reviewed-by: default avatarAlex Elder <elder@dreamhost.com>
Reviewed-by: default avatarYehuda Sadeh <yehuda@hq.newdream.net>
parent b06e6a6b
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -141,7 +141,7 @@ struct rbd_request {
struct rbd_snap {
	struct	device		dev;
	const char		*name;
	size_t			size;
	u64			size;
	struct list_head	node;
	u64			id;
};
@@ -1935,7 +1935,7 @@ static ssize_t rbd_snap_size_show(struct device *dev,
{
	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,