[Pkg-lustre-svn-commit] [SCM] Lustre Debian Packaging branch, master, updated. 4109e6a6742f821dc7b3740b6a7f1bf1146c7a74

Patrick Winnertz winnie at debian.org
Thu Oct 9 12:04:39 UTC 2008


The following commit has been merged in the master branch:
commit 4109e6a6742f821dc7b3740b6a7f1bf1146c7a74
Author: Patrick Winnertz <winnie at debian.org>
Date:   Thu Oct 9 14:02:15 2008 +0200

    Removed patch which was only for testing purposes.

diff --git a/debian/patches/bug16680_detect_on_disc_corruption.dpatch b/debian/patches/bug16680_detect_on_disc_corruption.dpatch
deleted file mode 100755
index fe1b297..0000000
--- a/debian/patches/bug16680_detect_on_disc_corruption.dpatch
+++ /dev/null
@@ -1,338 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## bug_15949_mds.body_capacity.dpatch by Patrick Winnertz <winnie at debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Patch from bug 15949 (is closed in 1.6.7)
-
- at DPATCH@
-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	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,4482 @@
- +/*
- + * Copyright (c) 2003-2006, Cluster File Systems, Inc, info at clusterfs.com
- + * Written by Alex Tomas <alex at clusterfs.com>
-@@ -513,6 +513,7 @@ Index: linux-2.6.9-full/fs/ext3/mballoc.
- +	unsigned short	bb_free;
- +	unsigned short	bb_fragments;
- +	struct		list_head bb_prealloc_list;
-++	unsigned long   bb_prealloc_nr;
- +#ifdef DOUBLE_CHECK
- +	void		*bb_bitmap;
- +#endif
-@@ -616,7 +617,7 @@ Index: linux-2.6.9-full/fs/ext3/mballoc.
- +	__u16 tail;	/* what tail broke some buddy */
- +	__u16 buddy;	/* buddy the tail ^^^ broke */
- +	__u16 flags;
--+	__u8 cr:3;	/* which phase the result extent was found at */
-++	__u8 cr:8;	/* which phase the result extent was found at */
- +	__u8 op:4;
- +	__u8 merged:1;
- +};
-@@ -651,7 +652,7 @@ Index: linux-2.6.9-full/fs/ext3/mballoc.
- +void ext3_mb_release_blocks(struct super_block *, int);
- +void ext3_mb_poll_new_transaction(struct super_block *, handle_t *);
- +void ext3_mb_free_committed_blocks(struct super_block *);
--+void ext3_mb_generate_from_pa(struct super_block *sb, void *bitmap, int group);
-++int ext3_mb_generate_from_pa(struct super_block *sb, void *bitmap, int group);
- +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);
-@@ -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);
-++		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);
-++		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;
- +
-++	err = 0;
- +	first_block = page->index * blocks_per_page;
--+	for (i = 0; i < blocks_per_page; i++) {
-++	for (i = 0; i < blocks_per_page && err == 0; i++) {
- +		int group;
- +
- +		group = (first_block + i) >> 1;
-@@ -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 */
--+			ext3_mb_generate_from_pa(sb, data, group);
-++			err = ext3_mb_generate_from_pa(sb, data, group);
- +			ext3_unlock_group(sb, group);
- +
- +			incore = data;
- +		}
- +	}
--+	SetPageUptodate(page);
-++	if (likely(err == 0))
-++		SetPageUptodate(page);
- +
- +out:
- +	if (bh) {
-@@ -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);
-++	} else {
-++		seq_printf(seq, "unknown op %d\n", hs->op);
- +	}
- +	return 0;
- +}
-@@ -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;
-++	struct ext3_group_desc *gdp;
- +	long group = (long) v;
--+	int i, err;
-++	int i, err, free = 0;
- +	struct ext3_buddy e3b;
- +	struct sg {
- +		struct ext3_group_info info;
-@@ -2292,10 +2305,10 @@ Index: linux-2.6.9-full/fs/ext3/mballoc.
- +
- +	group--;
- +	if (group == 0)
--+		seq_printf(seq, "#%-5s: %-5s %-5s %-5s "
-++		seq_printf(seq, "#%-5s: %-5s %-5s %-5s %-5s %-5s "
- +				"[ %-5s %-5s %-5s %-5s %-5s %-5s %-5s "
- +				  "%-5s %-5s %-5s %-5s %-5s %-5s %-5s ]\n",
--+			   "group", "free", "frags", "first",
-++			   "group", "free", "ingd", "frags", "first", "pa",
- +			   "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 +2319,20 @@ Index: linux-2.6.9-full/fs/ext3/mballoc.
- +		seq_printf(seq, "#%-5lu: I/O error\n", group);
- +		return 0;
- +	}
-++
-++	gdp = ext3_get_group_desc(sb, group, NULL);
-++	if (gdp != NULL)
-++		free = le16_to_cpu(gdp->bg_free_blocks_count);
-++
- +	ext3_lock_group(sb, group);
- +	memcpy(&sg, EXT3_GROUP_INFO(sb, group), i);
- +	ext3_unlock_group(sb, group);
- +	ext3_mb_release_desc(&e3b);
- +
--+	seq_printf(seq, "#%-5lu: %-5u %-5u %-5u [", group, sg.info.bb_free,
--+			sg.info.bb_fragments, sg.info.bb_first_free);
-++	seq_printf(seq, "#%-5lu: %-5u %-5u %-5u %-5u %-5lu [", group,
-++			sg.info.bb_free, free,
-++			sg.info.bb_fragments, sg.info.bb_first_free,
-++			sg.info.bb_prealloc_nr);
- +	for (i = 0; i <= 13; i++)
- +		seq_printf(seq, " %-5u", i <= sb->s_blocksize_bits + 1 ?
- +				sg.info.bb_counters[i] : 0);
-@@ -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;
-++	h.cr = ac->ac_criteria;
- +	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 +3519,59 @@ Index: linux-2.6.9-full/fs/ext3/mballoc.
- +}
- +
- +/*
-++ * check free blocks in bitmap match free block in group descriptor
-++ * do this before taking preallocated blocks into account to be able
-++ * to detect on-disk corruptions
-++ */
-++int ext3_mb_check_ondisk_bitmap(struct super_block *sb, void *bitmap,
-++				struct ext3_group_desc *gdp, int group)
-++{
-++	unsigned short max = EXT3_BLOCKS_PER_GROUP(sb);
-++	unsigned short i, first, free = 0;
-++
-++	i = mb_find_next_zero_bit(bitmap, max, 0);
-++
-++	while (i < max) {
-++		first = i;
-++		i = ext2_find_next_le_bit(bitmap, max, i);
-++		if (i > max)
-++			i = max;
-++		free += i - first;
-++		if (i < max)
-++			i = mb_find_next_zero_bit(bitmap, max, i);
-++	}
-++
-++	if (free != le16_to_cpu(gdp->bg_free_blocks_count)) {
-++		ext3_error(sb, __FUNCTION__, "on-disk bitmap for group %d"
-++			"corrupted: %u blocks free in bitmap, %u - in gd\n",
-++			group, free, le16_to_cpu(gdp->bg_free_blocks_count));
-++		return -EIO;
-++	}
-++	return 0;
-++}
-++
-++/*
- + * the function goes through all preallocation in this group and marks them
- + * used in in-core bitmap. buddy must be generated from this bitmap
- + */
--+void ext3_mb_generate_from_pa(struct super_block *sb, void *bitmap, int group)
-++int ext3_mb_generate_from_pa(struct super_block *sb, void *bitmap, int group)
- +{
- +	struct ext3_group_info *grp = EXT3_GROUP_INFO(sb, group);
- +	struct ext3_prealloc_space *pa;
-++	struct ext3_group_desc *gdp;
- +	struct list_head *cur;
- +	unsigned long groupnr;
- +	unsigned long start;
--+	int preallocated = 0, count = 0, len;
-++	int preallocated = 0, count = 0, len, skip = 0, err;
-++
-++	gdp = ext3_get_group_desc (sb, group, NULL);
-++	if (gdp == NULL)
-++		return -EIO;
-++
-++	/* before applying preallocations, check bitmap consistency */
-++	err = ext3_mb_check_ondisk_bitmap(sb, bitmap, gdp, group);
-++	if (err)
-++		return err;
- +
- + 	/* all form of preallocation discards first load group,
- +	 * so the only competing code is preallocation use.
-@@ -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);
--+		if (unlikely(len == 0))
-++		if (unlikely(len == 0)) {
-++			skip++;
- +			continue;
-++		}
- +		BUG_ON(groupnr != group && len != 0);
- +		mb_set_bits(sb_bgl_lock(EXT3_SB(sb), group), bitmap, start,len);
- +		preallocated += len;
- +		count++;
- +	}
-++	if (count + skip != grp->bb_prealloc_nr) {
-++		ext3_error(sb, __FUNCTION__, "lost preallocations: "
-++			"count %d, bb_prealloc_nr %lu, skip %d\n",
-++			count, grp->bb_prealloc_nr, skip);
-++		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 +3663,7 @@ Index: linux-2.6.9-full/fs/ext3/mballoc.
- +	 */
- +	ext3_lock_group(sb, grp);
- +	list_del_rcu(&pa->pa_group_list);
-++	EXT3_GROUP_INFO(sb, grp)->bb_prealloc_nr--;
- +	ext3_unlock_group(sb, grp);
- +
- +	spin_lock(pa->pa_obj_lock);
-@@ -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);
-++	grp->bb_prealloc_nr++;
- +	ext3_unlock_group(sb, ac->ac_b_ex.fe_group);
- +
- +	spin_lock(pa->pa_obj_lock);
-@@ -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);
-++	grp->bb_prealloc_nr++;
- +	ext3_unlock_group(sb, ac->ac_b_ex.fe_group);
- +
- +	spin_lock(pa->pa_obj_lock);
-@@ -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;
-++	ac.ac_o_ex.fe_len = 1;
- +
- +	while (bit < end) {
- +		bit = mb_find_next_zero_bit(bitmap_bh->b_data, end, bit);
-@@ -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);
- +
-++		BUG_ON(grp->bb_prealloc_nr == 0);
-++		grp->bb_prealloc_nr--;
- +		list_del_rcu(&pa->pa_group_list);
- +		list_add(&pa->u.pa_tmp_list, &list);
- +	}
-@@ -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);
-++		BUG_ON(e3b.bd_info->bb_prealloc_nr == 0);
-++		e3b.bd_info->bb_prealloc_nr--;
- +		list_del_rcu(&pa->pa_group_list);
- +
- +		/* can be NULL due to IO error, at worst

-- 
Lustre Debian Packaging 



More information about the Pkg-lustre-svn-commit mailing list