[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ext2fs 2GB limit status?

From: Ognyan Kulev
Subject: Re: Ext2fs 2GB limit status?
Date: Sun, 21 Sep 2003 09:34:46 +0300
User-agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5b) Gecko/20030917 Thunderbird/0.3a

Marco Gerards wrote:
Ogi (I hope he is subscribed to this list) wrote some patches for the Hurd so
ext2fs can support large partitions.  It seems to me that not many
people have looked at these patches :(.  Having a >2GB capable ext2fs
is very important to me.

The people that commented on this patch are less that the fingers of one of my hands ;-)

The thing that bothered me when reading these patches was that byte
offsets were used quite often.  This will make it not possible to use
partitions bigger than 4GB in some circumstances.

All used byte offsets should be 64-bit (off_t). My main target was to _quickly_ release patch that works. That's the reason that I made as few changes to the original design as possible. Applying ext2fs patch that works fine is higher priority than improving the code.

Most likely I forgot some.  Especially the pokel stuff might be bad.
Another use for these functions was to read/write the superblock;
although it isn't that bad, it would be better if you didn't use byte
offsets for this.

Perhaps this problem can be fixed by removing all these functions so
they can't be used accidently.  I see no reason to have these
functions anyway.

I will need some days to go deeper about these.

Another thing I've noticed in the patch were changes in the amount of
whitespaces.  This isn't a big problem (for me), it is just something
to lookout for when sending in the definite patch, here is an example:

-     * We have succeeded in finding a free byte in the block
-     * bitmap.  Now search backwards up to 7 bits to find the
-     * start of this group of free blocks.
+   * We have succeeded in finding a free byte in the block
+   * bitmap.  Now search backwards up to 7 bits to find the
+   * start of this group of free blocks.

Yes, there is changed whitespace in some places. In all of them, it's done the way Emacs do it. In this particular example, I think that * are aligned to the leading /* or something like that. AFAIR I've made such whitespace changes in the legacy ext2 code from Linux.

The last thing I mentioned was this:

+#if 1
       err = find_block (node, offset, &block, &lock);
       if (err)
       assert (block);
+      /* XXX: I still haven't investigated why this is needed...  */
+      err = ext2_getblk (node, offset >> log2_block_size, 1, &block);
+      if (err)
+       break;

I'm not really an ext2fs expert, but I think this is used for sparse
files.  Ext2fs doesn't allocate blocks when seeking, it just makes the
file sparse.  So the blocks get allocated just before they are written
to disk.

As you see, the original code is compiled by default. The #else is just garbage, it _was_ required because of some bugs that are gone now. I believe it can be removed safely, as other #if 0 in the code.

I also have a question about the code.  The assembly code "int $3" is
used.  AFAIK this is used to tell the debugger a breakpoint is
reached, right?  When is this function (abort) called?

Well, this is why it is called alpha ;-) There was a time when assertions failed very often. When they fail, they call abort(), which I replaced with the function you saw and which contains this "int $3". This is solely for debugging purposes.

Now, about the future of ext2fs. I won't be able to work on it much till the end of November. So if you, or anyone else, want to work on it, it will be best if we put it on hurd-extras or some other public place where changes can be made by many people. (We can forget about changelogs till release candidate status.)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]