From: nikita Date: Tue, 12 Dec 2006 21:40:02 +0000 (+0000) Subject: enable ext3-extents on mds and for directories. X-Git-Tag: v1_8_0_110~486^2 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=960a435618024bb2da7dadd1a2aefaba781a8e29;p=fs%2Flustre-release.git enable ext3-extents on mds and for directories. --- diff --git a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.9-rhel4.patch b/ldiskfs/kernel_patches/patches/ext3-extents-2.6.9-rhel4.patch index 5b5558c..d01b79b 100644 --- a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.9-rhel4.patch +++ b/ldiskfs/kernel_patches/patches/ext3-extents-2.6.9-rhel4.patch @@ -2379,7 +2379,7 @@ Index: linux-stage/fs/ext3/ialloc.c DQUOT_FREE_INODE(inode); goto fail2; } -+ if (test_opt(sb, EXTENTS) && S_ISREG(inode->i_mode)) { ++ if (test_opt(sb, EXTENTS) && (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode))) { + EXT3_I(inode)->i_flags |= EXT3_EXTENTS_FL; + ext3_extents_initialize_blockmap(handle, inode); + if (!EXT3_HAS_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_EXTENTS)) { diff --git a/lustre/kernel_patches/patches/ext3-extents-2.6.9-rhel4.patch b/lustre/kernel_patches/patches/ext3-extents-2.6.9-rhel4.patch index 5b5558c..d01b79b 100644 --- a/lustre/kernel_patches/patches/ext3-extents-2.6.9-rhel4.patch +++ b/lustre/kernel_patches/patches/ext3-extents-2.6.9-rhel4.patch @@ -2379,7 +2379,7 @@ Index: linux-stage/fs/ext3/ialloc.c DQUOT_FREE_INODE(inode); goto fail2; } -+ if (test_opt(sb, EXTENTS) && S_ISREG(inode->i_mode)) { ++ if (test_opt(sb, EXTENTS) && (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode))) { + EXT3_I(inode)->i_flags |= EXT3_EXTENTS_FL; + ext3_extents_initialize_blockmap(handle, inode); + if (!EXT3_HAS_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_EXTENTS)) { diff --git a/lustre/utils/mkfs_lustre.c b/lustre/utils/mkfs_lustre.c index 7ee3bcc..fec5757 100644 --- a/lustre/utils/mkfs_lustre.c +++ b/lustre/utils/mkfs_lustre.c @@ -1496,7 +1496,7 @@ int main(int argc, char *argv[]) /* NB: Files created while extents are enabled cannot be read if mounted with a kernel that doesn't include the CFS patches! */ - if (IS_OST(ldd) && + if ((IS_OST(ldd) || IS_MDT(ldd)) && ldd->ldd_mount_type == LDD_MT_LDISKFS) { strcat(default_mountopts, ",extents,mballoc"); }