Hello community,
here is the log from the commit of package reiserfs
checked in at Thu Dec 6 16:31:00 CET 2007.
--------
--- reiserfs/reiserfs.changes 2007-08-13 21:02:25.000000000 +0200
+++ /mounts/work_src_done/STABLE/reiserfs/reiserfs.changes 2007-12-04 16:40:52.344262000 +0100
@@ -1,0 +2,11 @@
+Tue Dec 4 16:39:54 CET 2007 - jeffm@suse.com
+
+- Updated to 3.6.20
+ - Numerous fixes
+ - Code refactoring into saner directories
+ - Native >= 8 TB support
+
+- Added progress/spinner
+- Added fsck -a mount count and timestamping for faster booting
+
+-------------------------------------------------------------------
Old:
----
reiserfsprogs-3.6.19.tar.gz
reiserfsprogs-large-fs.diff
reiserfsprogs-progress.diff
reiserfsprogs-reorder-libs.diff
reiserfs.unaligned.patch
New:
----
reiserfsprogs-3.6.20.tar.gz
reiserfsprogs-better-fsck-a-behavior
reiserfsprogs-progspin.diff
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ reiserfs.spec ++++++
--- /var/tmp/diff_new_pack.Z27047/_old 2007-12-06 16:30:47.000000000 +0100
+++ /var/tmp/diff_new_pack.Z27047/_new 2007-12-06 16:30:47.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package reiserfs (Version 3.6.19)
+# spec file for package reiserfs (Version 3.6.20)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -8,19 +8,18 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
-# norootforbuild
Name: reiserfs
-BuildRequires: e2fsprogs-devel
-URL: http://www.namesys.com/download.html
+BuildRequires: autoconf e2fsprogs-devel libuuid-devel
+Url: http://www.namesys.com/download.html
Conflicts: libreiserfs-progs
Supplements: filesystem(reiserfs)
-Version: 3.6.19
-Release: 81
+Version: 3.6.20
+Release: 1
Summary: Reiser File System utilities
License: GPL v2 or later
Group: System/Filesystems
-Autoreqprov: on
+AutoReqProv: on
Source: ftp://ftp.namesys.com/pub/reiserfsprogs/reiserfsprogs-%{version}.tar.gz
Patch1: 02-mkreiserfs-quiet.diff
Patch2: broken-inline.diff
@@ -28,12 +27,10 @@
Patch4: reiserfsprogs-fsck-mapid.diff
Patch5: reiserfsprogs-external-journal-changes.diff
Patch6: reiserfsprogs-remove-stupid-fsck_sleep.diff
-Patch7: reiserfsprogs-progress.diff
-Patch8: reiserfsprogs-reorder-libs.diff
-Patch9: reiserfsprogs-mkfs-use-o_excl.diff
-Patch10: reiserfs.unaligned.patch
-Patch11: reiserfsprogs-large-fs.diff
-Patch12: reiserfsprogs-enforce-block-limit.diff
+Patch7: reiserfsprogs-mkfs-use-o_excl.diff
+Patch8: reiserfsprogs-enforce-block-limit.diff
+Patch9: reiserfsprogs-progspin.diff
+Patch10: reiserfsprogs-better-fsck-a-behavior
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@@ -55,8 +52,6 @@
%patch8 -p1
%patch9 -p1
%patch10 -p1
-%patch11 -p1
-%patch12 -p1
%build
autoreconf
@@ -67,9 +62,7 @@
%install
install -d ${RPM_BUILD_ROOT}/sbin
make DESTDIR=${RPM_BUILD_ROOT} install
-cd ${RPM_BUILD_ROOT}/sbin ; ln reiserfsck fsck.reiserfs
-cd ${RPM_BUILD_ROOT}/sbin ; ln mkreiserfs mkfs.reiserfs
-cd ${RPM_BUILD_ROOT}/%{_mandir}/man8 ; ln mkreiserfs.8 mkfs.reiserfs.8 ; ln reiserfsck.8 fsck.reiserfs.8
+cd ${RPM_BUILD_ROOT}/%{_mandir}/man8 ; ln mkfs.reiserfs.8 mkreiserfs.8 ; ln fsck.reiserfs.8 reiserfsck.8; ln tunefs.reiserfs.8 reiserfstune.8; ln debugfs.reiserfs.8 debugreiserfs.8
%files
%defattr(-, root, root)
@@ -80,6 +73,13 @@
rm -rf $RPM_BUILD_ROOT
%changelog
+* Tue Dec 04 2007 - jeffm@suse.com
+- Updated to 3.6.20
+ - Numerous fixes
+ - Code refactoring into saner directories
+ - Native >= 8 TB support
+- Added progress/spinner
+- Added fsck -a mount count and timestamping for faster booting
* Mon Aug 13 2007 - jeffm@suse.com
- Fixes for file systems >= 8 TiB
* Mon Aug 06 2007 - olh@suse.de
++++++ 02-mkreiserfs-quiet.diff ++++++
--- /var/tmp/diff_new_pack.Z27047/_old 2007-12-06 16:30:47.000000000 +0100
+++ /var/tmp/diff_new_pack.Z27047/_new 2007-12-06 16:30:47.000000000 +0100
@@ -1,15 +1,15 @@
-Index: reiserfsprogs-3.6.13/mkreiserfs/mkreiserfs.c
+Index: reiserfsprogs-3.6.13/utils/mkfs/mkreiserfs.c
===================================================================
---- reiserfsprogs-3.6.13.orig/mkreiserfs/mkreiserfs.c 2004-02-17 07:06:23.000000000 -0500
-+++ reiserfsprogs-3.6.13/mkreiserfs/mkreiserfs.c 2004-03-08 10:39:11.932317051 -0500
+--- reiserfsprogs-3.6.13.orig/utils/mkfs/mkreiserfs.c 2004-02-17 07:06:23.000000000 -0500
++++ reiserfsprogs-3.6.13/utils/mkfs/mkreiserfs.c 2004-03-08 10:39:11.932317051 -0500
@@ -656,8 +656,10 @@ int main (int argc, char **argv)
- print_banner (program_name);
+ util_print_banner (program_name);
-- misc_print_credit(stdout);
+- mkfs_print_credit(stdout);
- printf("\n");
+ if (!(mode & QUIET_MODE)) {
-+ misc_print_credit(stdout);
++ mkfs_print_credit(stdout);
+ printf("\n");
+ }
++++++ broken-inline.diff ++++++
--- /var/tmp/diff_new_pack.Z27047/_old 2007-12-06 16:30:47.000000000 +0100
+++ /var/tmp/diff_new_pack.Z27047/_new 2007-12-06 16:30:47.000000000 +0100
@@ -1,5 +1,5 @@
---- debugreiserfs/debugreiserfs.h
-+++ debugreiserfs/debugreiserfs.h
+--- utils/debugfs/debugreiserfs.h
++++ utils/debugfs/debugreiserfs.h
@@ -116,11 +116,11 @@
/* defined as inlines in both pack.c and unpack.c */
++++++ reiserfs-large-block-warning.diff ++++++
--- /var/tmp/diff_new_pack.Z27047/_old 2007-12-06 16:30:47.000000000 +0100
+++ /var/tmp/diff_new_pack.Z27047/_new 2007-12-06 16:30:47.000000000 +0100
@@ -7,9 +7,9 @@
adds a check and a warning in those conditions, informing the user of the
caveats of using a larger block size. It can be overridden with -f.
-diff -ruNp reiserfsprogs-3.6.19/mkreiserfs/mkreiserfs.c reiserfsprogs-3.6.19.devel/mkreiserfs/mkreiserfs.c
---- reiserfsprogs-3.6.19/mkreiserfs/mkreiserfs.c 2004-09-30 23:04:21.000000000 +0200
-+++ reiserfsprogs-3.6.19.devel/mkreiserfs/mkreiserfs.c 2005-06-22 19:26:58.221711866 +0200
+diff -ruNp reiserfsprogs-3.6.19/utils/mkfs/mkreiserfs.c reiserfsprogs-3.6.19.devel/utils/mkfs/mkreiserfs.c
+--- reiserfsprogs-3.6.19/utils/mkfs/mkreiserfs.c 2004-09-30 23:04:21.000000000 +0200
++++ reiserfsprogs-3.6.19.devel/utils/mkfs/mkreiserfs.c 2005-06-22 19:26:58.221711866 +0200
@@ -684,6 +684,9 @@ int main (int argc, char **argv)
if (!(mode & QUIET_MODE) && !can_we_format_it (device_name, force))
@@ -20,13 +20,24 @@
if (jdevice_name)
if (!(mode & QUIET_MODE) && !can_we_format_it (jdevice_name, force))
-diff -ruNp reiserfsprogs-3.6.19/reiserfscore/reiserfslib.c reiserfsprogs-3.6.19.devel/reiserfscore/reiserfslib.c
---- reiserfsprogs-3.6.19/reiserfscore/reiserfslib.c 2004-10-04 22:39:35.000000000 +0200
-+++ reiserfsprogs-3.6.19.devel/reiserfscore/reiserfslib.c 2005-06-22 20:07:38.015345826 +0200
-@@ -1175,6 +1175,24 @@ void make_sure_root_dir_exists (reiserfs
- &parent_root_dir_key, ih_flags);
+diff -ruNp reiserfsprogs-3.6.19/libreiserfs/super.c reiserfsprogs-3.6.19.devel/libreiserfs/super.c
+--- reiserfsprogs-3.6.19/libreiserfs/super.c 2004-10-04 22:39:35.000000000 +0200
++++ reiserfsprogs-3.6.19.devel/libreiserfs/super.c 2005-06-22 20:07:38.015345826 +0200
+@@ -1175,4 +1175,32 @@ void make_sure_root_dir_exists (reiserfs
+ reiserfs_warning (fp, "consistency is not checked after last mounting\n\n");
}
++#define reiserfs_confirm(force) \
++ if (force < 1) {\
++ /* avoid formatting it without being forced */\
++ reiserfs_warning (stderr, "Use -f to force over\n");\
++ return 0;\
++ }\
++ if (force < 2) {\
++ if (!util_user_confirmed (stderr, "Continue (y/n):", "y\n"))\
++ return 0;\
++ }\
++
+int block_size_ok (int blocksize, int force)
+{
+ int pagesize = getpagesize();
@@ -39,12 +50,9 @@
+ else
+ reiserfs_warning (stderr, "The newly created filesystem may not "
+ "be mountable on other systems.\n");
-+ check_forcing_ask_confirmation (force);
++ reiserfs_confirm (force);
+ }
+
+ return 1;
+}
-+
- /* we only can use a file for filesystem or journal if it is either not
- mounted block device or regular file and we are forced to use it */
++++++ reiserfsprogs-3.6.19.tar.gz -> reiserfsprogs-3.6.20.tar.gz ++++++
++++ 101536 lines of diff (skipped)
++++++ reiserfsprogs-better-fsck-a-behavior ++++++
++++ 764 lines (skipped)
++++++ reiserfsprogs-enforce-block-limit.diff ++++++
--- /var/tmp/diff_new_pack.Z27047/_old 2007-12-06 16:30:47.000000000 +0100
+++ /var/tmp/diff_new_pack.Z27047/_new 2007-12-06 16:30:48.000000000 +0100
@@ -20,16 +20,16 @@
Signed-off-by: Jeff Mahoney
---- a/mkreiserfs/mkreiserfs.c 2007-08-08 10:20:25.000000000 -0400
-+++ b/mkreiserfs/mkreiserfs.c 2007-08-13 14:33:00.000000000 -0400
+--- a/utils/mkfs/mkreiserfs.c 2007-08-08 10:20:25.000000000 -0400
++++ b/utils/mkfs/mkreiserfs.c 2007-08-13 14:33:00.000000000 -0400
@@ -28,6 +28,7 @@
- #include
+ #include
+ #include
#include
- #include
+#include
- #if defined(HAVE_LIBUUID) && defined(HAVE_UUID_UUID_H)
- # include
+ #ifdef HAVE_UNAME
+ #include
@@ -436,6 +435,21 @@ static int str2int (char * str)
return val;
}
@@ -83,7 +83,7 @@
+
+ if (optind == argc - 1) {
+ if (!force &&
-+ !user_confirmed (stderr, "Truncate? (y/N): ", "y\n")) {
++ !util_user_confirmed (stderr, "Truncate? (y/N): ", "y\n")) {
+ fprintf(stderr, "\nExiting.\n\n");
+ exit(1);
+ }
++++++ reiserfsprogs-external-journal-changes.diff ++++++
--- /var/tmp/diff_new_pack.Z27047/_old 2007-12-06 16:30:48.000000000 +0100
+++ /var/tmp/diff_new_pack.Z27047/_new 2007-12-06 16:30:48.000000000 +0100
@@ -27,33 +27,34 @@
Signed-off-by: Jeff Mahoney
-diff -ruNpx '*~' reiserfsprogs-3.6.19/include/reiserfs_lib.h reiserfsprogs-3.6.19-jeffm/include/reiserfs_lib.h
---- reiserfsprogs-3.6.19/include/reiserfs_lib.h 2004-10-01 12:19:34.000000000 -0400
-+++ reiserfsprogs-3.6.19-jeffm/include/reiserfs_lib.h 2005-11-23 18:31:33.000000000 -0500
-@@ -346,7 +346,7 @@ int reiserfs_open_journal (reiserfs_fils
- int reiserfs_journal_params_check(reiserfs_filsys_t *fs);
- int reiserfs_create_journal (reiserfs_filsys_t * fs, char * j_filename,
- unsigned long offset, unsigned long len,
-- int transaction_max_size);
-+ int transaction_max_size, int force);
+diff -ruNpx '*~' reiserfsprogs-3.6.19/include/reiserfs/journal.h reiserfsprogs-3.6.19-jeffm/include/reiserfs/journal.h
+--- reiserfsprogs-3.6.19/include/reiserfs/journal.h 2004-10-01 12:19:34.000000000 -0400
++++ reiserfsprogs-3.6.19-jeffm/include/reiserfs/journal.h 2005-11-23 18:31:33.000000000 -0500
+@@ -346,7 +346,8 @@ int reiserfs_open_journal (reiserfs_fils
+ char * j_filename,
+ unsigned long offset,
+ unsigned long len,
+- int transaction_max_size);
++ int transaction_max_size,
++ int force);
+
int reiserfs_journal_opened (reiserfs_filsys_t *);
- void reiserfs_flush_journal (reiserfs_filsys_t * fs);
- void reiserfs_free_journal (reiserfs_filsys_t * fs);
-diff -ruNpx '*~' reiserfsprogs-3.6.19/mkreiserfs/mkreiserfs.c reiserfsprogs-3.6.19-jeffm/mkreiserfs/mkreiserfs.c
---- reiserfsprogs-3.6.19/mkreiserfs/mkreiserfs.c 2004-09-30 17:04:21.000000000 -0400
-+++ reiserfsprogs-3.6.19-jeffm/mkreiserfs/mkreiserfs.c 2005-11-23 17:55:08.000000000 -0500
+
+diff -ruNpx '*~' reiserfsprogs-3.6.19/utils/mkfs/mkreiserfs.c reiserfsprogs-3.6.19-jeffm/utils/mkfs/mkreiserfs.c
+--- reiserfsprogs-3.6.19/utils/mkfs/mkreiserfs.c 2004-09-30 17:04:21.000000000 -0400
++++ reiserfsprogs-3.6.19-jeffm/utils/mkfs/mkreiserfs.c 2005-11-23 17:55:08.000000000 -0500
@@ -697,7 +697,7 @@ int main (int argc, char **argv)
}
- if (!reiserfs_create_journal (fs, jdevice_name, Offset, Journal_size,
+ if (!reiserfs_journal_create (fs, jdevice_name, Offset, Journal_size,
- Max_trans_size))
+ Max_trans_size, force))
{
return 1;
}
-diff -ruNpx '*~' reiserfsprogs-3.6.19/reiserfscore/journal.c reiserfsprogs-3.6.19-jeffm/reiserfscore/journal.c
---- reiserfsprogs-3.6.19/reiserfscore/journal.c 2004-10-13 09:05:15.000000000 -0400
-+++ reiserfsprogs-3.6.19-jeffm/reiserfscore/journal.c 2005-11-23 18:53:25.000000000 -0500
+diff -ruNpx '*~' reiserfsprogs-3.6.19/libreiserfs/journal.c reiserfsprogs-3.6.19-jeffm/libreiserfs/journal.c
+--- reiserfsprogs-3.6.19/libreiserfs/journal.c 2004-10-13 09:05:15.000000000 -0400
++++ reiserfsprogs-3.6.19-jeffm/libreiserfs/journal.c 2005-11-23 18:53:25.000000000 -0500
@@ -545,7 +545,8 @@ int reiserfs_create_journal(
char * j_device, /* journal device name */
unsigned long offset, /* journal offset on the j_device */
@@ -64,7 +65,7 @@
{
struct stat st;
struct buffer_head * bh;
-@@ -596,21 +597,46 @@ int reiserfs_create_journal(
+@@ -596,21 +597,47 @@ int reiserfs_create_journal(
"%lu, blocks on device %lu\n", offset, blocks);
return 0;
}
@@ -72,29 +73,30 @@
+ /* XXX jdm: This can end up being huge and could result
+ * in an unmountable file system:
+ * len = blocks - offset; */
-+ len = journal_default_size(fs->fs_super_bh->b_blocknr,
-+ fs->fs_blocksize) + 1;
++ len = reiserfs_journal_default(fs->fs_super_bh->b_blocknr,
++ fs->fs_blocksize) + 1;
+
}
-- if (len > journal_default_size (fs->fs_super_bh->b_blocknr,
-+ if (!force && len > journal_default_size (fs->fs_super_bh->b_blocknr,
+- if (len > reiserfs_journal_default (fs->fs_super_bh->b_blocknr,
++ if (!force &&
++ len > reiserfs_journal_default(fs->fs_super_bh->b_blocknr,
fs->fs_blocksize) + 1)
{
-+ unsigned long journal_max = journal_max_size (fs->fs_super_bh->b_blocknr, fs->fs_blocksize);
++ unsigned long journal_max = reiserfs_journal_max (fs->fs_super_bh->b_blocknr, fs->fs_blocksize);
fflush(stderr);
- reiserfs_warning (stdout, "NOTE: journal new size %lu is greater "
- "than default size %lu:\nthis may slow down initializing and "
- "mounting of the journal. Hope it is ok.\n\n", len,
-- journal_default_size(fs->fs_super_bh->b_blocknr,
+- reiserfs_journal_default(fs->fs_super_bh->b_blocknr,
- fs->fs_blocksize) + 1);
+ reiserfs_warning (stdout, "\n*** You've specified a journal "
+ "size larger than the default size of "
+ "%lu\n*** blocks. This may slow down "
+ "journal initialization and mounting "
+ "of\n*** the file system.%s",
-+ journal_default_size(fs->fs_super_bh->b_blocknr, fs->fs_blocksize) + 1,
++ reiserfs_journal_default(fs->fs_super_bh->b_blocknr, fs->fs_blocksize) + 1,
+ len > journal_max ? " " : "\n");
+ if (len > journal_max)
+ reiserfs_warning (stdout, "On 32-bit systems, and on "
@@ -116,15 +118,15 @@
+ "wasting space.\n\n", blocks, len);
+
if (blocks < offset + len) {
- reiserfs_warning (stderr, "reiserfs_create_journal: no enough "
+ reiserfs_warning (stderr, "reiserfs_journal_default: no enough "
"blocks on device %lu, needed %lu\n", blocks, offset + len);
-diff -ruNpx '*~' reiserfsprogs-3.6.19/tune/tune.c reiserfsprogs-3.6.19-jeffm/tune/tune.c
---- reiserfsprogs-3.6.19/tune/tune.c 2004-08-19 07:23:57.000000000 -0400
-+++ reiserfsprogs-3.6.19-jeffm/tune/tune.c 2005-11-23 18:33:09.000000000 -0500
+diff -ruNpx '*~' reiserfsprogs-3.6.19/utils/tune/tune.c reiserfsprogs-3.6.19-jeffm/utils/tune/tune.c
+--- reiserfsprogs-3.6.19/utils/tune/tune.c 2004-08-19 07:23:57.000000000 -0400
++++ reiserfsprogs-3.6.19-jeffm/utils/tune/tune.c 2005-11-23 18:33:09.000000000 -0500
@@ -710,7 +710,7 @@ int main (int argc, char **argv)
reiserfs_close_journal (fs);
- if (!reiserfs_create_journal (fs, j_new_device_name, Offset,
+ if (!reiserfs_journal_create (fs, j_new_device_name, Offset,
- Journal_size, Max_trans_size)) {
+ Journal_size, Max_trans_size, Force)) {
message ("Could not create new journal");
++++++ reiserfsprogs-fsck-mapid.diff ++++++
--- /var/tmp/diff_new_pack.Z27047/_old 2007-12-06 16:30:48.000000000 +0100
+++ /var/tmp/diff_new_pack.Z27047/_new 2007-12-06 16:30:48.000000000 +0100
@@ -5,9 +5,9 @@
the maximum are in use. The problem is that INDEX_COUNT ends up rounding down
and the last chunk isn't allocated, causing a segfault.
-diff -rup reiserfsprogs-3.6.19/fsck/uobjectid.c reiserfsprogs-3.6.19.devel/fsck/uobjectid.c
---- reiserfsprogs-3.6.19/fsck/uobjectid.c 2004-06-17 15:57:39.000000000 -0400
-+++ reiserfsprogs-3.6.19.devel/fsck/uobjectid.c 2006-04-20 15:18:26.000000000 -0400
+diff -rup reiserfsprogs-3.6.19/utils/fsck/uobjectid.c reiserfsprogs-3.6.19.devel/utils/fsck/uobjectid.c
+--- reiserfsprogs-3.6.19/utils/fsck/uobjectid.c 2004-06-17 15:57:39.000000000 -0400
++++ reiserfsprogs-3.6.19.devel/utils/fsck/uobjectid.c 2006-04-20 15:18:26.000000000 -0400
@@ -15,7 +15,7 @@
/* 2 bytes for the counter */
#define BM_SIZE (ALLOC_SIZE - sizeof(__u16))
++++++ reiserfsprogs-mkfs-use-o_excl.diff ++++++
--- /var/tmp/diff_new_pack.Z27047/_old 2007-12-06 16:30:48.000000000 +0100
+++ /var/tmp/diff_new_pack.Z27047/_new 2007-12-06 16:30:48.000000000 +0100
@@ -1,9 +1,9 @@
From: Jeff Mahoney
Subject: reiserfsprogs: mkfs should use O_EXCL
-diff -rup reiserfsprogs-3.6.19/reiserfscore/reiserfslib.c reiserfsprogs-3.6.19.devel/reiserfscore/reiserfslib.c
---- reiserfsprogs-3.6.19/reiserfscore/reiserfslib.c 2007-02-20 22:00:14.298557000 +0100
-+++ reiserfsprogs-3.6.19.devel/reiserfscore/reiserfslib.c 2007-02-20 22:01:47.703057000 +0100
+diff -rup reiserfsprogs-3.6.19/libreiserfs/filesystem.c reiserfsprogs-3.6.19.devel/libreiserfs/filesystem.c
+--- reiserfsprogs-3.6.19/libreiserfs/filesystem.c 2007-02-20 22:00:14.298557000 +0100
++++ reiserfsprogs-3.6.19.devel/libreiserfs/filesystem.c 2007-02-20 22:01:47.703057000 +0100
@@ -206,7 +206,7 @@ reiserfs_filsys_t * reiserfs_create (cha
return 0;
}
++++++ reiserfsprogs-progspin.diff ++++++
libreiserfs/journal.c | 30 ++++++++---
libutil/misc.c | 117 ++++++++++++++++++++++++++++++++++----------
utils/fsck/check_tree.c | 5 -
utils/fsck/pass0.c | 2
utils/fsck/pass1.c | 4 -
utils/fsck/pass2.c | 2
utils/fsck/semantic_check.c | 35 ++++++++++---
utils/fsck/uobjectid.c | 14 +++++
utils/fsck/utree.c | 4 -
9 files changed, 167 insertions(+), 46 deletions(-)
--- a/libreiserfs/journal.c 2007-12-04 10:37:26.000000000 -0500
+++ b/libreiserfs/journal.c 2007-12-04 10:37:27.000000000 -0500
@@ -156,7 +156,8 @@ int reiserfs_journal_get_transactions (r
reiserfs_bh_t * d_bh;
__u32 newest_trans_id, oldest_trans_id, trans_id;
int trans_nr;
-
+ unsigned int trans_count = newest->trans_id - oldest->trans_id;
+ unsigned int progress = 0;
sb = fs->fs_ondisk_sb;
j_start = reiserfs_jp_get_start (reiserfs_sb_jp (sb));
@@ -168,6 +169,10 @@ int reiserfs_journal_get_transactions (r
trans_nr = 0;
for (j_cur = 0; j_cur < j_size; j_cur ++) {
d_bh = reiserfs_buffer_read (fs->fs_journal_dev, j_start + j_cur, fs->fs_blocksize);
+
+ __util_misc_progress(stderr, "Reading journal", "trans", &progress,
+ trans_count, 1, 3);
+
if (!transaction_check_desc (fs, d_bh)) {
reiserfs_buffer_close (d_bh);
continue;
@@ -855,7 +860,8 @@ int reiserfs_journal_replay (reiserfs_fi
reiserfs_bh_t * bh;
struct reiserfs_journal_header * j_head;
reiserfs_trans_t cur, newest, control;
- int replayed, ret;
+ int replayed, ret, progress = 0;
+ unsigned int trans_count;
if (!reiserfs_journal_opened (fs))
reiserfs_panic ("reiserfs_journal_replay: journal is not opened");
@@ -865,18 +871,21 @@ int reiserfs_journal_replay (reiserfs_fi
"write perms");
}
- reiserfs_warning (stderr, "Replaying journal..\n");
+ reiserfs_warning (stderr, "Reading journal: ");
bh = fs->fs_jh_bh;
-
+
j_head = (struct reiserfs_journal_header *)(bh->b_data);
control.mount_id = reiserfs_jh_get_mount (j_head);
control.trans_id = reiserfs_jh_get_flushed (j_head);
control.desc_blocknr = reiserfs_jh_get_start (j_head);
- if (!reiserfs_journal_get_transactions (fs, &cur, &newest)) {
+ if (!(trans_count = reiserfs_journal_get_transactions (fs, &cur, &newest))) {
reiserfs_warning (stderr, "No transactions found\n");
return 0;
}
+ reiserfs_warning (stderr, "\rReading journal: Done\n");
+
+ reiserfs_warning (stderr, "Replaying journal: ");
/* Smth strange with journal header or journal. We cannot say for sure
what was the last replaied transaction, but relying on JH data is
@@ -901,7 +910,11 @@ int reiserfs_journal_replay (reiserfs_fi
(cur.trans_id != control.trans_id + 1 && control.trans_id))
break;
+ __util_misc_progress(stderr, "Replaying journal",
+ "trans", &progress, trans_count, 1, 1);
+
if (!transaction_check_content(fs, &cur)) {
+ util_misc_progress_clear(stderr);
reiserfs_warning (stderr, "Trans broken: mountid %lu, transid %lu, "
"desc %lu, len %lu, commit %lu, next trans "
"offset %lu\n", cur.mount_id, cur.trans_id,
@@ -920,21 +933,24 @@ int reiserfs_journal_replay (reiserfs_fi
control = cur;
replayed ++;
+
ret = next_transaction (fs, &cur, newest);
}
- reiserfs_warning (stderr, "Reiserfs journal '%s' in blocks [%u..%u]: %d "
+/* reiserfs_warning (stderr, "Reiserfs journal '%s' in blocks [%u..%u]: %d "
"transactions replayed\n", fs->fs_j_file_name,
reiserfs_jp_get_start(reiserfs_sb_jp(fs->fs_ondisk_sb)),
reiserfs_jp_get_start(reiserfs_sb_jp(fs->fs_ondisk_sb)) +
reiserfs_jp_get_size(reiserfs_sb_jp(fs->fs_ondisk_sb)) + 1,
- replayed);
+ replayed); */
reiserfs_buffer_mkdirty (fs->fs_super_bh);
reiserfs_buffer_write (fs->fs_super_bh);
update_journal_header (fs, bh, &newest);
+ reiserfs_warning (stderr, "\rReplaying journal: Done.\n");
+
return 0;
}
--- a/libutil/misc.c 2007-12-04 10:37:26.000000000 -0500
+++ b/libutil/misc.c 2007-12-04 10:37:37.000000000 -0500
@@ -81,6 +81,9 @@ static char * strs[] =
static char progress_to_be[1024];
static char current_progress[1024];
+static const char spinner[] = "\\|/-";
+static int spinner_pos;
+
static void str_to_be (char * buf, int prosents) {
int i;
prosents -= prosents % 4;
@@ -89,39 +92,105 @@ static void str_to_be (char * buf, int p
strcat (buf, strs[i]);
}
+static char bar[128], spaces[128];
-void util_misc_progress (FILE * fp, unsigned long * passed,
- unsigned long total, unsigned int inc,
- int forward)
+void util_misc_progress_clear(FILE *fp)
{
- int percent;
+ fprintf(fp, "\r%*s\r", 80, " ");
+}
- if (*passed == 0)
- current_progress[0] = 0;
+void __util_misc_progress(FILE *fp, const char *label, const char *units,
+ unsigned long *passed, unsigned long total,
+ unsigned int inc, int forward)
+{
+ int i;
+ unsigned int tick;
+ struct timeval tv;
+ int dpywidth = 75;
+ int fixed_percent;
+ float percent;
+ static struct timeval start;
+ static int last_percent;
+ static unsigned int last_tick;
+ static int spinner_pos;
+ int dpynum = forward & 1;
+ static char buf[80];
+ char tmp[21];
+ int speed = 0;
+ int nspaces, nbars;
+
+ /* First run */
+ if (*passed == 0) {
+ gettimeofday(&start, NULL);
+ memset(bar, '=', sizeof(bar) - 1);
+ memset(spaces, ' ', sizeof(spaces) - 1);
+ }
- (*passed) += inc;
- if (*passed > total) {
-/* fprintf (fp, "\nutil_misc_progress: total %lu has been "
- "reached already. cur=%lu\n", total, *passed);*/
- return;
- }
+ (*passed) += inc;
- percent = ((*passed) * 100) / total;
+ if (*passed > total)
+ return;
- str_to_be (progress_to_be, percent);
+ percent = ((float)*passed) / ((float) total) * 100;
+ fixed_percent = (int) ((10 * percent) + 0.5);
- if (strlen (current_progress) != strlen (progress_to_be)) {
- fprintf (fp, "%s", progress_to_be + strlen (current_progress));
- }
+ if (last_percent == fixed_percent)
+ return;
+ last_percent = fixed_percent;
+
+ gettimeofday(&tv, NULL);
+ tick = (tv.tv_sec << 3) + (tv.tv_usec / (1000000 / 8));
+ if ((tick == last_tick) &&
+ (fixed_percent != 0) && (fixed_percent != 1000))
+ return;
+ last_tick = tick;
+
+ if (label)
+ dpywidth -= strlen(label) - 2;
+ dpywidth &= ~0x7;
+ if (dpynum)
+ dpywidth -= 8;
+
+
+ if (forward != 1 && (tv.tv_sec != start.tv_sec || *buf))
+ snprintf(buf, sizeof(buf) - 1, " % 6u %s/sec",
+ *passed / (tv.tv_sec - start.tv_sec), units);
+
+ speed = strlen(buf);
+ dpywidth -= speed;
+ i = ((percent * dpywidth) + 50) / 100;
+
+ speed = fprintf(fp, "\r%s%s|%s%s| %c%s", label ? label : "",
+ label ? ": " : "", bar + sizeof(bar) - i - 1,
+ spaces + sizeof(spaces) - dpywidth + i,
+ spinner[++spinner_pos & 3], buf);
+
+ if (speed > 79)
+ fprintf(stderr, "WTF???? %u %u/%u\n", speed, i, dpywidth + i);
+
+ if (fixed_percent == 1000)
+ util_misc_progress_clear(fp);
+ fflush(fp);
+}
+
+void util_misc_progress (FILE * fp, unsigned long * passed,
+ unsigned long total, unsigned int inc,
+ int forward)
+{
+ __util_misc_progress(fp, NULL, NULL, passed, total, inc, forward);
+}
- strcat (current_progress, progress_to_be + strlen (current_progress));
+void
+util_spinner_touch(FILE *fp)
+{
+ static int pos;
+ fprintf(fp, "^H%c", spinner[++pos & 3]);
+}
- if (forward != 2) {
- util_misc_speed(fp, *passed /* - inc*/, forward ? 0 : total,
- strlen (progress_to_be), (*passed == inc) ? 1 : 0);
- }
-
- fflush (fp);
+void
+util_spinner_clear(FILE *fp)
+{
+ fputs("^H", fp);
}
static int screen_width = 0;
--- a/utils/fsck/check_tree.c 2007-12-04 10:37:26.000000000 -0500
+++ b/utils/fsck/check_tree.c 2007-12-04 10:37:27.000000000 -0500
@@ -813,14 +813,13 @@ void check_fs_tree (reiserfs_filsys_t *
{
fsck_tree_check_prep (fs);
- fsck_progress ("Checking Internal tree...\n");
+ fsck_progress ("Checking Internal tree: ");
fsck_tree_trav (fs, fsck_tree_check_node,
fsck_tree_check_path,
fsck_mode(fs) == FSCK_AUTO ? 2 : -1);
- if (!fsck_quiet(fs))
- fsck_progress("\n");
+ fsck_progress("\rChecking Internal tree: Done.\n");
/* compare created bitmap with the original */
if (fsck_mode(fs) == FSCK_AUTO) {
--- a/utils/fsck/pass0.c 2007-12-04 10:37:26.000000000 -0500
+++ b/utils/fsck/pass0.c 2007-12-04 10:37:27.000000000 -0500
@@ -1650,7 +1650,7 @@ static void do_pass_0 (reiserfs_filsys_t
continue;
if (!fsck_quiet(fs)) {
- util_misc_progress (fsck_progress_file (fs),
+ __util_misc_progress (fsck_progress_file (fs), "pass 0", "blocks",
&done, total, 1, 0);
}
--- a/utils/fsck/pass1.c 2007-12-04 10:37:26.000000000 -0500
+++ b/utils/fsck/pass1.c 2007-12-04 10:37:27.000000000 -0500
@@ -683,8 +683,8 @@ static void do_pass_1 (reiserfs_filsys_t
continue;
if (!fsck_quiet(fs)) {
- util_misc_progress (fsck_progress_file (fs),
- &done, total, 1, 0);
+ __util_misc_progress (fsck_progress_file (fs), "pass 1", "blocks",
+ &done, total, 1, 1);
}
/* at least one of nr_to_read blocks is to be checked */
--- a/utils/fsck/pass2.c 2007-12-04 10:37:26.000000000 -0500
+++ b/utils/fsck/pass2.c 2007-12-04 10:37:27.000000000 -0500
@@ -137,7 +137,7 @@ static void do_pass_2 (reiserfs_filsys_t
}
if (!fsck_quiet(fs)) {
- util_misc_progress (fsck_progress_file (fs),
+ __util_misc_progress (fsck_progress_file (fs), "pass 2", "nodes",
&done, total, 1, 0);
}
cont:
--- a/utils/fsck/semantic_check.c 2007-12-04 10:37:26.000000000 -0500
+++ b/utils/fsck/semantic_check.c 2007-12-04 10:37:27.000000000 -0500
@@ -356,11 +356,15 @@ start_again:
return dir_item;
}
+extern unsigned int reiserfs_objectid_use_count(reiserfs_filsys_t * fs);
+
+static int called = 0;
/* semantic pass of --check */
static int check_semantic_pass (const reiserfs_key_t * key,
const reiserfs_key_t * parent,
int dot_dot,
- reiserfs_ih_t * new_ih)
+ reiserfs_ih_t * new_ih,
+ unsigned int object_count)
{
reiserfs_path_t path;
void * sd;
@@ -381,8 +385,16 @@ static int check_semantic_pass (const re
/*int relocate;*/
int dir_format = 0;
__u16 mode;
-
retval = OK;
+ static unsigned int progress;
+ called++;
+
+ if (key == &root_dir_key) {
+ progress = 0;
+ }
+
+ __util_misc_progress(fsck_progress_file(fs), "Checking Semantic Tree",
+ "objects", &progress, object_count, 1, 3);
/* start_again: when directory was relocated */
@@ -573,22 +585,26 @@ static int check_semantic_pass (const re
/* do not go through "." and ".." */
ret = OK;
} else {
+ /*
if (!fsck_quiet(fs)) {
util_misc_print_name (fsck_progress_file(fs),
name, namelen);
}
+ */
if ((ret = add_path_key (&object_key)) == 0) {
ret = check_semantic_pass (&object_key, key,
is_dot_dot(name, namelen),
- &relocated_ih);
+ &relocated_ih, object_count);
del_path_key ();
}
+ /*
if (!fsck_quiet(fs)) {
util_misc_erase_name (fsck_progress_file(fs),
namelen);
}
+ */
}
/* check what check_semantic_tree returned */
@@ -811,8 +827,10 @@ void release_safe_links () {
misc_freemem(trunc_links);
}
+
/* called when --check is given */
void fsck_semantic_check (void) {
+ unsigned int object_count = reiserfs_objectid_use_count(fs);
if (fsck_data (fs)->check.bad_nodes) {
fsck_progress ("Bad nodes were found, Semantic pass skipped\n");
goto clean;
@@ -823,7 +841,7 @@ void fsck_semantic_check (void) {
goto clean;
}
- fsck_progress ("Checking Semantic tree...\n");
+ fsck_progress ("Checking Semantic tree: ");
if (fsck_mode(fs) == FSCK_FIX_FIXABLE) {
/*create new_bitmap, and initialize new_bitmap & allocable bitmap*/
@@ -840,8 +858,11 @@ void fsck_semantic_check (void) {
}
check_safe_links ();
-
- if (check_semantic_pass (&root_dir_key, &parent_root_dir_key, 0, 0) != OK) {
+
+
+
+ if (check_semantic_pass (&root_dir_key, &parent_root_dir_key,
+ 0, 0, object_count) != OK) {
fsck_log ("check_semantic_tree: No root directory found");
one_more_corruption (fs, FATAL);
}
@@ -863,6 +884,8 @@ void fsck_semantic_check (void) {
if (!fsck_quiet(fs))
util_misc_fini_name(fsck_progress_file(fs));
+
+ fsck_progress ("\rChecking Semantic tree: Done.\n");
clean:
if (fsck_deallocate_bitmap (fs))
--- a/utils/fsck/uobjectid.c 2007-12-04 10:37:26.000000000 -0500
+++ b/utils/fsck/uobjectid.c 2007-12-04 10:37:27.000000000 -0500
@@ -393,3 +393,17 @@ struct id_map * reiserfs_objectid_map_lo
id_map_free(id_map);
return NULL;
}
+
+unsigned int reiserfs_objectid_use_count(reiserfs_filsys_t * fs)
+{
+ struct id_map *map = id_map_init();
+ unsigned int count;
+
+ fetch_objectid_map(map, fs);
+
+ count = map->count;
+
+ id_map_free(map);
+
+ return count;
+}
--- a/utils/fsck/utree.c 2007-12-04 10:37:26.000000000 -0500
+++ b/utils/fsck/utree.c 2007-12-04 10:37:27.000000000 -0500
@@ -1118,8 +1118,8 @@ void fsck_tree_trav (reiserfs_filsys_t *
if ((path.path_length > REISERFS_PATH_OFFINIT) &&
!fsck_quiet(fs))
{
- util_misc_progress (fsck_progress_file (fs),
- &done, limit, 1, 2);
+ __util_misc_progress (fsck_progress_file (fs), "Checking Internal tree", "nodes",
+ &done, limit, 1, 3);
}
if (!problem && action2)
++++++ reiserfsprogs-remove-stupid-fsck_sleep.diff ++++++
--- /var/tmp/diff_new_pack.Z27047/_old 2007-12-06 16:30:48.000000000 +0100
+++ /var/tmp/diff_new_pack.Z27047/_new 2007-12-06 16:30:48.000000000 +0100
@@ -1,13 +1,20 @@
From: Jeff Mahoney
-Subject: reiserfsprogs: remove fsck_sleep
+Subject: [PATCH] reiserfsprogs: remove fsck_sleep
fsck_sleep causes the file descriptors to be kept open during mount.
Multipath/kpartx doesn't like that.
-diff -rup reiserfsprogs-3.6.19/fsck/main.c reiserfsprogs-3.6.19.devel/fsck/main.c
---- reiserfsprogs-3.6.19/fsck/main.c 2004-10-07 16:04:08.000000000 +0200
-+++ reiserfsprogs-3.6.19.devel/fsck/main.c 2007-02-14 00:42:41.388826000 +0100
-@@ -924,21 +924,6 @@ static void clean_attributes (reiserfs_f
+ Realistically, this optimization has always been suspect. It's useless now
+ that we don't load all the bitmaps on mount.
+
+Signed-off-by: Jeff Mahoney
+---
+ utils/fsck/main.c | 17 -----------------
+ 1 file changed, 17 deletions(-)
+
+--- a/utils/fsck/main.c 2007-11-26 17:47:22.000000000 -0500
++++ b/utils/fsck/main.c 2007-11-26 17:47:44.000000000 -0500
+@@ -953,21 +953,6 @@ static void clean_attributes (reiserfs_f
}
@@ -29,12 +36,12 @@
static int auto_check (reiserfs_filsys_t *fs) {
__u16 state;
int retval = 0;
-@@ -1005,8 +990,6 @@ static int auto_check (reiserfs_filsys_t
+@@ -1034,8 +1019,6 @@ static int auto_check (reiserfs_filsys_t
- clean_after_dma_check(fs->fs_dev, &dma_info);
+ util_device_dma_fini(fs->fs_dev, &dma_info);
- fsck_sleep();
-
- reiserfs_close (fs);
+ reiserfs_fs_close (fs);
/* do not do anything else. */
exit (EXIT_OK);
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org