diff options
author | Josef Bacik <josef@redhat.com> | 2010-03-06 00:59:21 +0300 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2010-03-15 18:00:11 +0300 |
commit | bd4d10888990f7e3f8029205d27eb155202d6969 (patch) | |
tree | dd8bfee4173f6bb5d0170768157e2a024bff34e1 /net/sched/sch_fifo.c | |
parent | 3a0524dc054791688177544fe510d2868ee20d9f (diff) | |
download | linux-bd4d10888990f7e3f8029205d27eb155202d6969.tar.xz |
Btrfs: make df be a little bit more understandable
The way we report df usage is way confusing for everybody, including some other
utilities (bacula for one). So this patch makes df a little bit more
understandable. First we make used actually count the total amount of used
space in all space info's. This will give us a real view of how much disk space
is in use. Second, for blocks available, only count data space. This makes
things like bacula work because it says 0 when you can no longer write anymore
data to the disk. I think this is a nice compromise, since you will end up with
something like the following
[root@alpha ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
148G 30G 111G 21% /
/dev/sda1 194M 116M 68M 64% /boot
tmpfs 985M 12K 985M 1% /dev/shm
/dev/mapper/VolGroup-LogVol02
145G 140G 0 100% /mnt/btrfs-test
Compare this with btrfsctl -i output
[root@alpha btrfs-progs-unstable]# ./btrfsctl -i /mnt/btrfs-test/
Metadata, DUP: total=4.62GB, used=2.46GB
System, DUP: total=8.00MB, used=24.00KB
Data: total=134.80GB, used=134.80GB
Metadata: total=8.00MB, used=0.00
System: total=4.00MB, used=0.00
operation complete
This way we show that there is no more data space to be used, but we have
another 5GB of space left for metadata. Thanks,
Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'net/sched/sch_fifo.c')
0 files changed, 0 insertions, 0 deletions