Author: winnie Date: Mon Sep 22 06:58:18 2008 New Revision: 513 URL: http://svn.debian.org/wsvn/pkg-lustre/?sc=1&rev=513 Log: new version of patch
Modified: trunk/debian/changelog trunk/debian/control trunk/debian/patches/bug16680_detect_on_disc_corruption.dpatch Modified: trunk/debian/changelog URL: http://svn.debian.org/wsvn/pkg-lustre/trunk/debian/changelog?rev=513&op=diff ============================================================================== --- trunk/debian/changelog (original) +++ trunk/debian/changelog Mon Sep 22 06:58:18 2008 @@ -2,6 +2,9 @@ * Updated patchless2.6.24er patch to better support 2.6.26er kernel * Added patch for on disc corruption. + * Modified description of lustre-source a bit. + * DO NOT UPLOAD WITH bug16680_detect_on_disc_corruption.dpatch APPLIED, + its only for testing purposes. -- Patrick Winnertz <[EMAIL PROTECTED]> Fri, 19 Sep 2008 22:15:55 +0200 Modified: trunk/debian/control URL: http://svn.debian.org/wsvn/pkg-lustre/trunk/debian/control?rev=513&op=diff ============================================================================== --- trunk/debian/control (original) +++ trunk/debian/control Mon Sep 22 06:58:18 2008 @@ -39,7 +39,8 @@ http://www.lustre.org . This package contains the module source. The client kernel modules - can be built from it using module-assistant of make-kpkg. + can be built for kernels from 2.6.18 - 2.6.26 from it using + module-assistant or make-kpkg. Package: lustre-utils Section: utils Modified: trunk/debian/patches/bug16680_detect_on_disc_corruption.dpatch URL: http://svn.debian.org/wsvn/pkg-lustre/trunk/debian/patches/bug16680_detect_on_disc_corruption.dpatch?rev=513&op=diff ============================================================================== --- trunk/debian/patches/bug16680_detect_on_disc_corruption.dpatch (original) +++ trunk/debian/patches/bug16680_detect_on_disc_corruption.dpatch Mon Sep 22 06:58:18 2008 @@ -1,23 +1,19 @@ #! /bin/sh /usr/share/dpatch/dpatch-run -## bug16680_detect_on_disc_corruption.dpatch by Patrick Winnertz <[EMAIL PROTECTED]> +## bug_15949_mds.body_capacity.dpatch by Patrick Winnertz <[EMAIL PROTECTED]> ## ## All lines beginning with `## DP:' are a description of the patch. -## DP: Patch from bug 16680 +## DP: Patch from bug 15949 (is closed in 1.6.7) @DPATCH@ -Index: ldiskfs/kernel_patches/patches/ext3-mballoc3-core.patch -=================================================================== -RCS file: /cvsroot/cfs/ldiskfs/kernel_patches/patches/ext3-mballoc3-core.patch,v -retrieving revision 1.12 diff -p -u -r1.12 ext3-mballoc3-core.patch ---- ldiskfs/kernel_patches/patches/ext3-mballoc3-core.patch 6 Mar 2008 04:13:24 -0000 1.12 -+++ ldiskfs/kernel_patches/patches/ext3-mballoc3-core.patch 19 Sep 2008 12:20:00 -0000 +--- ./ldiskfs/kernel_patches/patches/ext3-mballoc3-core.patch 6 Mar 2008 04:13:24 -0000 1.12 ++++ ./ldiskfs/kernel_patches/patches/ext3-mballoc3-core.patch 21 Sep 2008 18:53:42 -0000 @@ -183,7 +183,7 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. =================================================================== --- linux-2.6.9-full.orig/fs/ext3/mballoc.c 2007-10-17 21:59:51.072534980 +0400 +++ linux-2.6.9-full/fs/ext3/mballoc.c 2007-10-17 23:09:22.000000000 +0400 -@@ -0,0 +1,4398 @@ -+@@ -0,0 +1,4483 @@ ++@@ -0,0 +1,4482 @@ +/* + * Copyright (c) 2003-2006, Cluster File Systems, Inc, [EMAIL PROTECTED] + * Written by Alex Tomas <[EMAIL PROTECTED]> @@ -47,22 +43,43 @@ +void ext3_mb_free_consumed_preallocations(struct ext3_allocation_context *ac); +void ext3_mb_return_to_preallocation(struct inode *inode, struct ext3_buddy *e3b, + sector_t block, int count); -@@ -1074,8 +1075,12 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. +@@ -1044,7 +1045,7 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. + + } + +} + + +-+static void +++static int + +ext3_mb_generate_buddy(struct super_block *sb, void *buddy, void *bitmap, + + int group) + +{ +@@ -1074,9 +1075,14 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. + grp->bb_fragments = fragments; + + if (free != grp->bb_free) { -+ printk("EXT3-fs: group %u: %u blocks in bitmap, %u in gd\n", -+ group, free, grp->bb_free); +-+ grp->bb_free = free; ++ struct ext3_group_desc *gdp; ++ gdp = ext3_get_group_desc (sb, group, NULL); -++ printk("EXT3-fs: group %u: %u blocks in bitmap, %u in bb, " +++ ext3_error(sb, __FUNCTION__, +++ "group %u: %u blocks in bitmap, %u in bb, " ++ "%u in gd, %lu pa's\n", group, free, grp->bb_free, ++ le16_to_cpu(gdp->bg_free_blocks_count), ++ grp->bb_prealloc_nr); - + grp->bb_free = free; - + } - + -@@ -1163,8 +1168,9 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. +++ return -EIO; + + } + + + + clear_bit(EXT3_GROUP_INFO_NEED_INIT_BIT, &grp->bb_state); +@@ -1086,6 +1092,8 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. + + EXT3_SB(sb)->s_mb_buddies_generated++; + + EXT3_SB(sb)->s_mb_generation_time += period; + + spin_unlock(&EXT3_SB(sb)->s_bal_lock); +++ +++ return 0; + +} + + + +static int ext3_mb_init_cache(struct page *page, char *incore) +@@ -1163,8 +1171,9 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. + if (!buffer_uptodate(bh[i])) + goto out; + @@ -73,7 +90,16 @@ + int group; + + group = (first_block + i) >> 1; -@@ -1196,13 +1202,14 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. +@@ -1183,7 +1192,7 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. + + EXT3_GROUP_INFO(sb, group)->bb_fragments = 0; + + memset(EXT3_GROUP_INFO(sb, group)->bb_counters, 0, + + sizeof(unsigned short)*(sb->s_blocksize_bits+2)); +-+ ext3_mb_generate_buddy(sb, data, incore, group); +++ err = ext3_mb_generate_buddy(sb, data, incore, group); + + incore = NULL; + + } else { + + /* this is block of bitmap */ +@@ -1196,13 +1205,14 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. + memcpy(data, bitmap, blocksize); + + /* mark all preallocated blocks used in in-core bitmap */ @@ -90,7 +116,7 @@ + +out: + if (bh) { -@@ -2157,6 +2164,8 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. +@@ -2157,6 +2167,8 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. + hs->result.fe_start, hs->result.fe_len); + seq_printf(seq, "%-5u %-8u %-23s free\n", + hs->pid, hs->ino, buf2); @@ -99,7 +125,7 @@ + } + return 0; +} -@@ -2282,8 +2291,9 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. +@@ -2282,8 +2294,9 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. +static int ext3_mb_seq_groups_show(struct seq_file *seq, void *v) +{ + struct super_block *sb = seq->private; @@ -110,7 +136,7 @@ + struct ext3_buddy e3b; + struct sg { + struct ext3_group_info info; -@@ -2292,10 +2302,10 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. +@@ -2292,10 +2305,10 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. + + group--; + if (group == 0) @@ -123,7 +149,7 @@ + "2^0", "2^1", "2^2", "2^3", "2^4", "2^5","2^6", + "2^7", "2^8", "2^9", "2^10", "2^11", "2^12", "2^13"); + -@@ -2306,13 +2316,20 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. +@@ -2306,13 +2319,20 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. + seq_printf(seq, "#%-5lu: I/O error\n", group); + return 0; + } @@ -146,7 +172,7 @@ + for (i = 0; i <= 13; i++) + seq_printf(seq, " %-5u", i <= sb->s_blocksize_bits + 1 ? + sg.info.bb_counters[i] : 0); -@@ -2413,6 +2430,7 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. +@@ -2413,6 +2433,7 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. + h.result = ac->ac_b_ex; + h.flags = ac->ac_flags; + h.merged = 0; @@ -154,7 +180,7 @@ + if (ac->ac_op == EXT3_MB_HISTORY_ALLOC) { + if (ac->ac_g_ex.fe_start == ac->ac_b_ex.fe_start && + ac->ac_g_ex.fe_group == ac->ac_b_ex.fe_group) -@@ -3498,17 +3516,59 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. +@@ -3498,17 +3519,59 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. +} + +/* @@ -216,7 +242,7 @@ + + /* all form of preallocation discards first load group, + * so the only competing code is preallocation use. -@@ -3524,14 +3584,30 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. +@@ -3524,14 +3587,23 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. + ext3_get_group_no_and_offset(sb, pa->pa_pstart, &groupnr, &start); + len = pa->pa_len; + spin_unlock(&pa->pa_lock); @@ -236,28 +262,20 @@ ++ count, grp->bb_prealloc_nr, skip); ++ return -EIO; ++ } -++ if (preallocated+le16_to_cpu(gdp->bg_free_blocks_count)!=grp->bb_free) { -++ ext3_error(sb, __FUNCTION__, "in-core bitmap for group %d" -++ "corrupted: preallocated %d bg_free_blocks_count %d " -++ "bb_free %u\n", group, preallocated, -++ le16_to_cpu(gdp->bg_free_blocks_count), grp->bb_free); -++ return -EIO; -++ } + mb_debug("prellocated %u for group %u\n", preallocated, group); ++ return 0; +} + +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,5) -@@ -3591,6 +3667,8 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. +@@ -3591,6 +3663,7 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. + */ + ext3_lock_group(sb, grp); + list_del_rcu(&pa->pa_group_list); -++ BUG_ON(EXT3_GROUP_INFO(sb, grp)->bb_prealloc_nr == 0); ++ EXT3_GROUP_INFO(sb, grp)->bb_prealloc_nr--; + ext3_unlock_group(sb, grp); + + spin_lock(pa->pa_obj_lock); -@@ -3675,6 +3753,7 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. +@@ -3675,6 +3748,7 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. + + ext3_lock_group(sb, ac->ac_b_ex.fe_group); + list_add_rcu(&pa->pa_group_list, &grp->bb_prealloc_list); @@ -265,7 +283,7 @@ + ext3_unlock_group(sb, ac->ac_b_ex.fe_group); + + spin_lock(pa->pa_obj_lock); -@@ -3732,6 +3811,7 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. +@@ -3732,6 +3806,7 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. + + ext3_lock_group(sb, ac->ac_b_ex.fe_group); + list_add_rcu(&pa->pa_group_list, &grp->bb_prealloc_list); @@ -273,7 +291,7 @@ + ext3_unlock_group(sb, ac->ac_b_ex.fe_group); + + spin_lock(pa->pa_obj_lock); -@@ -3779,6 +3859,7 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. +@@ -3779,6 +3854,7 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. + ac.ac_sb = sb; + ac.ac_inode = pa->pa_inode; + ac.ac_op = EXT3_MB_HISTORY_DISCARD; @@ -281,7 +299,19 @@ + + while (bit < end) { + bit = mb_find_next_zero_bit(bitmap_bh->b_data, end, bit); -@@ -3905,6 +3986,8 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. +@@ -3874,7 +3950,10 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. + + } + + + + err = ext3_mb_load_buddy(sb, group, &e3b); +-+ BUG_ON(err != 0); /* error handling here */ +++ if (err) { +++ brelse(bitmap_bh); +++ return err; +++ } + + + + if (needed == 0) + + needed = EXT3_BLOCKS_PER_GROUP(sb) + 1; +@@ -3905,6 +3984,8 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. + + spin_unlock(&pa->pa_lock); + @@ -290,7 +320,14 @@ + list_del_rcu(&pa->pa_group_list); + list_add(&pa->u.pa_tmp_list, &list); + } -@@ -4026,6 +4109,8 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. +@@ -4021,11 +4102,14 @@ Index: linux-2.6.9-full/fs/ext3/mballoc. + + ext3_get_group_no_and_offset(sb, pa->pa_pstart, &group, NULL); + + + + err = ext3_mb_load_buddy(sb, group, &e3b); +-+ BUG_ON(err != 0); /* error handling here */ +++ if (err) +++ return; + + + bitmap_bh = read_block_bitmap(sb, group); + + ext3_lock_group(sb, group); _______________________________________________ Pkg-lustre-svn-commit mailing list Pkg-lustre-svn-commit@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/pkg-lustre-svn-commit