From: "Bryn M. Reeves" <breeves@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] libLVM progress?
Date: Thu, 26 Jul 2007 21:09:11 +0100 [thread overview]
Message-ID: <46A8FF67.1070405@redhat.com> (raw)
In-Reply-To: <63576.192.52.57.33.1185480057.squirrel@webmail.wpi.edu>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ken Stein wrote:
> * use system() or exec() style calls to run the command line LVM utilities
> as needed. Works, but not exactly elegant, and definitely not efficient.
You'd be better off using the existing liblvm2cmd library. This gives
you a programmatic interface to the command line toolset. It will still
mean formatting commandlines/parsing returns but it cuts down on your
forking and allows the library to cache LVM2 internal data across
command invocations - potentially, that amounts to a big saving.
See doc/example_cmdlib.c in the LVM2 sources for a short example program.
> * delve deeply into the LVM utilities source code to find the ioctl calls
> and/or procfs+sysfs structures being used, then duplicate this in my own
> work.
Not a good idea - there's too much complexity involved and duplicating
that in separate projects would lead to something pretty unmaintainable
quite quickly.
> * use a premade LVM interface library.
There is work in progress to create this kind of interface.
Cheers,
Bryn.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFGqP9n6YSQoMYUY94RAry/AJ4lv4Hpn0FSfK3Tb9jJNiOBdMg0qQCePJPf
Ospgi7Wiz5AyeZxecEbBi74=
=9vKT
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2007-07-26 20:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-26 20:00 [linux-lvm] libLVM progress? Ken Stein
2007-07-26 20:08 ` Alasdair G Kergon
2007-07-26 20:09 ` Bryn M. Reeves [this message]
2007-07-30 14:40 ` Ken Stein
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=46A8FF67.1070405@redhat.com \
--to=breeves@redhat.com \
--cc=linux-lvm@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.