Skip to content
This repository has been archived by the owner on Feb 12, 2018. It is now read-only.

Commit

Permalink
LU-254: don't mark long extent symlinks bad
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
adilger committed May 5, 2011
1 parent 8593f66 commit 30b1d6a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
18 changes: 5 additions & 13 deletions patches/e2fsprogs-extents.patch
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Binary file not shown.
1 change: 1 addition & 0 deletions patches/series
Expand Up @@ -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
Expand Down

0 comments on commit 30b1d6a

Please sign in to comment.