Re: [PATCH] btrfs-progs: Format change for btrfs fi df

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

 



On Tue, Jan 12, 2016 at 3:28 PM, David Sterba <dsterba@xxxxxxx> wrote:
> On Mon, Dec 14, 2015 at 01:19:56PM +0800, Qu Wenruo wrote:
>> The GlobalReserve space in 'btrfs fi df' is always confusing for a lot
>> of users.
>> As it is not a special chunk type like DATA or METADATA, it's in fact a
>> sub-type of METADATA.
>>
>> So change the output to skip GlobalReserve by default, and adding its
>> total to metadata used.
>> And add a new option '-r|--reserve' to show the GlobalReserve, but skip
>> the profile of GlobalReserve.
>
> How about this:
>
> - keep the global reserve in the output, separate from metadata and not
>   accounted
> - add new option to account the global reserve into metadata and then
>   drop it from the output

I think this alternative does not remove the confusion for people,
maybe even keeps it and/or increases it. The default 'btrfs fi df'
would then still include a confusing term and numbers belonging to it
that still don't make sense.

Maybe there are scripts around that try to do something with the
number belonging to GlobalReserve, but I think such would already be
part of the problem. Such calculations should be in progs itself by
default. If people want more detail or more output, the -r can be
used. If the used= for metadata is smaller by default and there is
some 'free space hidden', the risk is higher that scripts/people let
the fs grow to even close to full with all the trouble we see so often
in this list and elsewhere.

So I think the original patch is the way forward; It should also be
applied to 'btrfs fi us' I think.

Additionally, when 'btrfs fi df' is default 3 lines, those 3 lines
could exactly match lines that 'btrfs fi us' outputs for
Data/System/Metadata, so aligning Size: with total=  etc. Hopefully
this gives options for making the code more compact for 'btrfs fi df'
+ 'btrfs fi sh' + 'btrfs fi us' + 'btrfs de us'.
--
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