From: Jaroslav Barton <jbarton@redhat.com>
To: xfs@oss.sgi.com
Subject: [xfstests]: add-reiserfs-specific-_check_reiserfs_filesystem patch
Date: Mon, 14 Sep 2009 08:46:52 +0200 [thread overview]
Message-ID: <200909140846.52217.jbarton@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 249 bytes --]
Hi,
I was on vacation last week.
I am using xfstests in my project and testing reiserfs filesystem. Reiserfsck
waits for confirmation before fsck is runned. This patch runs reiserfsck with
--yes parameter and confirmation is not needed.
Thanks
[-- Attachment #2: 0001-add-reiserfs-specific-_check_reiserfs_filesystem-fun.patch --]
[-- Type: text/x-patch, Size: 2417 bytes --]
From f34d69cbbcdde9fa973e8c3ddb7fa3e9b17c7305 Mon Sep 17 00:00:00 2001
From: Jaroslav Barton <jbarton@redhat.com>
Date: Fri, 4 Sep 2009 11:09:32 +0200
Subject: [PATCH] add reiserfs specific _check_reiserfs_filesystem function
The _check_generic_filesystem function doesn't start reiserfsck
correctly. Reiserfsck waits for user answer (user must write Yes,
but question is not visible). This specific function runs
reiserfsck with --yes parameter to awoid waiting for answer.
---
common.rc | 47 +++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 47 insertions(+), 0 deletions(-)
diff --git a/common.rc b/common.rc
index da5f99e..8b990ba 100644
--- a/common.rc
+++ b/common.rc
@@ -911,6 +911,50 @@ _check_extN_filesystem()
return 0
}
+_check_reiserfs_filesystem()
+{
+ device=$1
+
+ # If type is set, we're mounted
+ type=`_fs_type $device`
+ ok=1
+
+ if [ "$type" = "$FSTYP" ]
+ then
+ # mounted ...
+ mountpoint=`_umount_or_remount_ro $device`
+ fi
+
+ reiserfsck --yes $device >$tmp.fsck 2>&1
+ if [ $? -ne 0 ]
+ then
+ echo "_check_reiserfs_filesystem: filesystem on $device is inconsistent (see $seq.full)"
+
+ echo "_check_reiserfs_filesystem: filesystem on $device is inconsistent" >>$here/$seq.full
+ echo "*** reiserfsck output ***" >>$here/$seq.full
+ cat $tmp.fsck >>$here/$seq.full
+ echo "*** end reiserfsck output" >>$here/$seq.full
+
+ ok=0
+ fi
+ rm -f $tmp.fsck
+
+ if [ $ok -eq 0 ]
+ then
+ echo "*** mount output ***" >>$here/$seq.full
+ _mount >>$here/$seq.full
+ echo "*** end mount output" >>$here/$seq.full
+ elif [ "$type" = "$FSTYP" ]
+ then
+ # was mounted ...
+ _mount_or_remount_rw "$MOUNT_OPTIONS" $device $mountpoint
+ ok=$?
+ fi
+
+ [ $ok -eq 0 ] && exit 1
+ return 0
+}
+
# run xfs_check and friends on a FS.
_check_xfs_filesystem()
@@ -1082,6 +1126,9 @@ _check_test_fs()
ext2|ext3|ext4)
_check_extN_filesystem $TEST_DEV
;;
+ reiserfs)
+ _check_reiserfs_filesystem $TEST_DEV
+ ;;
*)
_check_generic_filesystem $TEST_DEV
;;
--
1.6.2.5
[-- Attachment #3: Type: text/plain, Size: 121 bytes --]
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next reply other threads:[~2009-09-14 6:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-14 6:46 Jaroslav Barton [this message]
2009-09-15 12:49 ` [xfstests]: add-reiserfs-specific-_check_reiserfs_filesystem patch Christoph Hellwig
2009-09-16 6:24 ` [PATCH] _check_generic_filesistem support for fsck parameters Jaroslav Barton
2009-09-16 12:57 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200909140846.52217.jbarton@redhat.com \
--to=jbarton@redhat.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.