linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Akira Fujita <a-fujita@rs.jp.nec.com>
To: linux-ext4@vger.kernel.org, Theodore Tso <tytso@mit.edu>,
	Mingming Cao <cmm@us.ibm.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: linux-fsdevel@vger.kernel.org, Akira Fujita <a-fujita@rs.jp.nec.com>
Subject: [RFC][PATCH 0/8] ext4 online defrag (ver 0.8)
Date: Fri, 04 Apr 2008 20:19:03 +0900	[thread overview]
Message-ID: <47F60EA7.1050604@rs.jp.nec.com> (raw)

Hi,

Aneesh Kumar K.V wrote:
> you would need http://www.kernel.org/pub/software/devel/sparse/
> to find and fix these warnings.

I have updated ext4 online defrag to fix sparse warnings.
I also changed the construction of ext4 online defrag patches
to compile one-by-one and make them small but there is
no functional change since previous version.

Outline for ext4 online defrag:
Ext4 online defrag has the following three functions.

1.[ no option ] Solving a single file fragmentation
  Single file fragmentation is solved by moving file
  data to contiguous free blocks.

2.[ -r ] Solving a relevant file fragmentation
  Relevant file fragmentation could be solved by moving
  the files under the specified directory close together with
  the block containing the directory data.

3.[ -f ] Solving a free space fragmentation
  If there is no contiguous free blocks in the filesystem,
  the other files are moved to make sufficient space to allocate
  contiguous blocks for the target file.

Next steps:
1. Rework of defrag functions based on review comments from Mingming.
2. Implement defrag -f mode with FIEMAP ioctl.
3. Remove the limit of target file size (now 128MB) in -f mode.
   * Past mail concerning -f mode.
   http://marc.info/?l=linux-ext4&m=118239067704899&w=4

Summary of patches:
* These patches are replaced with ext4 online defrag patches
  which are already in the ext4 git tree (linux-2.6.26-rc8).

[PATCH 1/8]  Exchange the blocks between two inodes
- Exchange the data blocks between the temporary inode and
  the original inode.

[PATCH 2/8] Read and write file data with memory page
- Read the file data from the old blocks to the page and
  write the file data on the page into the new blocks.

[PATCH 3/8] Allocate new contiguous blocks with mballoc
- Search contiguous free blocks with mutil-block allocation
  and allocate them for the temporary inode.

[PATCH 4/8] Main function of ext4 online defrag and ioctl implementation
- Create the temporary inode and do defrag per
  defrag_size (defalut 64MB).

[PATCH 5/8] Defragmentation for the relevant files (-r mode)
- Relevant file fragmentation could be solved by moving
  the files under the specified directory close together with
  the block containing the directory data.

[PATCH 6/8] Check the free space fragmentation (-f mode)
- Check the free space fragmentation in the block group
  where target file is located.

[PATCH 7/8] Move victim files for the target file (-f mode)
- Move victim files to make sufficient space and reallocates
  the contiguous blocks for the target file.

[PATCH 8/8] Online defrag command
- The defrag command. Usage is as follows:
  - Put the multiple files closer together.
    # e4defrag -r directory-name
  - Defrag for free space fragmentation.
    # e4defrag -f file-name
  - Defrag for a single file.
    # e4defrag file-name
  - Defrag for all files on ext4.
    # e4defrag device-name

Comments and reviews are welcome.

Regards,
Akira

             reply	other threads:[~2008-04-04 11:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-04 11:19 Akira Fujita [this message]
2008-04-11 20:18 ` [RFC][PATCH 0/8] ext4 online defrag (ver 0.8) Mingming Cao
2008-04-14  4:14   ` Akira Fujita

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=47F60EA7.1050604@rs.jp.nec.com \
    --to=a-fujita@rs.jp.nec.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=cmm@us.ibm.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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).