diff options
author | David Sterba <dsterba@suse.cz> | 2014-04-25 19:39:11 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2014-12-04 16:48:11 +0100 |
commit | 0c67867530f6dd706eaa41a6eaa44245a3252a90 (patch) | |
tree | 1e558b5887f65f1ffd27888e31737dd3fc005289 /cmds-fi-disk_usage.h | |
parent | 6312ac884361f719936cb25188fc6f91a28b905b (diff) |
btrfs-progs: cleanup filesystem/device usage code
The main point of this is to load the device and chunk infos at one
place and pass down to the printers. The EPERM is handled separately, in
case kernel does not give us all the information about chunks or
devices, but we want to warn and print at least something.
For non-root users, 'filesystem usage' prints only the overall stats and
warns about RAID5/6.
The sole cleanup changes affect mostly the modified code and the related
functions, should be reasonably small.
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'cmds-fi-disk_usage.h')
-rw-r--r-- | cmds-fi-disk_usage.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cmds-fi-disk_usage.h b/cmds-fi-disk_usage.h index dbc2a10f..0779defc 100644 --- a/cmds-fi-disk_usage.h +++ b/cmds-fi-disk_usage.h @@ -46,9 +46,8 @@ struct chunk_info { u64 num_stripes; }; -int load_device_info(int fd, struct device_info **device_info_ptr, - int *device_info_count); -int load_chunk_info(int fd, struct chunk_info **info_ptr, int *info_count); +int load_chunk_and_device_info(int fd, struct chunk_info **chunkinfo, + int *chunkcount, struct device_info **devinfo, int *devcount); char *df_pretty_sizes(u64 size, int mode); void print_device_chunks(int fd, struct device_info *devinfo, struct chunk_info *chunks_info_ptr, |