詳解ファイルシステム - 2.6.18-rc4-ext4
ext4


ext4のpatch

Mingming Cao(IBM)主催の~
ext4 devel interlock meeting minutes(Aug, 9th, 2006)~
#毎週水曜日24:00(JST)〜の電話会議~
にて報告があったとおり、ext4用のpatchがMingming Caoから~
2006/08/10に提供されました。

PATCH 0/5 Forking ext4 filesystem and JBD2 ~
PATCH 1/5 Forking ext4 filesystem from ext3 ~
PATCH 2/5 Register ext3dev filesystem ~
PATCH 3/5 forking JBD2 ~
PATCH 4/5 Rename symbols in JBD2 ~
PATCH 5/5 Use JBD2 in ext4 filesystem ~
PATCH 0/9 extents and 48bit blk changes for ext4 ~
PATCH 1/9 extents for ext4 ~
PATCH 2/9 sector_t format string ~
PATCH 3/9 support 32 bit ext4 filesystem block type ~
PATCH 4/9 48bit support in extents ~
PATCH 5/9 uninitialized extents handling ~
PATCH 6/9 64bit jbd2 core changes ~
PATCH 7/9 convert in-kernel JBD2 blk type to sector_t ~
PATCH 8/9 48-bit block numbers for extended ~
PATCH 9/9 ext4 super block changes for 32 bit blocks ~
  1. [patch 1/5] ext4-fork.patch
    1. fs/ext4ディレクトリの作成
    2. fs/ext3のファイルをfs/ext4にコピー
    3. ext4→ext3devにシンボル名変更
  2. [patch 2/5] register-ext3dev.patch
    1. シオドラさん(ext2/3メンテナ)のpatchでext4化
  3. [patch 3/5] fork-jbd2.patch
    1. JBD2層の64/32bit対応
  4. [patch 4/5] jbd2-rename-funcs.patch
    1. JBD2層のシンボル名変更
  5. [patch 5/5] rename-jbd2-in-ext4.patch
    1. JBD2のext4対応
  6. [PATCH 1/9] extents for ext4
    1. Alex Tomasのext4のextent map対応
  7. [PATCH 2/9] sector_t format string
    1. sector_tの定義追加(SECTOR_FMT)詳細はext3の諸元拡大講演資料参照のこと
  8. [PATCH 3/9] support >32 bit ext4 filesystem block type
    1. ext4_fsblk_t追加で32bit以上のblockを扱えるようにする。
  9. [PATCH 4/9] 48bit support in extents
    1. extentsのブロック数を48bit化
  10. [PATCH 5/9] uninitialized extents handling
    1. extentsのRO_COMPAT
  11. [PATCH 6/9] 64bit jbd2 core changes
    1. JBDの64bit対応
  12. [PATCH 7/9] convert in-kernel JBD2 blk type to sector_t
    1. JBD2の64bit対応(sector_t)
  13. [PATCH 8/9] 48-bit block numbers for extended
    1. extentsの48bit化
  14. [PATCH 9/9]ext4 super block changes for >32 bit blocks
    1. super blockの32bit以上に対応する

ext4のmount

tar xzf linux-2.6.18-rc4.tzr.gz
cd linux-2.6.18-rc4
patch -p1 < ../patch/ext4-fork.patch
patch -p1 < ../patch/register-ext3dev.patch
patch -p1 < ../patch/fork-jbd2.patch
patch -p1 < ../patch/jbd2-rename-funcs.patch
patch -p1 < ../patch/rename-jbd2-in-ext4.patch
patch -p1 < ../patch/extents-for-ext4.patch
patch -p1 < ../patch/sector_t-format-string.patch
patch -p1 < ../patch/32bit-ext4-filesystem.patch
patch -p1 < ../patch/48bit-support-in-extents.patch
patch -p1 < ../patch/uninitialized-extents.patch
patch -p1 < ../patch/64bit-jbd2.patch
patch -p1 < ../patch/JBD2-blktype-to-sector_t.patch
patch -p1 < ../patch/48bit-block-numbers.patch
patch -p1 < ../patch/ext4-super-block.patch
make menuconfig
make
make modules
make modules_install
make install
reboot
mkfs -t ext3 /dev/vg0/lv-ext4
mount -t ext3dev -o extents /dev/vg0/lv-ext4 /mnt/ext4
.config
# CONFIG_HAPPYMEAL is not set
# CONFIG_ATM_HE is not set
# CONFIG_3C359 is not set
# CONFIG_ATM_LANAI is not set
CONFIG_EXT3DEV_FS=m
CONFIG_EXT3DEV_FS_XATTR=y
CONFIG_JBD2=m
/var/log/messages
Aug 11 04:14:24 linuxfs2nd kernel: EXT4 FS on vg0/lvext4, internal journal ~
Aug 11 04:14:24 linuxfs2nd kernel: EXT4-fs: mounted filesystem with ordered data mode. ~
Aug 11 04:14:24 linuxfs2nd kernel: EXT4-fs: file extents enabled ~

df -Th

Filesystem Type サイズ 使用 残り 使用% マウント位置
/dev/hda2 ext3 16G 8.8G 6.3G 59% /
/dev/hda1 ext2 289M 11M 264M 4% /boot
none     tmpfs 4.0G 0 4.0G 0% /dev/shm
master:/home nfs 81G  30G  47G 40% /home
/dev/mapper/vg0-lvext4
       ext3dev 8.9T 2G 8.8T 1% /mnt/ext4