linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Chinner <dgc@sgi.com>
To: Alex Tomas <alex@clusterfs.com>
Cc: David Chinner <dgc@sgi.com>, Jeff Garzik <jeff@garzik.org>,
	ext4 development <linux-ext4@vger.kernel.org>,
	linux-fsdevel@vger.kernel.org,
	Christoph Hellwig <hch@infradead.org>
Subject: Re: [RFC] basic delayed allocation in VFS
Date: Sun, 29 Jul 2007 19:18:07 +1000	[thread overview]
Message-ID: <20070729091807.GF31489@sgi.com> (raw)
In-Reply-To: <46A9A41C.7080104@clusterfs.com>

On Fri, Jul 27, 2007 at 11:51:56AM +0400, Alex Tomas wrote:
> David Chinner wrote:
> >Using a new API for new functionality is a bad thing?
> 
> if existing API can be used ...

Sure, but using the existing APIs is no good if the only filesystem
in the kernel that supports delalloc cannot use the new code....

> >Also, looking at the way mpage_da_map_blocks() is done - if we have
> >an 128MB delalloc extent - ext4 will allocate that will allocate it
> >in one go, right? What happens if we then crash after only writing a
> >few megabytes of that extent? stale data exposure? XFS can allocate
> >multiple gigabytes in a single get_blocks call so even if ext4 can't
> >do this, it's a problem for XFS.....
> 
> what happens if IO to 2nd MB is completed, while IO to 1st MB is not
> (probably sitting in queue) ? do you update on-disk size in this case?
> how do you track this?

We're updating the in-memory on-disk inode here, not the actual
inode on disk. That means that if we crashed right here, the file
size on disk would not be changed at all and the filesystem would
behave as if both writes did not ever occur and we simply end up
with empty "preallocated" blocks beyond EOF....

But this is really irrelevant - the issue at hand is what we want
for VFS level delalloc support. IMO, that mechanism needs to support
both XFS and ext4, and I'd prefer if it doesn't perpetuate the
bufferhead abuses of the past (i.e. define an iomap structure
instead of overloading bufferheads yet again).

> >So without the ability to attach specific I/O completions to bios
> >or support for unwritten extents directly in __mpage_writepage,
> >there is no way XFS can use this "generic" delayed allocation code.
> 
> I didn't say "generic", see Subject: :)

No, you didn't, but VFS level functionality implies that
functionality is both generic and able to be used by all
filesystems.....

Cheers,

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

  parent reply	other threads:[~2007-07-29  9:18 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-26  8:59 [RFC] basic delayed allocation in VFS Alex Tomas
2007-07-26 10:32 ` Jeff Garzik
2007-07-26 10:35   ` Alex Tomas
2007-07-26 12:05     ` Jeff Garzik
2007-07-26 13:33       ` Alex Tomas
2007-07-27  5:07         ` David Chinner
2007-07-27  7:51           ` Alex Tomas
2007-07-27 12:33             ` Jeff Garzik
2007-07-27 12:42               ` Alex Tomas
2007-07-28 19:56             ` Christoph Hellwig
2007-07-29  9:18             ` David Chinner [this message]
2007-07-29 12:09               ` Alex Tomas
2007-07-30  0:29                 ` David Chinner
2007-07-27 12:38           ` Alex Tomas
2007-07-28 19:57             ` Christoph Hellwig
2007-07-28 19:53           ` Christoph Hellwig
2007-07-28 19:51   ` Christoph Hellwig
2007-07-28 19:56     ` Alex Tomas
2007-07-29 17:30     ` Andreas Dilger
2007-07-29 17:48       ` Alex Tomas
2007-07-29 19:22         ` Christoph Hellwig
2007-07-29 19:24       ` Christoph Hellwig
2007-07-29 19:51         ` Alex Tomas
2007-07-30  0:28         ` Theodore Tso
2007-07-30 17:49         ` Mingming Cao
2007-07-30 19:43           ` Andrew Morton
2007-07-26 11:47 ` Aneesh Kumar K.V

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=20070729091807.GF31489@sgi.com \
    --to=dgc@sgi.com \
    --cc=alex@clusterfs.com \
    --cc=hch@infradead.org \
    --cc=jeff@garzik.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).