All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: Andrey Albershteyn <aalbersh@redhat.com>,
	esandeen@redhat.com, util-linux@vger.kernel.org
Subject: Re: [PATCH 0/2] libblkid: add FSSIZE with XFS implementation
Date: Fri, 29 Apr 2022 10:43:33 +0200	[thread overview]
Message-ID: <20220429084333.m6vcxptlvusgotvr@ws.net.home> (raw)
In-Reply-To: <facb3c36-0088-d645-6162-4d52fc94557f@redhat.com>

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@redhat.com>
 http://karelzak.blogspot.com


      reply	other threads:[~2022-04-29  8:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-21 13:09 [PATCH 0/2] libblkid: add FSSIZE with XFS implementation Andrey Albershteyn
2022-04-21 13:09 ` [PATCH 1/2] libblkid: add interface for FSSIZE field Andrey Albershteyn
2022-04-25 13:40   ` Karel Zak
2022-04-21 13:09 ` [PATCH 2/2] libblkid: implement FSSIZE calculation for XFS Andrey Albershteyn
2022-04-25 13:43 ` [PATCH 0/2] libblkid: add FSSIZE with XFS implementation Karel Zak
2022-04-25 15:38   ` Eric Sandeen
2022-04-26  8:21     ` Karel Zak
     [not found]       ` <YmfPPbgZtZi1iSXv@aalbersh.remote.csb>
2022-04-27  4:10         ` Eric Sandeen
2022-04-29  8:43           ` Karel Zak [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220429084333.m6vcxptlvusgotvr@ws.net.home \
    --to=kzak@redhat.com \
    --cc=aalbersh@redhat.com \
    --cc=esandeen@redhat.com \
    --cc=sandeen@redhat.com \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.