Re: [PATCH v2] btrfs-progs: utils: negative numbers are more plausible than sizes over 8 EiB

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Dec 03, 2016 at 03:39:54PM -0500, Zygo Blaxell wrote:
> I got tired of seeing "16.00EiB" whenever btrfs-progs encounters a
> negative size value, e.g. during resize:
> 
> Unallocated:
>    /dev/mapper/datamd18   16.00EiB
> 
> This version is much more useful:
> 
> Unallocated:
>    /dev/mapper/datamd18  -26.29GiB
> 
> Signed-off-by: Zygo Blaxell <ce3g8jdj@xxxxxxxxxxxxxxxxxxxxx>

>From some perspective, negative numbers are better than the insane EiB
sizes. I've started to fix it properly, ie account for the size of the
device under deletion. Turns out this needs to retrieve information from
the protected search ioctl, so in some cases we wouldn't be able to
calculate the numbers exactly anyway. This similar to calculating the
space stats in case of raid5/6.

So I'm going to merge this patch, tough I'd not modify the the function
prototype but rather add a new unit mode so the caller can actually say
how the 64bit numbers should be printed.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux