Whamcloud - gitweb
enable ext3-extents on mds and for directories.
authornikita <nikita>
Tue, 12 Dec 2006 21:40:02 +0000 (21:40 +0000)
committernikita <nikita>
Tue, 12 Dec 2006 21:40:02 +0000 (21:40 +0000)
ldiskfs/kernel_patches/patches/ext3-extents-2.6.9-rhel4.patch
lustre/kernel_patches/patches/ext3-extents-2.6.9-rhel4.patch
lustre/utils/mkfs_lustre.c

index 5b5558c..d01b79b 100644 (file)
@@ -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)) {
index 5b5558c..d01b79b 100644 (file)
@@ -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)) {
index 7ee3bcc..fec5757 100644 (file)
@@ -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");
                 }