From: David Chinner <dgc@sgi.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: David Chinner <dgc@sgi.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Matt Mackall <mpm@selenic.com>,
xfs@oss.sgi.com
Subject: Re: 2.6.21-git10/11: files getting truncated on xfs? or maybe an nlink problem?
Date: Thu, 10 May 2007 09:16:43 +1000 [thread overview]
Message-ID: <20070509231643.GM85884050@sgi.com> (raw)
In-Reply-To: <4642389E.4080804@goop.org>
On Wed, May 09, 2007 at 02:09:50PM -0700, Jeremy Fitzhardinge wrote:
> I've had a couple of instances of a linux-2.6 mercurial repo getting
> corrupted in some odd way this morning. It looks like files are being
> truncated; not to size 0, but losing something off the end.
>
> This is on an xfs filesystem. I haven't had any crashes/oops, and I
> don't think its the normal files getting filled with 0 problem. I saw
> this before the most recent set of xfs updates, but it happened again
> afterwards too.
It looks like the latest XFS changes haven't been pulled yet, so
it's not new code that is triggering this....
> Mercurial uses a strictly append-only model for updating its repo files,
> but it looks like maybe an append operation didn't stick.
>
> I'm repulling a fresh copy of the repo; I'll be able to compare
> before/after. Update: yep, definitely truncated:
>
> $ ls -l .hg-new/store/data/_documentation/pi-futex.txt.i .hg-broken/store/data/_documentation/pi-futex.txt.i
> 4 -rw-rw-r-- 1 jeremy jeremy 3309 May 9 09:43 .hg-broken/store/data/_documentation/pi-futex.txt.i
> 4 -rw-rw-r-- 1 jeremy jeremy 3797 May 9 13:38 .hg-new/store/data/_documentation/pi-futex.txt.i
>
> also
> 3476 -rw-rw-r-- 1 jeremy jeremy 3558208 May 9 13:55 00manifest.i
> 3476 -rw-rw-r-- 1 jeremy jeremy 3555200 May 9 09:41 00manifest.i~
>
>
> where 00manifest.i~ is the broken one. The files are identical up to the
> truncation point.
Hmmm - that is bizarre. What is the output of xfs_bmap -vvp <filename>
on each of those files?
what happens to these files after then are downloaded? Does it only
happen to append-only files or are other files affected as well?
BTW, what's the 'xfs_info <mntpt>' output for this filesystem?
> The repo passed "hg verify" just after I pulled it, so this corruption
> came about after a while.
>
> Hm, the other possibility is that nlinks is being misreported. When
> cloning a repo, mercurial will generally hard-link files where possible,
> and then break the link if it sees nlink > 1. If xfs is mis-reporting
> the link count, then this will cause havok. Is that possible? Seems
> unlikely, but it would also explain the symptoms. I just did a linking
> clone with an older kernel, and the link count is as expected.
I'd be surprised if it was a link count problem - that would cause
all sorts of other problems as well....
> xfs_check passes without any output, which I presume is good.
Yes, it means everythign is ok. You only have to worry when xfs_check
says something - it only brings bad news ;)
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
next parent reply other threads:[~2007-05-09 23:16 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4642389E.4080804@goop.org>
2007-05-09 23:16 ` David Chinner [this message]
2007-05-09 23:30 ` 2.6.21-git10/11: files getting truncated on xfs? or maybe an nlink problem? Jeremy Fitzhardinge
2007-05-10 0:01 ` David Chinner
2007-05-10 0:04 ` Jeremy Fitzhardinge
2007-05-10 0:49 ` David Chinner
2007-05-10 0:54 ` Jeremy Fitzhardinge
2007-05-10 1:26 ` David Chinner
2007-05-10 14:46 ` Jeremy Fitzhardinge
2007-05-10 15:38 ` Matt Mackall
2007-05-12 11:21 ` Jan Engelhardt
2007-05-12 12:46 ` Matt Mackall
2007-05-14 20:16 ` Jan Engelhardt
2007-05-14 20:27 ` Jeremy Fitzhardinge
2007-05-10 21:13 ` David Chinner
2007-05-10 21:23 ` Matt Mackall
2007-05-10 21:32 ` Jeremy Fitzhardinge
2007-05-10 21:49 ` Jeremy Fitzhardinge
2007-05-10 21:41 ` Chuck Ebbert
2007-05-10 21:46 ` Jeremy Fitzhardinge
2007-05-10 21:51 ` Chuck Ebbert
2007-05-10 21:54 ` Jeremy Fitzhardinge
2007-05-10 22:58 ` David Chinner
2007-05-10 23:07 ` Jeremy Fitzhardinge
2007-05-10 23:27 ` David Chinner
2007-05-10 23:49 ` Jeremy Fitzhardinge
2007-05-11 0:32 ` David Chinner
2007-05-11 14:48 ` Jeremy Fitzhardinge
2007-05-12 7:56 ` David Chinner
2007-05-12 11:23 ` Jan Engelhardt
2007-05-12 13:51 ` David Chinner
2007-05-12 14:56 ` Jeremy Fitzhardinge
2007-05-15 0:14 ` David Chinner
2007-05-15 19:24 ` Jeremy Fitzhardinge
2007-05-10 23:07 ` David Chinner
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=20070509231643.GM85884050@sgi.com \
--to=dgc@sgi.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mpm@selenic.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox