libblkid merged into util-linux-ng
Karel Zak
AppliedI've merged the topic/blkid branch into the master branch (upcoming util-linux-ng 2.15).
Note that the library and blkid binary are still "experimental", although I don't expect any API changes.
Feedback and bug reports are welcomed...
Karel
New libblkid features:
---------------------
* backwardly compatible ABI and API with old libblkid from e2fsprogs
* low-level probing interface:
- blkid_probe_* functions
- /sbin/blkid -p <device>
* vol_id compatible output format (e.g. "ID_FS_LABEL_ENC=\x2fboot"):
- blkid -p -o udev <device>
* very high-level interface for LABELs/UUIDs evaluation:
- blkid_evaluate_spec()
- /sbin/blkid -L <label> | -U <uuid>
it's strongly recommended to use this interface in your applications or scripts. The interface is configurable (by /etc/blkid.conf) and works on 2.4, 2.6, udev or non-udev systems.
It's always better to use /sbin/blkid -L|-U than directly read /dev/disk/by-{label,uuid} symlinks.
* /etc/blkid.conf config file, options are:
EVALUATE=<method>[,<method>] # methods are udev and scan;
# default: udev,scan
SEND_UEVENT=<yes|not> # send uevent when disk/by-*
# symlink is not valid; default: yes
CACHE_FILE=<path> # default: /etc/blkid.tab
* 24 FS/raid images for blkid regression tests
TODO
----
e2fsprogs:
- add --disable-blkid
- #ifdef BUILD_BLKID for findfs code in tune2fs.c
- freeze <major>.<minor> libblkid version numbers, the libblkid in e2fsprogs should be open for bug fixes or new filesystems only.
udev:
- add --disable-volumeid
- test blkid within udev rules
- add command line interface for blkid_probe_filter_usage():
# blkid -p -o udev --filter-usage filesystems
# blkid -p -o udev --filter-usage noraid
and blkid_probe_filter_types():
# blkid -p -o udev --filter-type nofat
note that "--filter-usage" is necessary for compatibility with vol_id where we in udev rules use things like "vol_id --skip-raid"
- use blkid_evaluate_spec() in mount, umount, swapon and fsck
- move fsck to util-linux-ng (we already have some old patches from Christoph Hellwig and Matthias Koenig)
- documentation (probably generated from source code)
Signature · 5 lines
Karel Zak <[email protected]> -- To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 2 lines · Karel Zak
TODO
----
* add stripe size / alignment retrival support to libbkid for use with mkfs. This would allow to deprecate libdisk from xfsprogs (1) in favour of a common libblkid
(1) http://git.kernel.org/?p=fs/xfs/xfsprogs-dev.git;a=tree;f=libdisk;
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 6 lines · Christoph Hellwig
Quoted 2 lines · Karel Zak
TODO
----* add stripe size / alignment retrival support to libbkid for use with mkfs. This would allow to deprecate libdisk from xfsprogs (1) in favour of a common libblkid
Added to TODO.
Quoted 1 line
(1) http://git.kernel.org/?p=fs/xfs/xfsprogs-dev.git;a=tree;f=libdisk;
That would be nice to have something better than exec(/sbin/dmsetup) in shared library. It seems that DM developers have no clue about /sys/block :-(
Karel
Signature · 6 lines
Karel Zak <[email protected]> -- To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Karel" == Karel Zak <[email protected]> writes:
Quoted 5 lines · Christoph Hellwig
Quoted 5 lines · Karel Zak
Quoted 1 line
TODO ----
* add stripe size / alignment retrival support to libbkid for use with mkfs. This would allow to deprecate libdisk from xfsprogs (1) in favour of a common libblkid
Karel> Added to TODO.
My I/O topology patches are finally shaping up and I expect to post them later this week. Turned out to be much, much harder than expected to get it right for the various RAID modes.
My patches will give us alignment and minimum/optimal/maximum I/O sizes for each block device in sysfs.
Quoted 2 lines
Quoted 2 lines
(1)
http://git.kernel.org/?p=fs/xfs/xfsprogs-dev.git;a=tree;f=libdisk;
Karel> That would be nice to have something better than Karel> exec(/sbin/dmsetup) in shared library. It seems that DM Karel> developers have no clue about /sys/block :-(
When the LVM stripe extraction code was originally written I was explicitly asked to call the lvm commands instead of poking around with liblvm and internal data structures. The command output was considered part of the API.
That in turn spilled over to DM, I guess...
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering