All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kazuya Mio <k-mio@sx.jp.nec.com>
To: andreas@rid-net.de
Cc: linux-ext4@vger.kernel.org
Subject: Re: defragmentation of boot related files
Date: Thu, 26 Aug 2010 17:50:59 +0900	[thread overview]
Message-ID: <4C762AF3.8020303@sx.jp.nec.com> (raw)
In-Reply-To: <4C7505C3.1070509@rid-net.de>

Hi Andreas,
Thanks for the comments.

2010/08/25 21:00, andreas@rid-net.de wrote:
> Is there a reason why the offset of the original file and the donor file 
> must be the same?

e4defrag creates a donor file whose size is the same of the original file by
fallocate. There is a possibility that the original file will be corrupted
after moving an extent if the offset of the original file and the donor file
are different. So they are checked in the kernel space, but it may be
unnecessary from the point of view of the ioctl.

> As i can see the patch for relevant file defragmentation in e4defrag 
> supports only directories. May it be possible to select any desired file?

That's interesting. I came up with the new interface of e4defrag -r.
What do you think the following implementation idea?

Usage: e4defrag -r directory...| device...
       e4defrag -r base_file move_file...     <--- new

1. Defrag base_file to reduce fragmentation of extents (call EXT4_IOC_MOVE_EXT)
2. Preallocate physical blocks near the data blocks of base_file
3. Move move_file's extents to the blocks that are allocated by (2).
4. Repeat (2) and (3) for all files specified as move_file

Regards,
Kazuya Mio

  reply	other threads:[~2010-08-26  8:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-25 12:00 defragmentation of boot related files andreas
2010-08-26  8:50 ` Kazuya Mio [this message]
2010-08-26 18:10   ` Greg Freemyer
2010-08-26 20:16     ` andreas
2010-08-27  0:47       ` Andreas Dilger
2010-08-27 11:21       ` Kazuya Mio

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=4C762AF3.8020303@sx.jp.nec.com \
    --to=k-mio@sx.jp.nec.com \
    --cc=andreas@rid-net.de \
    --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 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.