summaryrefslogtreecommitdiff
path: root/cmds-fi-disk_usage.h
Commit message (Collapse)AuthorAge
* btrfs-progs: unify unit mode parameters and variablesDavid Sterba2014-12-18
| | | | | | Use unsigned type and a common name everywhere. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: replace df_pretty_sizes with pretty_size_modeDavid Sterba2014-12-04
| | | | Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: cleanup filesystem/device usage codeDavid Sterba2014-12-04
| | | | | | | | | | | | | | | 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>
* btrfs-progs: compare unallocated space against the correct valueDavid Sterba2014-12-04
| | | | | | | | The device may not be fully occupied by the filesystem, the value of Unallocated should not be calculated against the device size but the size provided by DEV_INFO. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: Print more info about device sizesDavid Sterba2014-12-04
| | | | | | | | | | | | | | | | | | | | The entire device size may not be available to the filesystem, eg. if it's modified via resize. Print this information if it can be obtained from the DEV_INFO ioctl. Print the device ID on the same line as the device name and move size to the next line. Sample: /dev/sda7, ID: 3 Device size: 10.00GiB FS occupied: 5.00GiB Data,RAID10: 512.00MiB Metadata,RAID10: 512.00MiB System,RAID10: 4.00MiB Unallocated: 9.00GiB Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: move device usage to cmds-device, more cleanupsDavid Sterba2014-12-04
| | | | | | | | | | | Move the command definitions where they belong, keep common 'usage' functions in cmds-fi-disk_usage.c and add exports. Rename structures containing 'disk' to 'device'. Fix whitespace in the modified code. Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: add original 'df' and rename 'disk_usage' to 'usage'David Sterba2014-12-04
| | | | | | | | | Add back the original output of the 'btrfs fi df' command for backward compatibility. The rich output is moved from 'disk_usage' to 'usage'. Agreed in http://www.spinics.net/lists/linux-btrfs/msg31698.html Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: Add btrfs device disk-usage commandGoffredo Baroncelli2014-12-04
| | | | | Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: Add command btrfs filesystem disk-usageGoffredo Baroncelli2014-12-04
| | | | | Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it> Signed-off-by: David Sterba <dsterba@suse.cz>
* btrfs-progs: Enhance the command btrfs filesystem dfGoffredo Baroncelli2014-12-04
Enhance the command "btrfs filesystem df" to show space usage information for a mount point(s). It shows also an estimation of the space available, on the basis of the current one used. Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it> [code moved under #if 0 instead of deletion] Signed-off-by: David Sterba <dsterba@suse.cz>