From 30b1d6a5221f2cfbafe1701cb91821349b0bffd0 Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Thu, 5 May 2011 17:21:35 -0600 Subject: [PATCH] LU-254: don't mark long extent symlinks bad 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 --- patches/e2fsprogs-extents.patch | 18 +++++------------- patches/e2fsprogs-tests-f_extents_symlink.patch | Bin 0 -> 2047 bytes patches/series | 1 + 3 files changed, 6 insertions(+), 13 deletions(-) create mode 100644 patches/e2fsprogs-tests-f_extents_symlink.patch diff --git a/patches/e2fsprogs-extents.patch b/patches/e2fsprogs-extents.patch index f7fc3af..85dd345 100644 --- a/patches/e2fsprogs-extents.patch +++ b/patches/e2fsprogs-extents.patch @@ -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 index 0000000000000000000000000000000000000000..55b7a6c432447370fe59e37f7aafd9c0a90f8af2 GIT binary patch literal 2047 zcmeawOG&M;Qb;vQD=sL?PcPOjPu4Fgp=!r=*tY=auHstS4edAdLclw_ut=9d<0 z>L?fil^7U6J<6r+T9H`-^haVzX|Y0Pv4R0Pk!&;wBH4&*G?Hl($(gx{>8X0@RRbBx za5o@DvN1R(%Xf2dgzF#nWnu=aVR(CEZ?($#4- zc2A`B%KbUMKly2U=d+98g|&SxQ=Ir(d|ID48_nfyo0YlccUZ*iJw}_%W_GtNK0V(k zbGNboJztmL*O`~UegEYw=B(G!v;Ca>{||+UUtces+#kPhr$x!Hmy7=wu7BS?-*=DK zvFUO)^?Pf+{(G}G=lIqyc4dyo1d{nrZ_U~l`TwWJYVQTvIXOIea`pEacAeUw*N}I0 z=fB+N@pkoV`q%cDi7D7~X=hK~t9;hv-1?qpX4jQ^O-uUSP0J2Gy8EHbZvOw;Kk5If zbZeZxzpGrG-21!Y<>*rpZ#ocD8y)oS;||1bV8{kQ+g ztgrkfoqO~czVffAclgWvN