public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Eric <erpo41@gmail.com>
Cc: linux-ext4 <linux-ext4@vger.kernel.org>
Subject: Re: Online defragmentation and ext4migrate
Date: Tue, 22 May 2007 13:28:31 +0200	[thread overview]
Message-ID: <20070522112831.GC27428@atrey.karlin.mff.cuni.cz> (raw)
In-Reply-To: <1179754611.389.10.camel@eric-laptop>

> On Mon, 2007-05-21 at 12:38 +0200, Jan Kara wrote:
> >   Yes. On the other hand I believe that some people would like to use
> > defragmentation but stay with ext3. For them conversion to extents is
> > no-go.
> > [...]
> >  I've written a patch that defragments non-extent files but after
> > discussion with XFS guys I've decided that the interfaces should be made
> > more generic, so that XFS and other filesystems can use them too...
> I see no reason why the ioctl to convert a file to extents and then
> defragment it should be different from the ioctl to defragment a
> non-extent file.
>
> After all, whether a file's blocks are tracked as lists of blocks or a
> set of extents is just bookkeeping, right? The set of data blocks that
> make up the file and their order is the same regardless of whether the
> extent flag is set in the inode.
  I agree that at least part of the interface should
be independent on the particular representation of data references -
especially because I want it to be useful for more filesystems than just
ext2/3/4. Currently I think that defragmenting data blocks itself can
have fs-independent interface. Of course, when you decide to defragment
metadata (i.e. indirect blocks, inodes, etc.) you have to have fs-specific
interfaces, probably ioctls...

> If the user is running the ext2/3 driver or the ext4 driver with the
> noextents option, just defragment the file. If the user is running ext4
> without the noextents option, convert to extents and then defragment.
  Defragmentation ioctl definitely should not touch the way the file is
represented. I.e. if the file uses indirect blocks it should use
indirect blocks after defragmentation. If it uses extents, it should use
extents afterwards too. It should be the userspace utility which decides
whether the file should be converted or not and uses appropriate call
for that...

> The only problem that I can think of is that defragmenting metadata
> (including indirect block and/or whatever the equivalent is in
> extent-land) presumably has performance benefits too, so maybe a
> defragmenter in userspace would want to have some knowledge/control over
> this process.
  Yes, it has measurable benefit (especially for indirect blocks) so
eventually we should do it.

								Honza
-- 
Jan Kara <jack@suse.cz>
SuSE CR Labs

      reply	other threads:[~2007-05-22 11:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-18 13:06 Online defragmentation and ext4migrate Aneesh Kumar K.V
2007-05-18 20:19 ` Eric
2007-05-18 21:05   ` Andreas Dilger
2007-05-21  8:33   ` Aneesh Kumar
2007-05-21 10:42     ` Jan Kara
2007-05-21 10:25 ` Takashi Sato
2007-05-21 10:37   ` Aneesh Kumar K.V
2007-05-22  8:35     ` Takashi Sato
2007-05-21 10:38   ` Jan Kara
2007-05-21 13:36     ` Eric
2007-05-22 11:28       ` Jan Kara [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=20070522112831.GC27428@atrey.karlin.mff.cuni.cz \
    --to=jack@suse.cz \
    --cc=erpo41@gmail.com \
    --cc=linux-ext4@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