All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wengang Wang <wen.gang.wang@oracle.com>
To: ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [PATCH 1/1] OCFS2: anti stale inode for nfs (V3)
Date: Wed, 18 Feb 2009 16:30:13 +0800	[thread overview]
Message-ID: <499BC715.2000701@oracle.com> (raw)
In-Reply-To: <20090218013700.GA26431@mail.oracle.com>

>> this patch is based on 1.4 git.
> 
> 	Going forward, fixes really need to be against mainline.  Let's
> finish out this patch against 1.4 and then you can port it to mainline.
> But for the future, we fix against mainline and backport.
> 
Ok, I will follow that from next posting.

> 
> 	You can drop the suballocator lock here.  Taking the lock has
> made sure that other nodes flushed their journals.  You have just
> validated that the bit is set, and other nodes cannot clear the bit
> until they get the nfs_sync lock, which you already hold.  So it is safe
> to call ocfs2_inode_unlock(inode_alloc_inode, 0) and
> mutex_unlock(&inode_alloc_inode->i_mutex) before calling ocfs2_iget().
> 	This has two benefits.  Number 1, we don't take the suballoc
> lock and the inode lock (in iget()) at the same time.  The fewer locks
> we take at the same time, the better.  Number 2, this means the entire
> suballocator lookup code above can be made into a subfunction.  This
> improves the readability of the code.
>
good point! will revise the code.

>> +	if (suballoc_slot)
>> +		*suballoc_slot = le16_to_cpu(inode_fe->i_suballoc_slot);
> 
> 	Probably want to validate that suballoc_slot is within the range
> of valid slot numbers.  Just in case.
in what case could the suballoc_slot be out of range?

> 	Otherwise, everything looks good.  The nfs_sync_lock is good.
> It will need to be added to debugfs.ocfs2's lock displays.

next post will be against mainline. and the patch for debugfs.ocfs2 will
be available later to ocfs2-tools-devel@

thanks,
wengang.

  reply	other threads:[~2009-02-18  8:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-17 12:53 [Ocfs2-devel] [PATCH 1/1] OCFS2: anti stale inode for nfs (V3) wengang wang
2009-02-18  1:37 ` Joel Becker
2009-02-18  8:30   ` Wengang Wang [this message]
2009-02-18 17:43     ` Joel Becker
2009-02-19 13:10   ` Wengang Wang
2009-02-19 17:35     ` Joel Becker
2009-02-19 19:29     ` Sunil Mushran
2009-04-10 12:50       ` Wengang Wang

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=499BC715.2000701@oracle.com \
    --to=wen.gang.wang@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.