public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Barry Naujok" <bnaujok@melbourne.sgi.com>
To: 'Jonathan Groll' <lists@groll.co.za>
Cc: xfs@oss.sgi.com
Subject: Re: Unexpected inode type 0160000 causes abort of xfs_repair
Date: Thu, 23 Nov 2006 11:55:35 +1100	[thread overview]
Message-ID: <200611230052.LAA09114@larry.melbourne.sgi.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 898 bytes --]

Can you try the attached patch and see how xfs_repair goes? 

> -----Original Message-----
> From: xfs-bounce@oss.sgi.com [mailto:xfs-bounce@oss.sgi.com] 
> On Behalf Of Jonathan Groll
> Sent: Thursday, 23 November 2006 7:12 AM
> To: xfs@oss.sgi.com
> Subject: Unexpected inode type 0160000 causes abort of xfs_repair
> 
> I'm unsuccesfully trying to repair an XFS filesystem 
> 
> xfs_repair /dev/md1 and the same with -L both end with
> bad (negative) size -2150115811482766770 on inode 1539849750
> cleared inode 1539849750
> bad magic number 0x859b on inode 1539849751, resetting magic number
> bad version number 0xffffff88 on inode 1539849751, resetting version
> number
> Unexpected inode type 0160000 inode 1539849751
> Aborted
> 
> OS: debian sarge (stable)
> Kernel: 2.6.15.7
> xfsprogs       2.8.11-1
> 
> Is there anything I can possibly do?
> 
> Many thanks,
> Jonathan Groll
> 
> 




[-- Attachment #2: xfs_repair.diff --]
[-- Type: application/octet-stream, Size: 866 bytes --]

--- a/xfsprogs/repair/dinode.c	2006-11-23 11:47:17.000000000 +1100
+++ b/xfsprogs/repair/dinode.c	2006-11-23 11:40:31.219340329 +1100
@@ -2060,11 +2060,21 @@
 		type = XR_INO_FIFO;
 		break;
 	default:
-		type = XR_INO_UNKNOWN;
-		do_warn(_("Unexpected inode type %#o inode %llu\n"),
-			(int) (INT_GET(dinoc->di_mode, ARCH_CONVERT) & S_IFMT), lino);
-		abort();
-		break;
+		retval++;
+		if (!verify_mode)  {
+			do_warn(_("bad inode type %#o inode %llu\n"),
+				(int) (INT_GET(dinoc->di_mode, ARCH_CONVERT) & S_IFMT), lino);
+			if (!no_modify)  
+				*dirty += clear_dinode(mp, dino, lino);
+			else 
+				*dirty = 1;
+			*cleared = 1;
+			*used = is_free;
+		} else if (!uncertain)  {
+			do_warn(_("bad inode type %#o inode %llu\n"),
+				(int) (INT_GET(dinoc->di_mode, ARCH_CONVERT) & S_IFMT), lino);
+		}
+		return 1;
 	}
 
 	/*

             reply	other threads:[~2006-12-20 18:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-23  0:55 Barry Naujok [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-11-22 20:11 Unexpected inode type 0160000 causes abort of xfs_repair Jonathan Groll
2006-11-23  5:39 ` Chris Wedgwood
     [not found] ` <200611230047.LAA09023@larry.melbourne.sgi.com>
2006-11-23 13:14   ` Jonathan Groll
2006-11-23 23:58     ` Barry Naujok
2006-11-22 20:08 Jonathan Groll

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=200611230052.LAA09114@larry.melbourne.sgi.com \
    --to=bnaujok@melbourne.sgi.com \
    --cc=lists@groll.co.za \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox