lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 04 Apr 2008 20:19:03 +0900
From:	Akira Fujita <a-fujita@...jp.nec.com>
To:	linux-ext4@...r.kernel.org, Theodore Tso <tytso@....edu>,
	Mingming Cao <cmm@...ibm.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
CC:	linux-fsdevel@...r.kernel.org,
	Akira Fujita <a-fujita@...jp.nec.com>
Subject: [RFC][PATCH 0/8] ext4 online defrag (ver 0.8)

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
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ