⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ext3-rename-reserve-2.6-suse.patch

📁 lustre 1.6.5 source code
💻 PATCH
字号:
Index: linux-2.6.5-sles9/include/linux/ext3_fs.h===================================================================--- linux-2.6.5-sles9.orig/include/linux/ext3_fs.h	2004-11-09 02:29:14.878513832 +0300+++ linux-2.6.5-sles9/include/linux/ext3_fs.h	2004-11-09 02:32:14.151260232 +0300@@ -709,7 +709,7 @@ 						    unsigned int block_group, 						    struct buffer_head ** bh); extern int ext3_should_retry_alloc(struct super_block *sb, int *retries);-extern void rsv_window_add(struct super_block *sb, struct reserve_window_node *rsv);+extern void rsv_window_add(struct super_block *sb, struct ext3_reserve_window_node *rsv);  /* dir.c */ extern int ext3_check_dir_entry(const char *, struct inode *,Index: linux-2.6.5-sles9/include/linux/ext3_fs_sb.h===================================================================--- linux-2.6.5-sles9.orig/include/linux/ext3_fs_sb.h	2004-11-09 02:28:18.753046200 +0300+++ linux-2.6.5-sles9/include/linux/ext3_fs_sb.h	2004-11-09 02:32:27.996155488 +0300@@ -86,7 +86,7 @@ 	/* root of the per fs reservation window tree */ 	spinlock_t s_rsv_window_lock; 	struct rb_root s_rsv_window_root;-	struct reserve_window_node s_rsv_window_head;+	struct ext3_reserve_window_node s_rsv_window_head;  	/* Journaling */ 	struct inode * s_journal_inode;Index: linux-2.6.5-sles9/include/linux/ext3_fs_i.h===================================================================--- linux-2.6.5-sles9.orig/include/linux/ext3_fs_i.h	2004-11-09 02:23:21.606219384 +0300+++ linux-2.6.5-sles9/include/linux/ext3_fs_i.h	2004-11-09 02:32:08.752081032 +0300@@ -20,17 +20,17 @@ #include <linux/rbtree.h> #include <linux/seqlock.h> -struct reserve_window {+struct ext3_reserve_window { 	__u32			_rsv_start;	/* First byte reserved */ 	__u32			_rsv_end;	/* Last byte reserved or 0 */ }; -struct reserve_window_node {+struct ext3_reserve_window_node { 	struct rb_node	 	rsv_node; 	atomic_t		rsv_goal_size; 	atomic_t		rsv_alloc_hit; 	seqlock_t		rsv_seqlock;-	struct reserve_window	rsv_window;+	struct ext3_reserve_window	rsv_window; };  #define rsv_start rsv_window._rsv_start@@ -76,7 +76,7 @@ 	 */ 	__u32	i_next_alloc_goal; 	/* block reservation window */-	struct reserve_window_node i_rsv_window;+	struct ext3_reserve_window_node i_rsv_window;  	__u32	i_dir_start_lookup; #ifdef CONFIG_EXT3_FS_XATTRIndex: linux-2.6.5-sles9/fs/ext3/balloc.c===================================================================--- linux-2.6.5-sles9.orig/fs/ext3/balloc.c	2004-11-09 02:26:53.078070776 +0300+++ linux-2.6.5-sles9/fs/ext3/balloc.c	2004-11-09 02:32:43.108858008 +0300@@ -115,7 +115,7 @@ 			      const char *fn) { 	struct rb_node *n;-	struct reserve_window_node *rsv, *prev;+	struct ext3_reserve_window_node *rsv, *prev; 	int bad;  restart:@@ -125,7 +125,7 @@  	printk("Block Allocation Reservation Windows Map (%s):\n", fn); 	while (n) {-		rsv = list_entry(n, struct reserve_window_node, rsv_node);+		rsv = list_entry(n, struct ext3_reserve_window_node, rsv_node); 		if (verbose) 			printk("reservation window 0x%p " 			       "start:  %d, end:  %d\n",@@ -161,7 +161,7 @@ #endif  static int-goal_in_my_reservation(struct reserve_window *rsv, int goal,+goal_in_my_reservation(struct ext3_reserve_window *rsv, int goal, 			unsigned int group, struct super_block * sb) { 	unsigned long group_first_block, group_last_block;@@ -184,18 +184,18 @@  * if the goal is not in any window.  * Returns NULL if there are no windows or if all windows start after the goal.  */-static struct reserve_window_node *search_reserve_window(struct rb_root *root,+static struct ext3_reserve_window_node *search_ext3_reserve_window(struct rb_root *root, 							 unsigned long goal) { 	struct rb_node *n = root->rb_node;-	struct reserve_window_node *rsv;+	struct ext3_reserve_window_node *rsv;  	if (!n) 		return NULL;  	while (n) 	{-		rsv = rb_entry(n, struct reserve_window_node, rsv_node);+		rsv = rb_entry(n, struct ext3_reserve_window_node, rsv_node);  		if (goal < rsv->rsv_start) 			n = n->rb_left;@@ -212,13 +212,13 @@ 	 */ 	if (rsv->rsv_start > goal) { 		n = rb_prev(&rsv->rsv_node);-		rsv = rb_entry(n, struct reserve_window_node, rsv_node);+		rsv = rb_entry(n, struct ext3_reserve_window_node, rsv_node); 	} 	return rsv; }  void rsv_window_add(struct super_block *sb,-		    struct reserve_window_node *rsv)+		    struct ext3_reserve_window_node *rsv) { 	struct rb_root *root = &EXT3_SB(sb)->s_rsv_window_root; 	struct rb_node *node = &rsv->rsv_node;@@ -226,12 +226,12 @@  	struct rb_node ** p = &root->rb_node; 	struct rb_node * parent = NULL;-	struct reserve_window_node *this;+	struct ext3_reserve_window_node *this;  	while (*p) 	{ 		parent = *p;-		this = rb_entry(parent, struct reserve_window_node, rsv_node);+		this = rb_entry(parent, struct ext3_reserve_window_node, rsv_node);  		if (start < this->rsv_start) 			p = &(*p)->rb_left;@@ -246,7 +246,7 @@ }  static void rsv_window_remove(struct super_block *sb,-			      struct reserve_window_node *rsv)+			      struct ext3_reserve_window_node *rsv) { 	rsv->rsv_start = EXT3_RESERVE_WINDOW_NOT_ALLOCATED; 	rsv->rsv_end = EXT3_RESERVE_WINDOW_NOT_ALLOCATED;@@ -254,7 +254,7 @@ 	rb_erase(&rsv->rsv_node, &EXT3_SB(sb)->s_rsv_window_root); } -static inline int rsv_is_empty(struct reserve_window *rsv)+static inline int rsv_is_empty(struct ext3_reserve_window *rsv) { 	/* a valid reservation end block could not be 0 */ 	return (rsv->_rsv_end == EXT3_RESERVE_WINDOW_NOT_ALLOCATED);@@ -263,7 +263,7 @@ void ext3_discard_reservation(struct inode *inode) { 	struct ext3_inode_info *ei = EXT3_I(inode);-	struct reserve_window_node *rsv = &ei->i_rsv_window;+	struct ext3_reserve_window_node *rsv = &ei->i_rsv_window; 	spinlock_t *rsv_lock = &EXT3_SB(inode->i_sb)->s_rsv_window_lock;  	if (!rsv_is_empty(&rsv->rsv_window)) {@@ -600,7 +600,7 @@  */ static int ext3_try_to_allocate(struct super_block *sb, handle_t *handle, int group,-	struct buffer_head *bitmap_bh, int goal, struct reserve_window *my_rsv)+	struct buffer_head *bitmap_bh, int goal, struct ext3_reserve_window *my_rsv) { 	int group_first_block, start, end; @@ -700,13 +700,13 @@  *	on succeed, it returns the reservation window to be appended to.  *	failed, return NULL.  */-static struct reserve_window_node *find_next_reservable_window(-				struct reserve_window_node *search_head,+static struct ext3_reserve_window_node *find_next_reservable_window(+				struct ext3_reserve_window_node *search_head, 				unsigned long size, int *start_block, 				int last_block) { 	struct rb_node *next;-	struct reserve_window_node *rsv, *prev;+	struct ext3_reserve_window_node *rsv, *prev; 	int cur;  	/* TODO: make the start of the reservation window byte-aligned */@@ -734,7 +734,7 @@  		prev = rsv; 		next = rb_next(&rsv->rsv_node);-		rsv = list_entry(next, struct reserve_window_node, rsv_node);+		rsv = list_entry(next, struct ext3_reserve_window_node, rsv_node);  		/* 		 * Reached the last reservation, we can just append to the@@ -801,15 +801,15 @@  *	@group: the group we are trying to allocate in  *	@bitmap_bh: the block group block bitmap  */-static int alloc_new_reservation(struct reserve_window_node *my_rsv,+static int alloc_new_reservation(struct ext3_reserve_window_node *my_rsv, 		int goal, struct super_block *sb, 		unsigned int group, struct buffer_head *bitmap_bh) {-	struct reserve_window_node *search_head;+	struct ext3_reserve_window_node *search_head; 	int group_first_block, group_end_block, start_block; 	int first_free_block; 	int reservable_space_start;-	struct reserve_window_node *prev_rsv;+	struct ext3_reserve_window_node *prev_rsv; 	struct rb_root *fs_rsv_root = &EXT3_SB(sb)->s_rsv_window_root; 	unsigned long size; @@ -859,7 +859,7 @@ 	/* 	 * shift the search start to the window near the goal block 	 */-	search_head = search_reserve_window(fs_rsv_root, start_block);+	search_head = search_ext3_reserve_window(fs_rsv_root, start_block);  	/* 	 * find_next_reservable_window() simply finds a reservable window@@ -968,7 +968,7 @@ static int ext3_try_to_allocate_with_rsv(struct super_block *sb, handle_t *handle, 			unsigned int group, struct buffer_head *bitmap_bh,-			int goal, struct reserve_window_node * my_rsv,+			int goal, struct ext3_reserve_window_node * my_rsv, 			int *errp) { 	spinlock_t *rsv_lock;@@ -1027,7 +1027,7 @@ 	 * then we could go to allocate from the reservation window directly. 	 */ 	while (1) {-		struct reserve_window rsv_copy;+		struct ext3_reserve_window rsv_copy; 		unsigned int seq;  		do {@@ -1159,8 +1159,8 @@ 	struct ext3_group_desc *gdp; 	struct ext3_super_block *es; 	struct ext3_sb_info *sbi;-	struct reserve_window_node *my_rsv = NULL;-	struct reserve_window_node *rsv = &EXT3_I(inode)->i_rsv_window;+	struct ext3_reserve_window_node *my_rsv = NULL;+	struct ext3_reserve_window_node *rsv = &EXT3_I(inode)->i_rsv_window; 	unsigned short windowsz = 0; #ifdef EXT3FS_DEBUG 	static int goal_hits, goal_attempts;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -