[Ocfs2-commits] smushran commits r2814 - branches/ocfs2-1.2-cert/patches

svn-commits@oss.oracle.com svn-commits at oss.oracle.com
Mon Apr 3 13:31:36 CDT 2006


Author: smushran
Signed-off-by: khackel
Date: 2006-04-03 13:31:35 -0500 (Mon, 03 Apr 2006)
New Revision: 2814

Added:
   branches/ocfs2-1.2-cert/patches/dlm-replace_gfp_kernel_with_nofs
Modified:
   branches/ocfs2-1.2-cert/patches/series
Log:
added patch dlm-replace_gfp_kernel_with_nofs
Signed-off-by: khackel

Added: branches/ocfs2-1.2-cert/patches/dlm-replace_gfp_kernel_with_nofs
===================================================================
--- branches/ocfs2-1.2-cert/patches/dlm-replace_gfp_kernel_with_nofs	2006-04-03 08:11:46 UTC (rev 2813)
+++ branches/ocfs2-1.2-cert/patches/dlm-replace_gfp_kernel_with_nofs	2006-04-03 18:31:35 UTC (rev 2814)
@@ -0,0 +1,236 @@
+Index: ocfs2-1.2-cert/fs/ocfs2/dlm/dlmrecovery.c
+===================================================================
+--- ocfs2-1.2-cert.orig/fs/ocfs2/dlm/dlmrecovery.c	2006-04-03 10:47:03.415750000 -0700
++++ ocfs2-1.2-cert/fs/ocfs2/dlm/dlmrecovery.c	2006-04-03 10:48:29.242215000 -0700
+@@ -769,7 +769,7 @@
+ 		}
+ 		BUG_ON(num == dead_node);
+ 
+-		ndata = kcalloc(1, sizeof(*ndata), GFP_KERNEL);
++		ndata = kcalloc(1, sizeof(*ndata), GFP_NOFS);
+ 		if (!ndata) {
+ 			dlm_destroy_recovery_area(dlm, dead_node);
+ 			return -ENOMEM;
+@@ -853,14 +853,14 @@
+ 	}
+ 	BUG_ON(lr->dead_node != dlm->reco.dead_node);
+ 
+-	item = kcalloc(1, sizeof(*item), GFP_KERNEL);
++	item = kcalloc(1, sizeof(*item), GFP_NOFS);
+ 	if (!item) {
+ 		dlm_put(dlm);
+ 		return -ENOMEM;
+ 	}
+ 
+ 	/* this will get freed by dlm_request_all_locks_worker */
+-	buf = (char *) __get_free_page(GFP_KERNEL);
++	buf = (char *) __get_free_page(GFP_NOFS);
+ 	if (!buf) {
+ 		kfree(item);
+ 		dlm_put(dlm);
+@@ -1338,8 +1338,8 @@
+ 		mlog(0, "all done flag.  all lockres data received!\n");
+ 
+ 	ret = -ENOMEM;
+-	buf = kmalloc(be16_to_cpu(msg->data_len), GFP_KERNEL);
+-	item = kcalloc(1, sizeof(*item), GFP_KERNEL);
++	buf = kmalloc(be16_to_cpu(msg->data_len), GFP_NOFS);
++	item = kcalloc(1, sizeof(*item), GFP_NOFS);
+ 	if (!buf || !item)
+ 		goto leave;
+ 
+Index: ocfs2-1.2-cert/fs/ocfs2/dlm/dlmdebug.c
+===================================================================
+--- ocfs2-1.2-cert.orig/fs/ocfs2/dlm/dlmdebug.c	2006-03-27 14:36:39.586328000 -0800
++++ ocfs2-1.2-cert/fs/ocfs2/dlm/dlmdebug.c	2006-04-03 10:49:56.119288000 -0700
+@@ -177,7 +177,7 @@
+ 		mlog(ML_ERROR, "user passed too little data: %d bytes\n", len);
+ 		goto leave;
+ 	}
+-	buf = kmalloc(len+1, GFP_KERNEL);
++	buf = kmalloc(len+1, GFP_NOFS);
+ 	if (!buf) {
+ 		mlog(ML_ERROR, "could not alloc %d bytes\n", len+1);
+ 		ret = -ENOMEM;
+@@ -436,7 +436,7 @@
+ 		mlog(ML_ERROR, "user passed too little data: %d bytes\n", len);
+ 		goto leave;
+ 	}
+-	buf = kmalloc(len+1, GFP_KERNEL);
++	buf = kmalloc(len+1, GFP_NOFS);
+ 	if (!buf) {
+ 		mlog(ML_ERROR, "could not alloc %d bytes\n", len+1);
+ 		ret = -ENOMEM;
+Index: ocfs2-1.2-cert/fs/ocfs2/dlm/dlmdomain.c
+===================================================================
+--- ocfs2-1.2-cert.orig/fs/ocfs2/dlm/dlmdomain.c	2006-04-03 10:47:01.265464000 -0700
++++ ocfs2-1.2-cert/fs/ocfs2/dlm/dlmdomain.c	2006-04-03 10:50:35.553705000 -0700
+@@ -892,7 +892,7 @@
+ 
+ 	mlog_entry("%p", dlm);
+ 
+-	ctxt = kcalloc(1, sizeof(*ctxt), GFP_KERNEL);
++	ctxt = kcalloc(1, sizeof(*ctxt), GKP_NOFS);
+ 	if (!ctxt) {
+ 		status = -ENOMEM;
+ 		mlog_errno(status);
+@@ -1187,13 +1187,13 @@
+ 	int i;
+ 	struct dlm_ctxt *dlm = NULL;
+ 
+-	dlm = kcalloc(1, sizeof(*dlm), GFP_KERNEL);
++	dlm = kcalloc(1, sizeof(*dlm), GKP_NOFS);
+ 	if (!dlm) {
+ 		mlog_errno(-ENOMEM);
+ 		goto leave;
+ 	}
+ 
+-	dlm->name = kmalloc(strlen(domain) + 1, GFP_KERNEL);
++	dlm->name = kmalloc(strlen(domain) + 1, GKP_NOFS);
+ 	if (dlm->name == NULL) {
+ 		mlog_errno(-ENOMEM);
+ 		kfree(dlm);
+@@ -1201,7 +1201,7 @@
+ 		goto leave;
+ 	}
+ 
+-	dlm->lockres_hash = (struct hlist_head *) __get_free_page(GFP_KERNEL);
++	dlm->lockres_hash = (struct hlist_head *) __get_free_page(GKP_NOFS);
+ 	if (!dlm->lockres_hash) {
+ 		mlog_errno(-ENOMEM);
+ 		kfree(dlm->name);
+Index: ocfs2-1.2-cert/fs/ocfs2/dlm/dlmfs.c
+===================================================================
+--- ocfs2-1.2-cert.orig/fs/ocfs2/dlm/dlmfs.c	2006-03-27 14:36:39.384360000 -0800
++++ ocfs2-1.2-cert/fs/ocfs2/dlm/dlmfs.c	2006-04-03 10:51:04.329460000 -0700
+@@ -116,7 +116,7 @@
+ 	 * doesn't make sense for LVB writes. */
+ 	file->f_flags &= ~O_APPEND;
+ 
+-	fp = kmalloc(sizeof(*fp), GFP_KERNEL);
++	fp = kmalloc(sizeof(*fp), GFP_NOFS);
+ 	if (!fp) {
+ 		status = -ENOMEM;
+ 		goto bail;
+@@ -196,7 +196,7 @@
+ 	else
+ 		readlen = count - *ppos;
+ 
+-	lvb_buf = kmalloc(readlen, GFP_KERNEL);
++	lvb_buf = kmalloc(readlen, GFP_NOFS);
+ 	if (!lvb_buf)
+ 		return -ENOMEM;
+ 
+@@ -240,7 +240,7 @@
+ 	else
+ 		writelen = count - *ppos;
+ 
+-	lvb_buf = kmalloc(writelen, GFP_KERNEL);
++	lvb_buf = kmalloc(writelen, GFP_NOFS);
+ 	if (!lvb_buf)
+ 		return -ENOMEM;
+ 
+Index: ocfs2-1.2-cert/fs/ocfs2/dlm/dlmlock.c
+===================================================================
+--- ocfs2-1.2-cert.orig/fs/ocfs2/dlm/dlmlock.c	2006-04-03 10:47:00.635491000 -0700
++++ ocfs2-1.2-cert/fs/ocfs2/dlm/dlmlock.c	2006-04-03 10:51:27.635965000 -0700
+@@ -408,13 +408,13 @@
+ 	struct dlm_lock *lock;
+ 	int kernel_allocated = 0;
+ 
+-	lock = kcalloc(1, sizeof(*lock), GFP_KERNEL);
++	lock = kcalloc(1, sizeof(*lock), GFP_NOFS);
+ 	if (!lock)
+ 		return NULL;
+ 
+ 	if (!lksb) {
+ 		/* zero memory only if kernel-allocated */
+-		lksb = kcalloc(1, sizeof(*lksb), GFP_KERNEL);
++		lksb = kcalloc(1, sizeof(*lksb), GFP_NOFS);
+ 		if (!lksb) {
+ 			kfree(lock);
+ 			return NULL;
+Index: ocfs2-1.2-cert/fs/ocfs2/dlm/dlmmaster.c
+===================================================================
+--- ocfs2-1.2-cert.orig/fs/ocfs2/dlm/dlmmaster.c	2006-04-03 10:47:01.878142000 -0700
++++ ocfs2-1.2-cert/fs/ocfs2/dlm/dlmmaster.c	2006-04-03 10:52:12.530632000 -0700
+@@ -699,11 +699,11 @@
+ {
+ 	struct dlm_lock_resource *res;
+ 
+-	res = kmalloc(sizeof(struct dlm_lock_resource), GFP_KERNEL);
++	res = kmalloc(sizeof(struct dlm_lock_resource), GFP_NOFS);
+ 	if (!res)
+ 		return NULL;
+ 
+-	res->lockname.name = kmalloc(namelen, GFP_KERNEL);
++	res->lockname.name = kmalloc(namelen, GFP_NOFS);
+ 	if (!res->lockname.name) {
+ 		kfree(res);
+ 		return NULL;
+@@ -766,7 +766,7 @@
+ 		mlog(0, "allocating a new resource\n");
+ 		/* nothing found and we need to allocate one. */
+ 		alloc_mle = (struct dlm_master_list_entry *)
+-			kmem_cache_alloc(dlm_mle_cache, GFP_KERNEL);
++			kmem_cache_alloc(dlm_mle_cache, GFP_NOFS);
+ 		if (!alloc_mle)
+ 			goto leave;
+ 		res = dlm_new_lockres(dlm, lockid, namelen);
+@@ -1587,7 +1587,7 @@
+ 			spin_unlock(&dlm->spinlock);
+ 
+ 			mle = (struct dlm_master_list_entry *)
+-				kmem_cache_alloc(dlm_mle_cache, GFP_KERNEL);
++				kmem_cache_alloc(dlm_mle_cache, GFP_NOFS);
+ 			if (!mle) {
+ 				response = DLM_MASTER_RESP_ERROR;
+ 				mlog_errno(-ENOMEM);
+@@ -1996,7 +1996,7 @@
+ 			       int ignore_higher, u8 request_from, u32 flags)
+ {
+ 	struct dlm_work_item *item;
+-	item = kcalloc(1, sizeof(*item), GFP_KERNEL);
++	item = kcalloc(1, sizeof(*item), GFP_NOFS);
+ 	if (!item)
+ 		return -ENOMEM;
+ 
+@@ -2232,14 +2232,14 @@
+ 	 */
+ 
+ 	ret = -ENOMEM;
+-	mres = (struct dlm_migratable_lockres *) __get_free_page(GFP_KERNEL);
++	mres = (struct dlm_migratable_lockres *) __get_free_page(GFP_NOFS);
+ 	if (!mres) {
+ 		mlog_errno(ret);
+ 		goto leave;
+ 	}
+ 
+ 	mle = (struct dlm_master_list_entry *) kmem_cache_alloc(dlm_mle_cache,
+-								GFP_KERNEL);
++								GFP_NOFS);
+ 	if (!mle) {
+ 		mlog_errno(ret);
+ 		goto leave;
+@@ -2693,7 +2693,7 @@
+ 
+ 	/* preallocate.. if this fails, abort */
+ 	mle = (struct dlm_master_list_entry *) kmem_cache_alloc(dlm_mle_cache,
+-							 GFP_KERNEL);
++							 GFP_NOFS);
+ 
+ 	if (!mle) {
+ 		ret = -ENOMEM;
+Index: ocfs2-1.2-cert/fs/ocfs2/dlm/userdlm.c
+===================================================================
+--- ocfs2-1.2-cert.orig/fs/ocfs2/dlm/userdlm.c	2006-03-31 14:11:14.075366000 -0800
++++ ocfs2-1.2-cert/fs/ocfs2/dlm/userdlm.c	2006-04-03 10:56:04.232160000 -0700
+@@ -672,7 +672,7 @@
+ 	u32 dlm_key;
+ 	char *domain;
+ 
+-	domain = kmalloc(name->len + 1, GFP_KERNEL);
++	domain = kmalloc(name->len + 1, GFP_NOFS);
+ 	if (!domain) {
+ 		mlog_errno(-ENOMEM);
+ 		return ERR_PTR(-ENOMEM);

Modified: branches/ocfs2-1.2-cert/patches/series
===================================================================
--- branches/ocfs2-1.2-cert/patches/series	2006-04-03 08:11:46 UTC (rev 2813)
+++ branches/ocfs2-1.2-cert/patches/series	2006-04-03 18:31:35 UTC (rev 2814)
@@ -27,3 +27,4 @@
 continue-finalize-reco.patch
 fix-wait-in-mastery.patch
 lame-timeout-dbg.patch
+dlm-replace_gfp_kernel_with_nofs




More information about the Ocfs2-commits mailing list