All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: Vojtech Trefny <vtrefny@redhat.com>,
	Mike Snitzer <msnitzer@redhat.com>,
	dm-devel@redhat.com, lvm-devel@redhat.com,
	util-linux@vger.kernel.org
Subject: Re: libblkid filesystem block size
Date: Thu, 4 Oct 2018 11:43:29 +0200	[thread overview]
Message-ID: <20181004094329.z6b7y4ahhmb4ayj6@ws.net.home> (raw)
In-Reply-To: <alpine.LRH.2.02.1810031724070.7859@file01.intranet.prod.int.rdu2.redhat.com>


 Ahoj,

On Wed, Oct 03, 2018 at 05:41:59PM -0400, Mikulas Patocka wrote:
> As you maintain libblkid, I'd like to ask - would it be possible to add 
> detection of filesystem block size to it? libblkid already has description 
> of various filesystem superblocks, so it shouldn't be too hard.

we had something like this (and also FS size) in our TODO for years.
So, I don't see problem to add it now. Send patch ;-)

All you need is to add 

 libblkid/src/superblocks/superblocks.c: blkid_probe_set_fs_blocksize() 

to add "BLKSZ" variable to the probing result (use for example
blkid_probe_set_version() as a template).

And then use this function in FS specific probers. The variable will
automatically visible for udev as ID_FS_BLKSZ=.

    Karel

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

WARNING: multiple messages have this Message-ID (diff)
From: Karel Zak <kzak@redhat.com>
To: Mikulas Patocka <mpatocka@redhat.com>
Cc: util-linux@vger.kernel.org, Vojtech Trefny <vtrefny@redhat.com>,
	Mike Snitzer <msnitzer@redhat.com>,
	dm-devel@redhat.com, lvm-devel@redhat.com
Subject: Re: libblkid filesystem block size
Date: Thu, 4 Oct 2018 11:43:29 +0200	[thread overview]
Message-ID: <20181004094329.z6b7y4ahhmb4ayj6@ws.net.home> (raw)
In-Reply-To: <alpine.LRH.2.02.1810031724070.7859@file01.intranet.prod.int.rdu2.redhat.com>


 Ahoj,

On Wed, Oct 03, 2018 at 05:41:59PM -0400, Mikulas Patocka wrote:
> As you maintain libblkid, I'd like to ask - would it be possible to add 
> detection of filesystem block size to it? libblkid already has description 
> of various filesystem superblocks, so it shouldn't be too hard.

we had something like this (and also FS size) in our TODO for years.
So, I don't see problem to add it now. Send patch ;-)

All you need is to add 

 libblkid/src/superblocks/superblocks.c: blkid_probe_set_fs_blocksize() 

to add "BLKSZ" variable to the probing result (use for example
blkid_probe_set_version() as a template).

And then use this function in FS specific probers. The variable will
automatically visible for udev as ID_FS_BLKSZ=.

    Karel

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

WARNING: multiple messages have this Message-ID (diff)
From: Karel Zak <kzak@redhat.com>
To: lvm-devel@redhat.com
Subject: libblkid filesystem block size
Date: Thu, 4 Oct 2018 11:43:29 +0200	[thread overview]
Message-ID: <20181004094329.z6b7y4ahhmb4ayj6@ws.net.home> (raw)
In-Reply-To: <alpine.LRH.2.02.1810031724070.7859@file01.intranet.prod.int.rdu2.redhat.com>


 Ahoj,

On Wed, Oct 03, 2018 at 05:41:59PM -0400, Mikulas Patocka wrote:
> As you maintain libblkid, I'd like to ask - would it be possible to add 
> detection of filesystem block size to it? libblkid already has description 
> of various filesystem superblocks, so it shouldn't be too hard.

we had something like this (and also FS size) in our TODO for years.
So, I don't see problem to add it now. Send patch ;-)

All you need is to add 

 libblkid/src/superblocks/superblocks.c: blkid_probe_set_fs_blocksize() 

to add "BLKSZ" variable to the probing result (use for example
blkid_probe_set_version() as a template).

And then use this function in FS specific probers. The variable will
automatically visible for udev as ID_FS_BLKSZ=.

    Karel

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



  reply	other threads:[~2018-10-04 16:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-03 21:41 libblkid filesystem block size Mikulas Patocka
2018-10-03 21:41 ` Mikulas Patocka
2018-10-03 21:41 ` Mikulas Patocka
2018-10-04  9:43 ` Karel Zak [this message]
2018-10-04  9:43   ` Karel Zak
2018-10-04  9:43   ` Karel Zak

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=20181004094329.z6b7y4ahhmb4ayj6@ws.net.home \
    --to=kzak@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=lvm-devel@redhat.com \
    --cc=mpatocka@redhat.com \
    --cc=msnitzer@redhat.com \
    --cc=util-linux@vger.kernel.org \
    --cc=vtrefny@redhat.com \
    /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.