From: Rahul Deshmukh Date: Fri, 22 Jan 2010 02:42:24 +0000 (+0530) Subject: jbd2 spinlock hang fix for rhel5 and added error check X-Git-Tag: 1.10.0.35~1 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=8c1a09266b8dbb8443ab21c2e5b6a25ed3e3a2e2;hp=562c1a56135e1d34c1a10ceec52532bc6eab0c3d;ds=sidebyside jbd2 spinlock hang fix for rhel5 and added error check b=21595 mdsrate-create-large.sh, BUG: soft lockup - CPU#0 stuck for 10s! [ll_ost_io_04:8153] jbd2 spinlock hang fix for rhel5 and added error check i=johann i=girish --- diff --git a/lustre/kernel_patches/patches/jbd2-jcberr-2.6-rhel5.patch b/lustre/kernel_patches/patches/jbd2-jcberr-2.6-rhel5.patch index 2933591..5c15956 100644 --- a/lustre/kernel_patches/patches/jbd2-jcberr-2.6-rhel5.patch +++ b/lustre/kernel_patches/patches/jbd2-jcberr-2.6-rhel5.patch @@ -101,12 +101,12 @@ Index: linux-2.6.18-128.1.6/fs/jbd2/checkpoint.c Index: linux-2.6.18-128.1.6/fs/jbd2/commit.c =================================================================== ---- linux-2.6.18-128.1.6.orig/fs/jbd2/commit.c 2009-04-15 08:35:28.000000000 +0530 -+++ linux-2.6.18-128.1.6/fs/jbd2/commit.c 2009-05-28 15:12:45.000000000 +0530 -@@ -898,6 +898,30 @@ +--- linux-2.6.18-164.6.1/fs/jbd2/commit.c 2010-01-21 11:24:52.000000000 +0530 ++++ linux-2.6.18-164.6.1_new/fs/jbd2/commit.c 2010-01-21 11:26:36.000000000 +0530 +@@ -832,6 +832,29 @@ wait_for_iobuf: + processing: any buffers committed as a result of this transaction can be removed from any checkpoint list it was on before. */ - + /* + * Call any callbacks that had been registered for handles in this + * transaction. It is up to the callback to free any allocated @@ -130,10 +130,9 @@ Index: linux-2.6.18-128.1.6/fs/jbd2/commit.c + } + } + spin_unlock(&commit_transaction->t_jcb_lock); -+ - jbd_debug(3, "JBD: commit phase 7\n"); - J_ASSERT(commit_transaction->t_sync_datalist == NULL); + jbd_debug(3, "JBD: commit phase 6\n"); + Index: linux-2.6.18-128.1.6/fs/jbd2/journal.c =================================================================== --- linux-2.6.18-128.1.6.orig/fs/jbd2/journal.c 2009-04-15 08:35:28.000000000 +0530 diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c index 1d062b4..94c66d6 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -1564,7 +1564,7 @@ static int filter_prepare_destroy(struct obd_device *obd, obd_id objid, static void filter_fini_destroy(struct obd_device *obd, struct lustre_handle *lockh) { - if (lockh->cookie) + if (lustre_handle_is_used(lockh)) ldlm_lock_decref(lockh, LCK_PW); } @@ -4089,7 +4089,9 @@ int filter_destroy(struct obd_export *exp, struct obdo *oa, GOTO(cleanup, rc = -ENOENT); } - filter_prepare_destroy(obd, oa->o_id, oa->o_gr, &lockh); + rc = filter_prepare_destroy(obd, oa->o_id, oa->o_gr, &lockh); + if (rc) + GOTO(cleanup, rc); /* Our MDC connection is established by the MDS to us */ if (oa->o_valid & OBD_MD_FLCOOKIE) {