From: Tony Breeds <tony@bakeyournoodle.com>
To: Theodore Ts'o <tytso@mit.edu>, linux-ext4@vger.kernel.org
Subject: Re: Minimal configuration for e2fsprogs
Date: Wed, 27 Jun 2012 21:21:17 +1000 [thread overview]
Message-ID: <20120627112117.GA15231@thor.bakeyournoodle.com> (raw)
In-Reply-To: <20120615042421.GA7021@thor.bakeyournoodle.com>
[-- Attachment #1: Type: text/plain, Size: 3006 bytes --]
On Fri, Jun 15, 2012 at 02:24:21PM +1000, Tony Breeds wrote:
> Hi All,
> I appologise if this is not the correct place to discuss this,
> or if it's been discussed before. In either event please point me in
> the right direction and I'll move along.
>
> I'm the maintainer for yaboot a bootloader for powerpc systems. We link
> against libext2fs.a, but as we're a bootloader we do NOT link against
> libc as such we need to implement a number of "stub" functions to keep
> up with the newer features being added here.
Okay working with an e2fsprogs that has the various patches I've posted
to this list in the last few days I'm down to:
---
/home/tony/src/e2fsprogs/../e2fsprogs-root/lib/libext2fs.a(inline.o): In function `ext2fs_get_arrayzero':
/home/tony/src/e2fsprogs-build/lib/ext2fs/../../../e2fsprogs/lib/ext2fs/ext2fs.h:1521: undefined reference to `calloc'
/home/tony/src/e2fsprogs/../e2fsprogs-root/lib/libext2fs.a(blkmap64_rb.o): In function `rb_get_new_extent':
/home/tony/src/e2fsprogs-build/lib/ext2fs/../../../e2fsprogs/lib/ext2fs/blkmap64_rb.c:138: undefined reference to `perror'
/home/tony/src/e2fsprogs-build/lib/ext2fs/../../../e2fsprogs/lib/ext2fs/blkmap64_rb.c:139: undefined reference to `exit'
/home/tony/src/e2fsprogs/../e2fsprogs-root/lib/libext2fs.a(dblist.o): In function `ext2fs_dblist_sort2':
/home/tony/src/e2fsprogs-build/lib/ext2fs/../../../e2fsprogs/lib/ext2fs/dblist.c:217: undefined reference to `qsort'
/home/tony/src/e2fsprogs-build/lib/ext2fs/../../../e2fsprogs/lib/ext2fs/dblist.c:217: undefined reference to `qsort'
/home/tony/src/e2fsprogs/../e2fsprogs-root/lib/libext2fs.a(dblist.o): In function `ext2fs_dblist_sort':
/home/tony/src/e2fsprogs-build/lib/ext2fs/../../../e2fsprogs/lib/ext2fs/dblist.c:322: undefined reference to `qsort'
/home/tony/src/e2fsprogs-build/lib/ext2fs/../../../e2fsprogs/lib/ext2fs/dblist.c:322: undefined reference to `qsort'
---
As I've said adding calloc to yaboot is quite reasonable so we can
ignore this one.
Calling perror/exit from this deep in a library doesn't seem right to me I
think a better option would be to change rb_get_new_extent()
to return an errcode_t and pass that up the call chain. I'm happy to do
that. If I read rb_insert_extent() correctly I can simply return if
rb_get_new_extent() failed, as nothing as been changed at this point
you've only traversed the rb tree. The problem is that very few of the
callers of rb_insert_extent() actually check the return value :( so this
patch will be a little bigger than I'd like.
The qsort calls scare me a little. I expect that bad things would
happen if the directory block wasn't sorted. So just providing a
qsort() in yaboot that does nothing would be a bad thing. I'm
kind of hoping you'll just say "as long as you're opening the
file-system read-only the directory block will be sorted so don't sweat
it" Am I dreaming?
As always happy to do what I can if pointed in the right direction.
Yours Tony
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2012-06-27 11:21 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-15 4:24 Minimal configuration for e2fsprogs Tony Breeds
2012-06-16 0:08 ` Ted Ts'o
2012-06-18 5:58 ` Tony Breeds
2012-06-18 17:12 ` Ted Ts'o
2012-06-19 5:48 ` Tony Breeds
2012-06-19 6:01 ` Andreas Dilger
2012-06-19 13:56 ` Ted Ts'o
2012-06-20 5:26 ` Tony Breeds
2012-06-20 5:33 ` Tony Breeds
2012-06-20 14:14 ` Andreas Dilger
2012-06-20 4:45 ` Tony Breeds
2012-06-26 2:10 ` Tony Breeds
2012-06-26 2:33 ` Theodore Ts'o
2012-06-26 2:47 ` Tony Breeds
2012-06-27 11:21 ` Tony Breeds [this message]
2012-06-27 12:54 ` Theodore Ts'o
2012-06-28 2:43 ` Tony Breeds
2012-07-30 21:45 ` Theodore Ts'o
2012-07-31 5:21 ` Tony Breeds
2012-07-31 19:57 ` Theodore Ts'o
2012-08-01 5:42 ` Tony Breeds
2012-07-30 21:47 ` [PATCH 1/7] e2fsck: add SIGABRT to list of signals processed by sigcatcher Theodore Ts'o
2012-07-30 21:47 ` [PATCH 2/7] libext2fs: use abort() instead of perror()/exit() Theodore Ts'o
2012-07-31 18:34 ` Andreas Dilger
2012-07-31 20:04 ` Theodore Ts'o
2012-07-30 21:47 ` [PATCH 3/7] libext2fs: use strcpy()/strcat() instead of sprintf() in bmap functions Theodore Ts'o
2012-07-30 21:47 ` [PATCH 4/7] libext2fs: move ext2fs_get_num_dirs to its own file Theodore Ts'o
2012-07-30 21:47 ` [PATCH 5/7] libext2fs: call numeric_progress functions through a operations struct Theodore Ts'o
2012-07-30 21:47 ` [PATCH 6/7] libext2fs: remove debugging printf from ext2fs_group_desc_csum Theodore Ts'o
2012-07-30 21:47 ` [PATCH 7/7] libext2fs: enforce the block group descriptor size in ext2fs_open() Theodore Ts'o
2012-07-31 18:38 ` Andreas Dilger
2012-07-31 20:09 ` Theodore Ts'o
2012-08-01 20:45 ` Andreas Dilger
2012-08-03 0:00 ` Theodore Ts'o
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=20120627112117.GA15231@thor.bakeyournoodle.com \
--to=tony@bakeyournoodle.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/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.