aboutsummaryrefslogtreecommitdiffstats
path: root/cmds-fi-du.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-02-24 16:04:07 +0100
committerDavid Sterba <dsterba@suse.com>2016-03-14 13:42:47 +0100
commit54dea513c6c7deb6bac010ef5ad767bcbfa4f983 (patch)
tree694dea18ee77556d32d6b7a0c89e53509a326ede /cmds-fi-du.c
parentbc23667bd24ef5f76d5357200c462b66d2d21974 (diff)
downloadbtrfs-progs-54dea513c6c7deb6bac010ef5ad767bcbfa4f983.tar.gz
btrfs-progs-54dea513c6c7deb6bac010ef5ad767bcbfa4f983.tar.xz
btrfs-progs-54dea513c6c7deb6bac010ef5ad767bcbfa4f983.zip
btrfs-progs: fi du: switch to u64
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'cmds-fi-du.c')
-rw-r--r--cmds-fi-du.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/cmds-fi-du.c b/cmds-fi-du.c
index 836d357..02e8144 100644
--- a/cmds-fi-du.c
+++ b/cmds-fi-du.c
@@ -295,7 +295,7 @@ const char * const cmd_filesystem_du_usage[] = {
*/
#define SKIP_FLAGS (FIEMAP_EXTENT_UNKNOWN|FIEMAP_EXTENT_DELALLOC|FIEMAP_EXTENT_DATA_INLINE)
static int du_calc_file_space(int fd, struct rb_root *shared_extents,
- uint64_t *ret_total, uint64_t *ret_shared)
+ u64 *ret_total, u64 *ret_shared)
{
char buf[16384];
struct fiemap *fiemap = (struct fiemap *)buf;
@@ -362,16 +362,16 @@ out:
}
struct du_dir_ctxt {
- uint64_t bytes_total;
- uint64_t bytes_shared;
+ u64 bytes_total;
+ u64 bytes_shared;
DIR *dirstream;
struct rb_root shared_extents;
};
#define INIT_DU_DIR_CTXT (struct du_dir_ctxt) { 0ULL, 0ULL, NULL, RB_ROOT }
static int du_add_file(const char *filename, int dirfd,
- struct rb_root *shared_extents, uint64_t *ret_total,
- uint64_t *ret_shared, int top_level);
+ struct rb_root *shared_extents, u64 *ret_total,
+ u64 *ret_shared, int top_level);
static int du_walk_dir(struct du_dir_ctxt *ctxt, struct rb_root *shared_extents)
{
@@ -381,7 +381,7 @@ static int du_walk_dir(struct du_dir_ctxt *ctxt, struct rb_root *shared_extents)
ret = 0;
do {
- uint64_t tot, shr;
+ u64 tot, shr;
errno = 0;
entry = readdir(dirstream);
@@ -411,16 +411,16 @@ static int du_walk_dir(struct du_dir_ctxt *ctxt, struct rb_root *shared_extents)
}
static int du_add_file(const char *filename, int dirfd,
- struct rb_root *shared_extents, uint64_t *ret_total,
- uint64_t *ret_shared, int top_level)
+ struct rb_root *shared_extents, u64 *ret_total,
+ u64 *ret_shared, int top_level)
{
int ret, len = strlen(filename);
char *pathtmp;
struct stat st;
struct du_dir_ctxt dir = INIT_DU_DIR_CTXT;
int is_dir = 0;
- uint64_t file_total = 0;
- uint64_t file_shared = 0;
+ u64 file_total = 0;
+ u64 file_shared = 0;
u64 dir_set_shared = 0;
u64 subvol;
int fd;