linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Kleikamp <shaggy@austin.ibm.com>
To: David Chinner <dgc@sgi.com>
Cc: Jan Kara <jack@suse.cz>,
	linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org
Subject: Re: [RFC] Defragmentation interface
Date: Fri, 03 Nov 2006 08:50:44 -0600	[thread overview]
Message-ID: <1162565444.8604.7.camel@kleikamp.austin.ibm.com> (raw)
In-Reply-To: <20061102225953.GF8394166@melbourne.sgi.com>

On Fri, 2006-11-03 at 09:59 +1100, David Chinner wrote:

> Let me get this straight - the interface you propose for
> moving data about is:
> 
> 	read and process extents into an internal structure
> 	find range where you want to relocate
> 	find free space you want to relocate into
> 	write desired block to alloc_goal
> 	seek to allocation offset in data/alloc
> 	write length into data/alloc
> 	allocate new inode
> 	write new inode number into data/reloc to relocate blocks
> 
> What I proposed:
> 
> 	fcntl(src, FIBMAP);
> 	/* find range to relocate */
> 	open(tmp, O_CREATE);
> 	funlink(tmp);
> 	fs_get_free_list(src, policy, list);
> 	/* select free extent to use */
> 	fs_allocate_space(tmp, list[X], off, len);
> 	fs_move_data(src, tmp, off, len);
> 	close(tmp);
> 	close(src);
> 
> So the process is pretty close to the same except the interface I
> proposed does not change the location of the inode holding the data.
> The major difference is that one implementation requires 3 new
> generically useful syscalls, and the other requires every filesystem
> to implement a metadata filesystem and require root priviledges
> to use.

I agree with Dave here.  The metadata filesystem will require a lot of
overhead (and a lot of code) both in the kernel and in user-space.  The
only benefit I see, is that it can be easily extended.  This may be
useful for debugging and prototyping, but I don't like it as a solution
for adding a permanent interface.

Shaggy
-- 
David Kleikamp
IBM Linux Technology Center

      parent reply	other threads:[~2006-11-03 14:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-02 14:39 [RFC] Defragmentation interface Jan Kara
2006-11-02 22:59 ` David Chinner
2006-11-03 14:30   ` Jan Kara
2006-11-03 19:22     ` Andreas Dilger
2006-11-03 19:38       ` Jan Kara
2006-11-06  2:54     ` David Chinner
2006-11-06 17:44       ` Jan Kara
2006-11-07  3:03         ` David Chinner
2006-11-03 14:50   ` Dave Kleikamp [this message]

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=1162565444.8604.7.camel@kleikamp.austin.ibm.com \
    --to=shaggy@austin.ibm.com \
    --cc=dgc@sgi.com \
    --cc=jack@suse.cz \
    --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).