All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joel Becker <Joel.Becker@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 6/6] ocfs2/dlm: dlm_thread should not sleep while holding the dlm_spinlock
Date: Sun Mar  2 18:52:49 2008	[thread overview]
Message-ID: <20080303025149.GF6897@mail.oracle.com> (raw)
In-Reply-To: <1204409065-10953-7-git-send-email-sunil.mushran@oracle.com>

On Sat, Mar 01, 2008 at 02:04:25PM -0800, Sunil Mushran wrote:
> This patch addresses the bug in which the dlm_thread could go to sleep
> while holding the dlm_spinlock.
> 
> Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>

> ---
>  fs/ocfs2/dlm/dlmthread.c |    6 ++++--
>  1 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/ocfs2/dlm/dlmthread.c b/fs/ocfs2/dlm/dlmthread.c
> index cebd089..4060bb3 100644
> --- a/fs/ocfs2/dlm/dlmthread.c
> +++ b/fs/ocfs2/dlm/dlmthread.c
> @@ -176,12 +176,14 @@ static int dlm_purge_lockres(struct dlm_ctxt *dlm,
>  	     res->lockname.name, master);
>  
>  	if (!master) {
> +		/* drop spinlock...  retake below */
> +		spin_unlock(&dlm->spinlock);
> +
>  		spin_lock(&res->spinlock);
>  		/* This ensures that clear refmap is sent after the set */
>  		__dlm_wait_on_lockres_flags(res, DLM_LOCK_RES_SETREF_INPROG);
>  		spin_unlock(&res->spinlock);
> -		/* drop spinlock to do messaging, retake below */
> -		spin_unlock(&dlm->spinlock);
> +
>  		/* clear our bit from the master's refmap, ignore errors */
>  		ret = dlm_drop_lockres_ref(dlm, res);
>  		if (ret < 0) {
> -- 
> 1.5.3.6
> 
> 
> _______________________________________________
> Ocfs2-devel mailing list
> Ocfs2-devel@oss.oracle.com
> http://oss.oracle.com/mailman/listinfo/ocfs2-devel

-- 

"This is the end, beautiful friend.
 This is the end, my only friend the end
 Of our elaborate plans, the end
 Of everything that stands, the end
 No safety or surprise, the end
 I'll never look into your eyes again."

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@oracle.com
Phone: (650) 506-8127

  reply	other threads:[~2008-03-02 18:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-01 14:04 [Ocfs2-devel] DLM bug fixes and cleanups Sunil Mushran
2008-03-01 14:04 ` [Ocfs2-devel] [PATCH 6/6] ocfs2/dlm: dlm_thread should not sleep while holding the dlm_spinlock Sunil Mushran
2008-03-02 18:52   ` Joel Becker [this message]
2008-03-01 14:04 ` [Ocfs2-devel] [PATCH 1/6] ocfs2/dlm: Add missing dlm_lock_put()s Sunil Mushran
2008-03-02 18:12   ` Joel Becker
2008-03-01 14:04 ` [Ocfs2-devel] [PATCH 4/6] ocfs2/dlm: Move struct dlm_master_list_entry to dlmcommon.h Sunil Mushran
2008-03-02 18:18   ` Joel Becker
2008-03-03 10:36     ` Sunil Mushran
2008-03-03 12:28       ` Joel Becker
2008-03-04 13:55       ` Mark Fasheh
2008-03-04 13:57         ` Sunil Mushran
2008-03-01 14:04 ` [Ocfs2-devel] [PATCH 5/6] ocfs2/dlm: Print message showing the recovery master Sunil Mushran
2008-03-01 14:04 ` [Ocfs2-devel] [PATCH 3/6] ocfs2/dlm: Add missing dlm_lockres_put()s Sunil Mushran
2008-03-02 18:16   ` Joel Becker
2008-03-01 14:04 ` [Ocfs2-devel] [PATCH 2/6] ocfs2/dlm: Add missing dlm_lockres_put()s in migration path Sunil Mushran
2008-03-02 18:14   ` Joel Becker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080303025149.GF6897@mail.oracle.com \
    --to=joel.becker@oracle.com \
    --cc=ocfs2-devel@oss.oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.