-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,
Jonas Fietz wrote:
> user/super.c. I hope this is correct;
As one could have expected, it was not completely correct.
Here the updated patch


# HG changeset patch
# User Jonas Fietz <[EMAIL PROTECTED]>
# Date 1228164250 -3600
# Node ID 965fa90edabda66d20d01b628ee1a902de7951f1
# Parent  954112a5893e0da997d469a068b29108b07323b0
Fixed unitialized sb->atomref_base and sb->unatom_base and corrected
computation of unatom_base to not include the unitialized value of
itself but the value of atomref_base as an offset

diff --git a/user/kernel/super.c b/user/kernel/super.c
- --- a/user/kernel/super.c
+++ b/user/kernel/super.c
@@ -41,6 +41,8 @@
        sb->nextalloc = from_be_u64(super->nextalloc);
        sb->atomgen = from_be_u32(super->atomgen);
        sb->freeatom = from_be_u32(super->freeatom);
+       sb->atomref_base = 1 << (40 - sb->blockbits); // see xattr.c
+       sb->unatom_base = sb->atomref_base + (1 << (34 - sb->blockbits));

        return 0;
 }
diff --git a/user/super.c b/user/super.c
- --- a/user/super.c
+++ b/user/super.c
@@ -93,7 +93,7 @@
        if (!(sb->atable = new_inode(sb, TUX_ATABLE_INO)))
                goto eek;
        sb->atomref_base = 1 << (40 - sb->blockbits); // see xattr.c
- -     sb->unatom_base = sb->unatom_base + (1 << (34 - sb->blockbits));
+       sb->unatom_base = sb->atomref_base + (1 << (34 - sb->blockbits));
        sb->atomgen = 1; // atom 0 not allowed, means end of atom freelist
        if (make_inode(sb->atable, &(struct tux_iattr){ }))
                goto eek;
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAkk0TSEACgkQydrGfzV1md0O9gCglX/HI8D0tdiq2ekNgxSZEmsE
n4MAoLVY1pI94ZvP3cWF0LJ7JqSMcI8/
=bJLD
-----END PGP SIGNATURE-----

_______________________________________________
Tux3 mailing list
[email protected]
http://tux3.org/cgi-bin/mailman/listinfo/tux3

Reply via email to