bug-parted
[Top][All Lists]
Advanced

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

Re: Support for ReiserFS


From: Yury Umanets
Subject: Re: Support for ReiserFS
Date: Tue, 05 Oct 2004 15:10:16 +0300
User-agent: Mozilla Thunderbird 0.8 (X11/20040913)

Szakacsits Szabolcs wrote:

On Sat, 2 Oct 2004, Yury Umanets wrote:

That 0.3.0.5 version fixes some bugs, also it adds small tree check,
which should be used before resizing, as we suspected, that when
corruption happens during resize, reiserfs is in bad state (like some
nodes are corrupted and at least has invalid level field). Also patch
to parted list to use that check function was sent (no anwer so far).

Maybe it didn't arrive. I don't remember reiserfs patch, only an update.
By searching the archive, it seems, your last email was about sending an
update: http://lists.gnu.org/archive/html/bug-parted/2004-05/msg00024.html

I have also newer version 0.3.0.6. It fixes some not critical bugs in resize bitmap stuff, in regression test and has some cleanups. Will put it somewhere in net soon.

Great news!

        Szaka



_______________________________________________
Bug-parted mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bug-parted


Ok, sending patch once more. It is against 1.6.10, but very small, so, should not make some troubles.

--
umka

diff -rupN ./parted-1.6.10.orig/configure.in ./parted-1.6.10.check/configure.in
--- ./parted-1.6.10.orig/configure.in   2004-04-16 03:22:07.000000000 +0300
+++ ./parted-1.6.10.check/configure.in  2004-04-19 13:47:09.000000000 +0300
@@ -239,6 +239,9 @@ if test "$enable_dynamic_loading" = no -
                        REISER_LIBS="-ldal -lreiserfs"
                        AC_DEFINE(HAVE_LIBREISERFS, 1, [Have libreiserfs])
                )
+               AC_CHECK_LIB(reiserfs, reiserfs_fs_check,
+                       AC_DEFINE(HAVE_REISERFS_FS_CHECK, 1, [Have 
reiserfs_fs_check()])
+               )
        )
        LIBS="$OLD_LIBS"
 fi
diff -rupN ./parted-1.6.10.orig/libparted/fs_reiserfs/reiserfs.c 
./parted-1.6.10.check/libparted/fs_reiserfs/reiserfs.c
--- ./parted-1.6.10.orig/libparted/fs_reiserfs/reiserfs.c       2002-08-10 
03:47:33.000000000 +0300
+++ ./parted-1.6.10.check/libparted/fs_reiserfs/reiserfs.c      2004-04-19 
13:55:34.000000000 +0300
@@ -100,8 +100,11 @@ FCLASS reiserfs_fs_t* (FPTR reiserfs_fs_
                                          reiserfs_gauge_t *);
 
 FCLASS int (FPTR reiserfs_fs_resize) (reiserfs_fs_t *, blk_t, reiserfs_gauge_t 
*);
+FCLASS int (FPTR reiserfs_fs_check) (reiserfs_fs_t *, reiserfs_gauge_t *);
+
 FCLASS reiserfs_fs_t *(FPTR reiserfs_fs_copy) (reiserfs_fs_t *, dal_t *,
                                        reiserfs_gauge_t *);
+
 FCLASS int (FPTR reiserfs_fs_clobber) (dal_t *);
 FCLASS void (FPTR reiserfs_fs_close) (reiserfs_fs_t *);
 
@@ -383,6 +386,7 @@ static PedConstraint *reiserfs_get_creat
 static int reiserfs_check(PedFileSystem *fs, PedTimer *timer)
 {
        reiserfs_fs_t *fs_info;
+       reiserfs_gauge_t *gauge = NULL;
 
        PED_ASSERT(fs != NULL, return 0);
 
@@ -410,6 +414,34 @@ static int reiserfs_check(PedFileSystem 
                return 0;
        }
 
+#ifdef HAVE_REISERFS_FS_CHECK
+       ped_timer_reset(timer);
+       
+       if (libreiserfs_gauge_create && libreiserfs_gauge_free) {
+               if (!
+                   (gauge =
+                    libreiserfs_gauge_create(NULL, gauge_handler, timer)))
+                       return 0;
+       }
+               
+       ped_timer_set_state_name(timer, _("checking"));
+       ped_timer_update(timer, 0.0);
+
+       if (!reiserfs_fs_check(fs_info, gauge)) {
+               ped_exception_throw(PED_EXCEPTION_ERROR,
+                                   PED_EXCEPTION_CANCEL,
+                                   _
+                                   ("Reiserfs tree seems to be corrupted. "
+                                    "Run reiserfsck --check first."));
+               return 0;
+       }
+       
+       ped_timer_update(timer, 1.0);
+
+       if (gauge)
+               libreiserfs_gauge_free(gauge);
+#endif
+       
        ped_exception_throw(PED_EXCEPTION_INFORMATION, PED_EXCEPTION_OK,
                            _
                            ("The reiserfs filesystem passed a basic check.  
For a more "

reply via email to

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