All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Chinner <dgc@sgi.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: David Chinner <dgc@sgi.com>,
	Jan Engelhardt <jengelh@linux01.gwdg.de>,
	Chuck Ebbert <cebbert@redhat.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: Tue, 15 May 2007 10:14:50 +1000	[thread overview]
Message-ID: <20070515001450.GS86004887@sgi.com> (raw)
In-Reply-To: <4645D594.4070801@goop.org>

On Sat, May 12, 2007 at 07:56:20AM -0700, Jeremy Fitzhardinge wrote:
> David Chinner wrote:
> > What I don't understand is that on unmount dirty xfs inodes get
> > written out. Clearly this is not happening - either there's a hole
> > in the writeback logic (unlikely - it was unchanged) or we've missed
> > some case where we need to update the filesize and mark the inode
> > dirty.
> >
> > Hmmmm - if the write was just a short append to the file, then the
> > block that was written to should already be mapped. Then we'll just
> > look up the extent by doing a BMAPI_READ lookup, set the type to
> > IOMAP_READ and add the block to ioend we are building.
> >   
> 
> Well, that result I mailed you showed that the difference was just over
> 16k, and that there was a 32 block difference in the final extent
> length.  Does that fit with this theory?

Yes - because when we do specualtive allocation of 64k beyond EOF
by default on appends....

> > The type IOMAP_READ determines the I/O completion behaviour - in this case
> > it is xfs_end_bio_read(), which fails to update the file size....
> >
> > Bingo.
> >
> > A patch for you to try, Jeremy. I've just started a test run on it...
> >   
> 
> Thanks, I'll give it a spin.  Have you reproduced the bug yourself?

No, not yet. I haven't had chance because I'm travelling at the moment....

Cheers,

Dave.
-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group

  reply	other threads:[~2007-05-15  0:15 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-09 21:09 2.6.21-git10/11: files getting truncated on xfs? or maybe an nlink problem? Jeremy Fitzhardinge
2007-05-09 21:55 ` Matt Mackall
2007-05-09 22:17   ` Jeremy Fitzhardinge
2007-05-09 22:44     ` Matt Mackall
2007-05-09 22:50       ` Jeremy Fitzhardinge
2007-05-09 23:16 ` David Chinner
2007-05-09 23:30   ` 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 [this message]
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=20070515001450.GS86004887@sgi.com \
    --to=dgc@sgi.com \
    --cc=cebbert@redhat.com \
    --cc=jengelh@linux01.gwdg.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.