Skip to content

Enhanced df - followup

David Sterba linux-btrfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest14 patches 20 repliesIn review

Changes from the cover letter

* btrfs filesystem disk_usage - renamed to usage
* added a section of overall filesystem usage, that used to be in the 'fi df' output
* btrfs device disk_usage - renamed to usage
* the device size prints both blockdevie size and the size that's occupied by the filesystem
* device ID is printed
* btrfs filesystem df - reverted to the original output
* btrfs filesystem df - now prints the GlobalReserve info
* units print B for bytes
* the ioctls FS_INFO and DEV_INFO need root (patches sent to drop that requirement), so there's a warning printed instead
* no documentation for now

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14btrfs-progs: read global reserve size from space infosctree.h utils.c+12 -10 replies
2/14btrfs-progs: add original 'df' and rename 'disk_usage' to 'usage'cmds-fi-disk_usage.c cmds-fi-disk_usage.h cmds-filesystem.c+71 -760 replies
3/14btrfs-progs: move device usage to cmds-device, more cleanupscmds-device.c cmds-fi-disk_usage.c cmds-fi-disk_usage.h+188 -2190 replies
4/14btrfs-progs: check if we can't get info from ioctls due to permissionscmds-fi-disk_usage.c+10 -00 replies
5/14btrfs-progs: zero out structures before calling ioctlcmds-fi-disk_usage.c+3 -30 replies
6/14btrfs-progs: print B for bytesutils.c+1 -10 replies
7/14btrfs-progs: Print more info about device sizescmds-device.c cmds-fi-disk_usage.c cmds-fi-disk_usage.h+20 -510 replies
8/14btrfs-progs: compare unallocated space against the correct valuecmds-device.c cmds-fi-disk_usage.c cmds-fi-disk_usage.h+7 -100 replies
9/14btrfs-progs: add section of overall filesystem usagecmds-fi-disk_usage.c+13 -120 replies
10/14btrfs-progs: cleanup filesystem/device usage codecmds-device.c cmds-fi-disk_usage.c cmds-fi-disk_usage.h+105 -940 replies
11/14btrfs-progs: extend pretty printers with unit modecmds-fi-disk_usage.c utils.c utils.h+66 -350 replies
12/14btrfs-progs: replace df_pretty_sizes with pretty_size_modecmds-device.c cmds-fi-disk_usage.c cmds-fi-disk_usage.h+30 -440 replies
13/14btrfs-progs: clean up return codes and pathscmds-device.c cmds-fi-disk_usage.c+34 -320 replies
14/14btrfs-progs: move global reserve to overall summarycmds-fi-disk_usage.c+20 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/14] Enhanced df - followup

Hi,

this is a followup to the df (space usage) enhancements, Goffredo's patches are merged without changes, though the code needs updates.

But, given the patchset size, net benefit of the enriched output and longstanding need of the update, I've deliberately skipped the process of incremental rewiew/resend loop that should normally take place and implemented the changes that were agreed in previous discussions and did code cleanups along the way.

The basic layout of the command output has been kept, there are some tweaks or additions.

Changes:
* btrfs filesystem disk_usage - renamed to usage
* added a section of overall filesystem usage, that used to be in the 'fi df' output
* btrfs device disk_usage - renamed to usage
* the device size prints both blockdevie size and the size that's occupied by the filesystem
* device ID is printed
* btrfs filesystem df - reverted to the original output
* btrfs filesystem df - now prints the GlobalReserve info
* units print B for bytes
* the ioctls FS_INFO and DEV_INFO need root (patches sent to drop that requirement), so there's a warning printed instead
* no documentation for now

It's not finished, I've tried to scan all the previous iteration of the patches for the suggested UI tweaks and probably missed some, but IMO in a state that can go to git and be scheduled for a near release.

The major UI changes are there, we can tweak it further of course.

David Sterba (14):
btrfs-progs: read global reserve size from space infos
btrfs-progs: add original 'df' and rename 'disk_usage' to 'usage'
btrfs-progs: move device usage to cmds-device, more cleanups
btrfs-progs: check if we can't get info from ioctls due to permissions
btrfs-progs: zero out structures before calling ioctl
btrfs-progs: print B for bytes
btrfs-progs: Print more info about device sizes
btrfs-progs: compare unallocated space against the correct value
btrfs-progs: add section of overall filesystem usage
btrfs-progs: cleanup filesystem/device usage code
btrfs-progs: extend pretty printers with unit mode
btrfs-progs: replace df_pretty_sizes with pretty_size_mode
btrfs-progs: clean up return codes and paths
btrfs-progs: move global reserve to overall summary

 cmds-device.c        |  92 +++++++-
 cmds-fi-disk_usage.c | 631 +++++++++++++++++++--------------------------------
 cmds-fi-disk_usage.h |  35 ++-
 cmds-filesystem.c    |  55 ++++-
 ctree.h              |   6 +
 utils.c              |  78 +++++--
 utils.h              |  21 +-
 7 files changed, 482 insertions(+), 436 deletions(-)
Signature · 1 line
1.9.0