Linux XFS filesystem development
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: "Steffen D." <sdumke@gmail.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: Fwd: mounting a xfs file system gives the message: "failure code -3003" and "structure needs cleaning"
Date: Tue, 1 Nov 2016 07:37:15 +1100	[thread overview]
Message-ID: <20161031203715.GV14023@dastard> (raw)
In-Reply-To: <CAPvv1vzDQO9iMNhXByGfXrbLEtMt=F1xFd1Ybr63AAuPfvA6iw@mail.gmail.com>

On Mon, Oct 31, 2016 at 09:20:56PM +0100, Steffen D. wrote:
> Hi Dave,
> 
> 2016-10-31 20:42 GMT+01:00 Dave Chinner <david@fromorbit.com>:
> > On Mon, Oct 31, 2016 at 08:29:37PM +0100, Steffen D. wrote:
> >> Hello again
> >> thanks to Carlos for the hint about the language.
> >> Here are the messages in english:
> >> ----------
> >> linux-ibbi:/home/steffen # LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8
> >> ...
> >
> > hmmm - AGFL sizing issue?
> >
> > What is the error in dmesg when you try to mount the filesystem?
> 
> ----------
> [46389.083808] XFS (sda4): Mounting V5 Filesystem
> [46389.193790] XFS (sda4): Starting recovery (logdev: internal)
> [46390.697811] XFS (sda4): Metadata corruption detected at
> xfs_agf_read_verify+0x5a/0x100 [xfs], block 0x1a1d6001
> [46390.697814] XFS (sda4): Unmount and run xfs_repair
> [46390.697815] XFS (sda4): First 64 bytes of corrupted metadata buffer:
> [46390.697817] ffff880213e2d600: 58 41 47 46 00 00 00 01 00 00 00 02 01 a1 d6 00  XAGF............
> [46390.697818] ffff880213e2d610: 00 72 fb d6 00 73 ee 3e 00 00 00 00 00 00 00 02  .r...s.>........
> [46390.697819] ffff880213e2d620: 00 00 00 02 00 00 00 00 00 00 00 76 00 00 00 06  ...........v....
> [46390.697820] ffff880213e2d630: 00 00 00 07 00 83 6d 93 00 28 47 02 00 00 00 29  ......m..(G....)
> [46390.697853] XFS (sda4): metadata I/O error: block 0x1a1d6001
> ("xfs_trans_read_buf_map") error 117 numblks 1

flfirst = 0x76 = 118
fllast = 0x6 = 6
flcount = 0x7 = 7

That implies you've some variant of this problem:

commit 96f859d52bcb1c6ea6f3388d39862bf7143e2f30
Author: Darrick J. Wong <darrick.wong@oracle.com>
Date:   Mon Jan 4 16:13:21 2016 +1100

    libxfs: pack the agfl header structure so XFS_AGFL_SIZE is correct
    
    Because struct xfs_agfl is 36 bytes long and has a 64-bit integer
    inside it, gcc will quietly round the structure size up to the nearest
    64 bits -- in this case, 40 bytes.  This results in the XFS_AGFL_SIZE
    macro returning incorrect results for v5 filesystems on 64-bit
    machines (118 items instead of 119).  As a result, a 32-bit xfs_repair
    will see garbage in AGFL item 119 and complain.
    
    Therefore, tell gcc not to pad the structure so that the AGFL size
    calculation is correct.
    
    cc: <stable@vger.kernel.org> # 3.10 - 4.4
    Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
    Reviewed-by: Dave Chinner <dchinner@redhat.com>
    Signed-off-by: Dave Chinner <david@fromorbit.com>


> ----------
> 
> > What hardware are you running on (cpu, ram, etc) and
> 
> Intel i5-4460 4 x 3.20 GHz
> 8 GB Ram
> HDD:
> sda: SCSI-SATA ST500DM002-1BD14
> sdd: Sandisk SDSSDP128G
> Linux OpenSuse 42.1

What kernel version? 32 bit or 64 bit?

> > where/how was
> > this filesystem created? Did it come from another machine?
> 
> Was created while installing the previous system (OpenSuse 13.2)

What kernel version was that?  32 bit or 64 bit?

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2016-10-31 20:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-30 20:36 mounting a xfs file system gives the message: "failure code -3003" and "structure needs cleaning" Steffen D.
2016-10-30 20:45 ` Carlos E. R.
2016-10-31 19:29   ` Fwd: " Steffen D.
2016-10-31 19:42     ` Dave Chinner
2016-10-31 20:20       ` Steffen D.
2016-10-31 20:37         ` Dave Chinner [this message]
2016-10-31 20:53           ` Steffen D.
2016-10-31 20:58             ` Dave Chinner
2016-10-31 21:09               ` Steffen D.
2016-10-31 21:25                 ` Dave Chinner
2016-10-31 21:31                 ` Carlos E. R.
     [not found]       ` <CAPvv1vxUW94s-NSkE9gXYLZLH=a-zP-2-r-fv=vhtMhQXeVX-A@mail.gmail.com>
     [not found]         ` <20161102204838.GD14023@dastard>
2016-11-02 21:05           ` Steffen D.

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=20161031203715.GV14023@dastard \
    --to=david@fromorbit.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sdumke@gmail.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