linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Ren <zren@suse.com>
To: Junxiao Bi <junxiao.bi@oracle.com>, ocfs2-devel@oss.oracle.com
Cc: akpm@linux-foundation.org, mfasheh@versity.com,
	jlbec@evilplan.org, ghe@suse.com, jiangqi903@gmail.com,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] ocfs2/dlmglue: prepare tracking logic to avoid recursive cluster lock
Date: Mon, 16 Jan 2017 11:31:48 +0800	[thread overview]
Message-ID: <f347aaf5-cd16-d2f1-477f-375aa8de9210@suse.com> (raw)
In-Reply-To: <18438355-5e33-3efc-cc88-05f877652b4b@oracle.com>

Hi Junxiao,
>> OK, good suggestion. Hrm, but in order to align with "ocfs2_inc_holders", I
>> think it's good to keep those function names as it is;-)
> that name is also not very clear. Maybe you can make another patch to
> clear it.

Maybe, the name completeness needs to compromise with the name length at
some time.  One of basic rules is whether the name may confuse the reader.
In this case,  "ocfs2_inc_holders"  in dlmglue.c sounds good to me, not ambiguous.

I want to go with it. Anyone who don't like the name can propose their patch for it;-)

Thanks,
Eric

>
> Thanks,
> Junxiao.
>
>
>> Thanks for your review!
>> Eric
>>
>>> Thanks,
>>> Junxiao.
>>>
>>>> +    struct list_head oh_list;
>>>> +    struct pid *oh_owner_pid;
>>>> +};
>>>> +
>>>>    /* ocfs2_inode_lock_full() 'arg_flags' flags */
>>>>    /* don't wait on recovery. */
>>>>    #define OCFS2_META_LOCK_RECOVERY    (0x01)
>>>> @@ -77,6 +82,8 @@ struct ocfs2_orphan_scan_lvb {
>>>>    #define OCFS2_META_LOCK_NOQUEUE        (0x02)
>>>>    /* don't block waiting for the downconvert thread, instead return
>>>> -EAGAIN */
>>>>    #define OCFS2_LOCK_NONBLOCK        (0x04)
>>>> +/* just get back disk inode bh if we've got cluster lock. */
>>>> +#define OCFS2_META_LOCK_GETBH        (0x08)
>>>>      /* Locking subclasses of inode cluster lock */
>>>>    enum {
>>>> @@ -170,4 +177,15 @@ void ocfs2_put_dlm_debug(struct ocfs2_dlm_debug
>>>> *dlm_debug);
>>>>      /* To set the locking protocol on module initialization */
>>>>    void ocfs2_set_locking_protocol(void);
>>>> +
>>>> +/*
>>>> + * Keep a list of processes who have interest in a lockres.
>>>> + * Note: this is now only uesed for check recursive cluster lock.
>>>> + */
>>>> +inline void ocfs2_add_holder(struct ocfs2_lock_res *lockres,
>>>> +                 struct ocfs2_holder *oh);
>>>> +inline void ocfs2_remove_holder(struct ocfs2_lock_res *lockres,
>>>> +                 struct ocfs2_holder *oh);
>>>> +inline struct ocfs2_holder *ocfs2_is_locked_by_me(struct
>>>> ocfs2_lock_res *lockres);
>>>> +
>>>>    #endif    /* DLMGLUE_H */
>>>> diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h
>>>> index 7e5958b..0c39d71 100644
>>>> --- a/fs/ocfs2/ocfs2.h
>>>> +++ b/fs/ocfs2/ocfs2.h
>>>> @@ -172,6 +172,7 @@ struct ocfs2_lock_res {
>>>>          struct list_head         l_blocked_list;
>>>>        struct list_head         l_mask_waiters;
>>>> +    struct list_head     l_holders;
>>>>          unsigned long         l_flags;
>>>>        char                     l_name[OCFS2_LOCK_ID_MAX_LEN];
>>>>
>

  reply	other threads:[~2017-01-16  3:34 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-05 15:31 [PATCH 0/2] fix deadlock caused by recursive cluster locking Eric Ren
2017-01-05 15:31 ` [PATCH 1/2] ocfs2/dlmglue: prepare tracking logic to avoid recursive cluster lock Eric Ren
2017-01-06  6:07   ` Joseph Qi
2017-01-06  7:03     ` Eric Ren
2017-01-06  7:24       ` Joseph Qi
2017-01-06  8:04         ` Eric Ren
2017-01-13  3:59   ` Junxiao Bi
2017-01-13  6:12     ` Eric Ren
2017-01-16  2:42       ` Junxiao Bi
2017-01-16  3:31         ` Eric Ren [this message]
2017-01-05 15:31 ` [PATCH 2/2] ocfs2: fix deadlocks when taking inode lock at vfs entry points Eric Ren
2017-01-06  6:09   ` Joseph Qi
2017-01-06  6:56     ` Eric Ren
2017-01-06  7:14       ` Joseph Qi
2017-01-06  8:21         ` Eric Ren
2017-01-06  9:03           ` Joseph Qi
2017-01-06  9:13             ` Eric Ren
2017-01-06  9:55               ` Joseph Qi
2017-01-06 11:56                 ` Eric Ren
2017-01-09  1:13                   ` Joseph Qi
2017-01-09  2:13                     ` Eric Ren
2017-01-12 11:24                       ` [Ocfs2-devel] " Eric Ren
2017-01-12 11:36                         ` Joseph Qi
2017-01-06 14:52   ` kbuild test robot
2017-01-09  5:24     ` Eric Ren
2017-01-06 17:53   ` kbuild test robot
2017-01-13  4:22   ` Junxiao Bi
2017-01-13  6:19     ` Eric Ren
2017-01-16  2:46       ` Junxiao Bi
2017-01-16  3:06         ` Eric Ren
2017-01-16  3:13           ` Junxiao Bi
2017-01-16  3:17             ` Eric Ren

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=f347aaf5-cd16-d2f1-477f-375aa8de9210@suse.com \
    --to=zren@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=ghe@suse.com \
    --cc=jiangqi903@gmail.com \
    --cc=jlbec@evilplan.org \
    --cc=junxiao.bi@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mfasheh@versity.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).