From: Karel Zak <kzak@redhat.com>
To: Venkatraman S <venkat@linaro.org>
Cc: util-linux@vger.kernel.org
Subject: Re: libblkid: newbie question about enabling whole disk sysfs probe
Date: Mon, 22 Oct 2012 16:28:13 +0200 [thread overview]
Message-ID: <20121022142813.GD21724@x2.net.home> (raw)
In-Reply-To: <CAFSEfh2myyk98cZWRU149rUAm+1e7DiAKxsUU=jBxb5ZNoLABA@mail.gmail.com>
On Mon, Oct 22, 2012 at 06:15:57PM +0530, Venkatraman S wrote:
> blkid_probe_enable_topology(pr, 1);
This is strings based interface (NAME=value). It's probably
better to use:
tp = blkid_probe_get_topology(pr);
blkid_topology_get_alignment_offset(tp);
see libblkid/samples/topology.c.
> I am able to get to the property value (which is set from the sysfs
> value for the disk).
>
> But when mkswap is invokded with /dev/sdbX, then sysfs_probe is not
> able to discover the parent disk's sysfs property.
Really? It should be able to translate the partition name to the
whole-disk name and us it.
# ./sample-topology /dev/sdd1
----- binary interface:
alignment offset : 0
minimum io size : 4096
optimal io size : 262144
logical sector size : 4096
physical sector size : 4096
----- NAME=value interface (values: 4):
MINIMUM_IO_SIZE = 4096
OPTIMAL_IO_SIZE = 262144
PHYSICAL_SECTOR_SIZE = 4096
LOGICAL_SECTOR_SIZE = 4096
> Any help would be great.
What exactly is your goal?
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
next prev parent reply other threads:[~2012-10-22 14:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-22 12:45 libblkid: newbie question about enabling whole disk sysfs probe Venkatraman S
2012-10-22 14:28 ` Karel Zak [this message]
2012-10-22 16:33 ` Venkatraman S
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=20121022142813.GD21724@x2.net.home \
--to=kzak@redhat.com \
--cc=util-linux@vger.kernel.org \
--cc=venkat@linaro.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.