From: Andrew Clausen <clausen@gnu.org>
To: linux-kernel@vger.kernel.org, bug-parted@gnu.org,
evms-devel@lists.sourceforge.net
Subject: Re: [Evms-devel] userspace discovery of partitions
Date: Wed, 2 Jan 2002 11:18:16 +1100 [thread overview]
Message-ID: <20020102111816.A869@gnu.org> (raw)
In-Reply-To: <20020102055735.C472@gnu.org> <20020101131817.J12868@lynx.no>
In-Reply-To: <20020101131817.J12868@lynx.no>; from adilger@turbolabs.com on Tue, Jan 01, 2002 at 01:18:17PM -0700
On Tue, Jan 01, 2002 at 01:18:17PM -0700, Andreas Dilger wrote:
> On Jan 02, 2002 05:57 +1100, Andrew Clausen wrote:
> > As discussed a while ago (see thread starting at
> > http://www.uwsg.iu.edu/hypermail/linux/kernel/0105.2/0659.html), I
> > wrote a frontend to libparted that does nothing but probe all
> > block devices for partition tables, and tells the kernel what
> > partitions it finds. It optionally prints a short summary.
>
> This would mesh nicely with the filesystem (and other content) probing
> tool/lib that I wrote, blkid. It probes filesystem types (and also
> label, uuid, fs size for common fs types).
Indeed. To be honest, I think it's a mistake to have both libparted
and blkid. OTOH, libparted isn't scaling down very well (yet).
> Hmm, it does seem a bit large for what it is doing. Any idea where
> the bloat is coming from?
Mainly because the code is structured for editing. Editing is much
harder than just reading. There is a lot more information to parse,
that you could otherwise throw out. For example, you don't care about
partition names, or whether the partition has some magic flag to
allow it to boot on architecture X.
Also, since you must provide an incremental editing system when
editting, it is often easier to use this system when you are
parsing. That means you can't get rid of the editing system when
all you want to do is parse. In libparted, this includes a
constraint solver (about 7k), code to verify that there's space
for metadata, code to set partition types, flags...
In practice, all this code is hard to separate out, and it all
adds up. Perhaps this is an argument for maintaining two sets of
partition code. Feel free to look at the code, and decide for
yourself ;)
Andrew
next prev parent reply other threads:[~2002-01-02 0:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-01 18:57 userspace discovery of partitions Andrew Clausen
2002-01-01 20:18 ` [Evms-devel] " Andreas Dilger
2002-01-02 0:18 ` Andrew Clausen [this message]
2002-01-02 19:34 ` Christoph Hellwig
2002-01-02 20:37 ` Andrew Clausen
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=20020102111816.A869@gnu.org \
--to=clausen@gnu.org \
--cc=bug-parted@gnu.org \
--cc=evms-devel@lists.sourceforge.net \
--cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox