On Fri, 2006-04-07 at 10:45 -0400, Dave Crane wrote:
> I have a 1.5tb filesystem fscking right now after errors overnight forced it 
> r/o.  is there a way to speed up the fsck by plugging the errors (or any 
> other way)?  The errors are.
> 
> Apr  7 03:13:29 big1 kernel: ERROR: (device md1): JFS:Dtree error: ino = 
> 27652598, bn=171546717, index = 4
> Apr  7 03:13:29 big1 kernel: ERROR: (device md1): JFS:Dtree error: ino = 
> 27652598, bn=171546717, index = 6
> Apr  7 03:13:29 big1 kernel: ERROR: (device md1): JFS:Dtree error: ino = 
> 27652598, bn=171546717, index = 7
> Apr  7 03:13:29 big1 kernel: ERROR: (device md1): JFS:Dtree error: ino = 
> 27652598, bn=171546717, index = 8
> Apr  7 03:13:29 big1 kernel: ERROR: (device md1): JFS:Dtree error: ino = 
> 27652598, bn=171546717, index = 14

I haven't seen this one before, or if I have, it's been a long time.  I
have no idea what might have caused it.  jfs is complaining because the
length of these directory entries doesn't match the number of slots used
to store the entry.  What kernel are you running?

> A temporary fix that would allow a fsck in 24 hours would be equally good, as 
> long as it would not result in (further) data loss.

You could stop fsck and mark the superblock as clean with jfs_debugfs:

jfs_debugfs /dev/md1
> sup
> m 12 0
> x
> q

Similarly, you could use the "dtree" subcommand in jfs_debugfs to fix up
the dtree for inode 27652598, but that could be a little tricky.

If you're willing to patch the kernel (or at least jfs.ko), this patch
will print the warning, up to 10 times, but not mark the file system
dirty.  Alternately, if you mount with -o errors=continue, jfs will
still mark the file system dirty, but it won't make it read-only.

> Thanks
> 
-- 
David Kleikamp
IBM Linux Technology Center
diff -urp linux-orig/fs/jfs/jfs_dtree.c linux/fs/jfs/jfs_dtree.c
--- linux-orig/fs/jfs/jfs_dtree.c	2006-04-03 07:54:49.000000000 -0500
+++ linux/fs/jfs/jfs_dtree.c	2006-04-07 10:01:23.000000000 -0500
@@ -3256,12 +3256,16 @@ int jfs_readdir(struct file *filp, void 
 				d_namleft -= len;
 				/* Sanity Check */
 				if (d_namleft == 0) {
-					jfs_error(ip->i_sb,
+					static int count = 10;
+					if (count) {
+						printk(KERN_ERR
 						  "JFS:Dtree error: ino = "
 						  "%ld, bn=%Ld, index = %d",
 						  (long)ip->i_ino,
 						  (long long)bn,
 						  i);
+						count--;
+					}
 					goto skip_one;
 				}
 				len = min(d_namleft, DTSLOTDATALEN);

Reply via email to