[Tux3] Makes VFS happy on logmap and fix one failed assertion in user space code

Ma Can macan at ncic.ac.cn
Thu Jan 8 00:37:36 PST 2009


This make VFS happy.

diff -Nur user_latest/kernel/super.c user/kernel/super.c
--- user_latest/kernel/super.c  2009-01-07 09:56:32.000000000 +0800
+++ user/kernel/super.c 2009-01-06 19:29:42.000000000 +0800
@@ -103,6 +103,7 @@

        iput(sbi->atable);
        iput(sbi->bitmap);
+       iput(sbi->logmap);

        sb->s_fs_info = NULL;
        kfree(sbi);

This eliminate the failed assertion on "buffer->count" and sync the
super to disk when delete one file.

diff -Nur user_latest/tux3.c user/tux3.c
--- user_latest/tux3.c  2009-01-07 09:56:32.000000000 +0800
+++ user/tux3.c 2009-01-07 20:29:10.000000000 +0800
@@ -254,7 +254,7 @@
                        goto eek;
                }
                inum_t inum = from_be_u64(entry->inum);
-               brelse(buffer);
+               //brelse(buffer); //Failed assertion "buffer->count"!
                struct inode *inode = &(struct inode){ .i_sb = sb, .inum
= inum, };
                if ((errno = -open_inode(inode)))
                        goto eek;
@@ -263,6 +263,8 @@
                if ((errno = -tux_delete_entry(buffer, entry)))
                        goto eek;
                tux_dump_entries(blockread(sb->rootdir->map, 0));
+               if ((errno = -sync_super(sb)))
+                       goto eek;
        }

        if (!strcmp(command, "truncate")) {
-- 
Ma Can

_______________________________________________
Tux3 mailing list
Tux3 at tux3.org
http://mailman.tux3.org/cgi-bin/mailman/listinfo/tux3



More information about the Tux3 mailing list