summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-01-19 17:01:15 +0100
committerLennart Poettering <lennart@poettering.net>2015-01-19 20:24:09 +0100
commitc19de71113f956809995fc68817e055e9f61f607 (patch)
treebf2df35651e663d96e5677a719cb38bd5e0c9d4a /src/shared
parent1c7dd82563ff2e71a067aea20d2acb2d0553644b (diff)
machined: refer to the disk space allocated for an image to "usage" rather than "size"
After all, it's closer to the "du"-reported value than to the file sizes...
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/machine-image.c8
-rw-r--r--src/shared/machine-image.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/shared/machine-image.c b/src/shared/machine-image.c
index 5112d24a8f..8ea61052bd 100644
--- a/src/shared/machine-image.c
+++ b/src/shared/machine-image.c
@@ -73,7 +73,7 @@ static int image_new(
i->read_only = read_only;
i->crtime = crtime;
i->mtime = mtime;
- i->size = i->size_exclusive = (uint64_t) -1;
+ i->usage = i->usage_exclusive = (uint64_t) -1;
i->limit = i->limit_exclusive = (uint64_t) -1;
i->name = strdup(pretty);
@@ -164,8 +164,8 @@ static int image_make(
r = btrfs_subvol_get_quota_fd(fd, &quota);
if (r >= 0) {
- (*ret)->size = quota.referred;
- (*ret)->size_exclusive = quota.exclusive;
+ (*ret)->usage = quota.referred;
+ (*ret)->usage_exclusive = quota.exclusive;
(*ret)->limit = quota.referred_max;
(*ret)->limit_exclusive = quota.exclusive_max;
@@ -218,7 +218,7 @@ static int image_make(
if (r < 0)
return r;
- (*ret)->size = (*ret)->size_exclusive = st.st_blocks * 512;
+ (*ret)->usage = (*ret)->usage_exclusive = st.st_blocks * 512;
(*ret)->limit = (*ret)->limit_exclusive = st.st_size;
return 1;
diff --git a/src/shared/machine-image.h b/src/shared/machine-image.h
index c15b034321..75fa5f4533 100644
--- a/src/shared/machine-image.h
+++ b/src/shared/machine-image.h
@@ -41,8 +41,8 @@ typedef struct Image {
usec_t crtime;
usec_t mtime;
- uint64_t size;
- uint64_t size_exclusive;
+ uint64_t usage;
+ uint64_t usage_exclusive;
uint64_t limit;
uint64_t limit_exclusive;
} Image;