* 64-bit dblists
@ 2008-10-27 20:59 Valerie Aurora Henson
2008-11-03 3:09 ` Theodore Tso
0 siblings, 1 reply; 3+ messages in thread
From: Valerie Aurora Henson @ 2008-10-27 20:59 UTC (permalink / raw)
To: linux-ext4; +Cc: Theodore Tso, Jose R. Santos
Hi all,
In my continuing quest to finish the 64-bit conversion of e2fsprogs, I
ran into this structure exported in ext2fs.h:
struct ext2_db_entry {
ext2_ino_t ino;
blk_t blk;
int blockcnt;
};
The "blk_t" is the problem here - we need a blk64_t. A pointer to
this structure is passed to the user-provided directory block iterator
in ext2fs_dblist_iterate().
Assuming the goal is to preserve the ext2fs_dblist ABI, I can see two
ways of doing this:
1. Define ext2_db_entry2, ext2_dblist2, and ext2fs_dblist_*2() and do
the usual translation/conversion function business.
2. Use the magic number in the dblist to differentiate between old and
new-style dblists and keep the existing interfaces for functions that
only pass around pointers. We'll also need ext2fs_dblist_iterate2()
and ext2fs_get_last2().
I find option #1 slightly less unpalatable than #2. Does anyone have
an option #3?
-VAL
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 64-bit dblists
2008-10-27 20:59 64-bit dblists Valerie Aurora Henson
@ 2008-11-03 3:09 ` Theodore Tso
2008-11-12 16:48 ` Valerie Aurora Henson
0 siblings, 1 reply; 3+ messages in thread
From: Theodore Tso @ 2008-11-03 3:09 UTC (permalink / raw)
To: Valerie Aurora Henson; +Cc: linux-ext4, Jose R. Santos
On Mon, Oct 27, 2008 at 04:59:10PM -0400, Valerie Aurora Henson wrote:
> Hi all,
>
> In my continuing quest to finish the 64-bit conversion of e2fsprogs, I
> ran into this structure exported in ext2fs.h:
>
> struct ext2_db_entry {
> ext2_ino_t ino;
> blk_t blk;
> int blockcnt;
> };
>
> The "blk_t" is the problem here - we need a blk64_t. A pointer to
> this structure is passed to the user-provided directory block iterator
> in ext2fs_dblist_iterate().
>
> Assuming the goal is to preserve the ext2fs_dblist ABI, I can see two
> ways of doing this:
>
> 1. Define ext2_db_entry2, ext2_dblist2, and ext2fs_dblist_*2() and do
> the usual translation/conversion function business.
The dblist.c and dblist_dir.c functions are so small that it's
probably not worth it to do translaction/conversation functions; it's
basically just a linked list convenience function implementation.
My suggestion is to just create a dblist2.c and dblist_dir2.c, and
just make a 64-bit version of the directory block list abstraction.
My guess that size of the conversaion functions would be bigger than a
new 64-bit version of the abstraction. (The object size of dblist.o
and dblist_dir.o combined is only about 1.5k)
- Ted
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 64-bit dblists
2008-11-03 3:09 ` Theodore Tso
@ 2008-11-12 16:48 ` Valerie Aurora Henson
0 siblings, 0 replies; 3+ messages in thread
From: Valerie Aurora Henson @ 2008-11-12 16:48 UTC (permalink / raw)
To: Theodore Tso; +Cc: linux-ext4, Jose R. Santos
On Sun, Nov 02, 2008 at 10:09:36PM -0500, Theodore Tso wrote:
> On Mon, Oct 27, 2008 at 04:59:10PM -0400, Valerie Aurora Henson wrote:
> > Hi all,
> >
> > In my continuing quest to finish the 64-bit conversion of e2fsprogs, I
> > ran into this structure exported in ext2fs.h:
> >
> > struct ext2_db_entry {
> > ext2_ino_t ino;
> > blk_t blk;
> > int blockcnt;
> > };
> >
> > The "blk_t" is the problem here - we need a blk64_t. A pointer to
> > this structure is passed to the user-provided directory block iterator
> > in ext2fs_dblist_iterate().
> >
> > Assuming the goal is to preserve the ext2fs_dblist ABI, I can see two
> > ways of doing this:
> >
> > 1. Define ext2_db_entry2, ext2_dblist2, and ext2fs_dblist_*2() and do
> > the usual translation/conversion function business.
>
> The dblist.c and dblist_dir.c functions are so small that it's
> probably not worth it to do translaction/conversation functions; it's
> basically just a linked list convenience function implementation.
>
> My suggestion is to just create a dblist2.c and dblist_dir2.c, and
> just make a 64-bit version of the directory block list abstraction.
> My guess that size of the conversaion functions would be bigger than a
> new 64-bit version of the abstraction. (The object size of dblist.o
> and dblist_dir.o combined is only about 1.5k)
Thanks! This is what I'm doing currently.
-VAL
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-11-12 16:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-27 20:59 64-bit dblists Valerie Aurora Henson
2008-11-03 3:09 ` Theodore Tso
2008-11-12 16:48 ` Valerie Aurora Henson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).