[Jfs-discussion] Many error messages when booting Suse 7.3
Brought to you by:
blaschke-oss,
shaggyk
|
From: Dave K. <sh...@au...> - 2001-10-27 01:10:33
|
Michael,
There was a problem with the version of JFS that went into Suse 7.3 where
JFS complained when a device is written to during a read-only mount. This
is a real problem when booting from JFS. If you wait long enough when
booting, fsck will eventually finish and your system should be alright.
From the command line you need to run fsck with the -a flag, otherwise it
defaults to read-only. (This is fixed in the current version of the
utilities.) With the -a flag, it will still be slow and print the warnings.
Attached is a patch that will fix the problem. If you are building your
own kernel, you know what to do. If not, I can build a Suse kernel with the
fix, but I won't be able to get it done until next week.
Thanks,
Dave Kleikamp
Forwarded message:
> Date: Fri, 26 Oct 2001 15:53:18 -0400
> From: mic...@rz...
> To: jfs...@os...
> Subject: fs-crash after linux hang-up
>
> Full_Name: Michael Bell
> Version: 1.0.0 (?)
> OS: Linux 2.4.10-4GB
>
> Hi,
>
> my system is a SuSE 7.3. After a hang-up off KDE I turn off the power from my
> notebook. I use JFS as rootfilesystem (/dev/hda5 mounted on /). After the crash
> I get hunderts of lines like this:
>
> Is remount racy?
> jfs_dirty inode called on read-only volume
>
> After this and some Ctrl-C I get a prompt and do the following:
>
> 1. the usual way via remounting in mode read-write don't work. JFS
> reports:
>
> *** Log is Dirty ! ***
> mount : mount failed
>
> 2. fsck.jfs -v /dev/hda5 reports:
>
> Phase 1: Secondary file/directory allocation structure (2) is not a correct
> redundant copy of primary structure.
> Phase 2-6: nothing
> Phase 7: Errors detected in the Filesset File/Directory Allocation Map
> control information.
> Errors detected in the Filesset File/Directory Allocation Map
> Phase 8: Incorrect data detected in disk allocation structures.
> Incorrect data detected in disk allocation control structures.
>
> fsck cannot repare the filesystem because I cannot remount the filesystem. Do
> you have an idea to fix the problem or is this a real fs-crash?
>
> Unmounting the rootfilesystem is not a good idea and the normal way like for
> ext2
> (remount in rw-mode) don't work so.
>
> If you need some additional information please contact me.
>
> Thanks in advance Michael
------------------------ Here's the patch ---------------------------
diff -Naur linux24/fs/jfs/inode.c linux24.quiet/fs/jfs/inode.c
--- linux24/fs/jfs/inode.c Thu Sep 27 10:07:20 2001
+++ linux24.quiet/fs/jfs/inode.c Fri Oct 26 15:34:47 2001
@@ -87,6 +87,9 @@
make_bad_inode(inode);
}
+/* This define is from fs/open.c */
+#define special_file(m) (S_ISCHR(m)||S_ISBLK(m)||S_ISFIFO(m)||S_ISSOCK(m))
+
/*
* Workhorse of both fsync & write_inode
*/
@@ -94,13 +97,20 @@
{
int rc = 0;
int tid;
+ static int noisy = 5;
jFYI(1, ("In jfs_commit_inode, inode = 0x%p\n", inode));
if (isReadOnly(inode)) {
- jERROR(1,("jfs_commit_inode(0x%p) called on read-only volume\n",
- inode));
- jERROR(1,("Is remount racy?\n"));
+ /* kernel allows writes to devices on read-only
+ * partitions and may think inode is dirty
+ */
+ if(!special_file(inode->i_mode) && noisy) {
+ jERROR(1,("jfs_commit_inode(0x%p) called on "
+ "read-only volume\n", inode));
+ jERROR(1,("Is remount racy?\n"));
+ noisy--;
+ }
return 0;
}
@@ -160,9 +170,18 @@
void jfs_dirty_inode(struct inode *inode)
{
+ static int noisy = 5;
+
if (isReadOnly(inode)) {
- jERROR(1,("jfs_dirty inode called on read-only volume\n"));
- jERROR(1,("Is remount racy?\n"));
+ if(!special_file(inode->i_mode) && noisy) {
+ /* kernel allows writes to devices on read-only
+ * partitions and may try to mark inode dirty
+ */
+ jERROR(1,("jfs_dirty_inode called on "
+ "read-only volume\n"));
+ jERROR(1,("Is remount racy?\n"));
+ noisy--;
+ }
return;
}
|