All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lei Chen <lchen@suse.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] 答复: Re:  [PATCH] Correct a comment error
Date: Wed, 28 Feb 2018 23:59:51 -0700	[thread overview]
Message-ID: <5A97A4E7020000B50006EC49@prv-mh.provo.novell.com> (raw)
In-Reply-To: <63ADC13FD55D6546B7DECE290D39E373F292A95A@H3CMLB12-EX.srv.huawei-3com.com>

Hi Changwei,

Thanks for your review.

I think the original comment is not as clear as you said since 
the code does not reflect any relation between lockid and blockid.

Besides, the function inside indeed uses the block number for
comparision. And it's really misleading for new beginners ,emmmm, like me. 

:)

Thanks,
Larry





>>> Changwei Ge <ge.changwei@h3c.com> 2018-3-1 ?? 8:37 >>>
Hi Larry,

On 2018/2/28 18:18, Larry Chen wrote:
> The function ocfs2_double_lock tries to lock the inode with lower
> blockid first, not lockid.

As ocfs2's lock name includes block number, so I think the comment you want to 
rework is all right.
So nack.

Thanks,
Changwei

> 
> Signed-off-by: Larry Chen <lchen@suse.com>
> ---
>   fs/ocfs2/namei.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c
> index c801eddc4bf3..30d454de35a8 100644
> --- a/fs/ocfs2/namei.c
> +++ b/fs/ocfs2/namei.c
> @@ -1133,7 +1133,7 @@ static int ocfs2_double_lock(struct ocfs2_super *osb,
>       if (*bh2)
>           *bh2 = NULL;
>   
> -    /* we always want to lock the one with the lower lockid first.
> +    /* we always want to lock the one with the lower blockid first.
>        * and if they are nested, we lock ancestor first */
>       if (oi1->ip_blkno != oi2->ip_blkno) {
>           inode1_is_ancestor = ocfs2_check_if_ancestor(osb, oi2->ip_blkno,
> 




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/ocfs2-devel/attachments/20180228/db74a027/attachment.html 

  reply	other threads:[~2018-03-01  6:59 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-28 10:17 [Ocfs2-devel] [PATCH] Correct a comment error Larry Chen
2018-03-01  0:36 ` Changwei Ge
2018-03-01  0:36   ` Changwei Ge
2018-03-01  6:59   ` Lei Chen [this message]
2018-03-02  2:00     ` [Ocfs2-devel] 答复: " Changwei Ge
2018-03-01 12:56 ` [Ocfs2-devel] " piaojun
2018-03-01 12:56   ` piaojun
2018-03-02  1:59   ` Changwei Ge
2018-03-02  1:59     ` Changwei Ge
2018-03-02  2:15     ` piaojun
2018-03-02  2:15       ` piaojun
2018-03-02  2:37       ` Larry Chen
2018-03-02  2:37         ` Larry Chen
2018-03-02  2:38       ` Changwei Ge
2018-03-02  2:38         ` Changwei Ge

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=5A97A4E7020000B50006EC49@prv-mh.provo.novell.com \
    --to=lchen@suse.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.