Whamcloud - gitweb
LU-254: don't mark long extent symlinks bad 03/503/1 v1.41.90.wc1
authorAndreas Dilger <adilger@whamcloud.com>
Thu, 5 May 2011 23:21:35 +0000 (17:21 -0600)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 5 May 2011 23:21:35 +0000 (17:21 -0600)
Long symlinks with the EXT4_EXTENTS_FL set should no longer be considered
as corrupt, since these are created by default with new kernels using ext4
as the filesystem type.  This has not impacted Lustre in the past because
extents are only enabled on the OST, while symlinks are only created on the
MDT where extents are never enabled.

However, now that distros are using ext4 as the base filesystem type, if
the lustre-patched e2fsprogs RPM is installed it will incorrectly consider
all such long symlinks as bad and remove them.

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
patches/e2fsprogs-extents.patch
patches/e2fsprogs-tests-f_extents_symlink.patch [new file with mode: 0644]
patches/series

index f7fc3af..85dd345 100644 (file)
@@ -19,15 +19,6 @@ Index: e2fsprogs/e2fsck/pass1.c
                return 0;
  
        /*
-@@ -175,7 +175,7 @@ int e2fsck_pass1_check_symlink(ext2_fils
-       struct ext2fs_extent    extent;
-       if ((inode->i_size_high || inode->i_size == 0) ||
--          (inode->i_flags & EXT2_INDEX_FL))
-+          (inode->i_flags & (EXT2_INDEX_FL | EXT4_EXTENTS_FL)))
-               return 0;
-       if (inode->i_flags & EXT4_EXTENTS_FL) {
 @@ -1054,8 +1054,7 @@ void e2fsck_pass1(e2fsck_t ctx)
                                check_blocks(ctx, &pctx, block_buf);
                                continue;
@@ -38,16 +29,17 @@ Index: e2fsprogs/e2fsck/pass1.c
                         e2fsck_pass1_check_device_inode(fs, inode)) {
                        check_immutable(ctx, &pctx);
                        check_size(ctx, &pctx);
-@@ -1678,6 +1677,34 @@ void e2fsck_clear_inode(e2fsck_t ctx, ex
+@@ -1678,6 +1677,35 @@ void e2fsck_clear_inode(e2fsck_t ctx, ex
        e2fsck_write_inode(ctx, ino, inode, source);
  }
  
 +/* Workaround to handle problems with old Lustre extents patches that didn't
 + * clear the ee_start_hi or ei_leaf_hi fields.  Could be removed as soon as
 + * the f_extent tests are fixed to clear these _hi fields. */
-+static errcode_t e2fsck_ext2fs_extent_get(e2fsck_t ctx, struct problem_context *pctx,
-+                                   ext2_extent_handle_t ehandle, int flags,
-+                                   struct ext2fs_extent *extent)
++static errcode_t e2fsck_ext2fs_extent_get(e2fsck_t ctx,
++                                       struct problem_context *pctx,
++                                       ext2_extent_handle_t ehandle,int flags,
++                                       struct ext2fs_extent *extent)
 +{
 +      __u16 blk_hi;
 +      int high_bits_ok = ext2fs_blocks_count(ctx->fs->super) > 0xffffffffULL;
diff --git a/patches/e2fsprogs-tests-f_extents_symlink.patch b/patches/e2fsprogs-tests-f_extents_symlink.patch
new file mode 100644 (file)
index 0000000..55b7a6c
Binary files /dev/null and b/patches/e2fsprogs-tests-f_extents_symlink.patch differ
index d92d6df..8594183 100644 (file)
@@ -15,6 +15,7 @@ e2fsprogs-lazy_journal_init.patch
 e2fsprogs-size_high.patch
 e2fsprogs-tests-f_many_subdirs.patch
 e2fsprogs-extents.patch
+e2fsprogs-tests-f_extents_symlink.patch
 e2fsprogs-tests-f_bad_ea_value.patch
 e2fsprogs-tests-f_extents_bad_blk.patch
 e2fsprogs-tests-f_extents_ee_block.patch