tl;dr: Yes to proposed df changes. Keep btrfs fi df as-is.

On Mon, Feb 10, 2014 at 11:41:51AM -0500, Josef Bacik wrote:
[snip]
> =====  What to do moving forward =====
> 
> Flip what both of these do.  Do not multiply for normal df, and
> multiply for btrfs fi df.
> 
> ===== New and improved df =====
> 
> Since this is the lowest common denominator we should just spit out
> how much space is used based on the block groups and then divide the
> remaining space that hasn't been allocated yet by the raid
> multiplier.
> 
> This is going to be kind of tricky once we do per-subvolume RAID
> levels, but this falls under the b_avail voodoo which is just a
> guess anyway, so for this we will probably take the biggest
> multiplier and use that to show how much available space you have.

   Biggest multiplier leads to the pessimistic estimate, which is what
I'd prefer to see here, so that's good. Agree with this.

> This way with RAID1 it shows you have 1tb of total space and you've
> used 1tb of space.
> 
> ===== New and improved btrfs fi df =====
> 
> Since people using this tool are already going to be better informed
> and since we are already given the block group flags we can go ahead
> and do the raid multiplier in btrfs-progs and spit out the adjusted
> numbers rather than the raw numbers we get from the ioctl.  This
> will just be a progs thing and that way we can possibly add an
> option to not apply the multipliers and just get the raw output.

   Keep this unchanged, IMO.

(a) I quite like the non-multiplied version as it is, as it gives you
    the quantities of real, actual data stored -- the value you
    generally care about anyway ("how much stuff do I have on here?").

(b) Using the non-multiplied version here as well as above would then
    give >gasp< comparable values for btrfs fi df and Plain Old df.
    Less confusion all round, I think.

(c) The difficulty with using multiplied values is the behaviour of
    parity RAID on filesystems with different sized devices: there
    isn't a single multiplier that will give an accurate answer at
    all. (Detailed arguments available on application ;) )

   Hugo.

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 65E74AC0 from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
            --- "Can I offer you anything? Tea? Seedcake? ---            
                         Glass of Amontillado?"                          

Attachment: signature.asc
Description: Digital signature

Reply via email to