Re: [PATCH 0/2] libblkid: add FSSIZE with XFS implementation

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

 



On Tue, Apr 26, 2022 at 11:10:12PM -0500, Eric Sandeen wrote:
> Ok, so I'm remembering what FSSIZE does in lsblk now :) it simply returns:
> 
> 	dev->fsstat.f_frsize * dev->fsstat.f_blocks
> 
> i.e. calculating the value based on statfs values.
> 
> This does get a little tricky for ext4, because statfs "f_blocks" is
> affected by the minixdf/bsddf mount options.
> 
> ext4's f_blocks statfs calculation looks like this:
> 
>         buf->f_blocks = ext4_blocks_count(es) - EXT4_C2B(sbi, overhead);
> 
> the default behavior, bsddf, subtracts out the overhead.

Note. There is no problem add to the man page(s) information that
FSSIZE may be different to numbers from statfs() or df(1). It does not
have to be perfect, but good enough to get basic overview about FS. It
does not make sense to assume that libblkid is able to work with FS
like kernel.

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux