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] question for lvb->lvb_igeneration
Date: Wed, 31 Mar 2010 15:29:38 +0800	[thread overview]
Message-ID: <20100331072938.GA2446@laptop.oracle.com> (raw)
In-Reply-To: <4BB2E78B.9030909@suse.de>

Hi Coly,

On 10-03-31 14:11, Coly Li wrote:
> 
> 
> On 03/31/2010 10:44 AM, Wengang Wang Wrote:
> > Hi Coly,
> > 
> > Let me try to comment.
> >> My question is, is it possible that same inode's lvb->lvb_size and di->i_size can be different ? And if an inode lvb is
> >> really trustable when ocfs2_meta_lvb_is_trustable() returns 1 ?
> > 
> > I think lvb is trustable. If di->i_size mismatches lvb->lvb_size, either
> > we are taking a wrong lvb or the di is stale.
> >>
> >> The reason why I ask this question, is because of bnc#591039 (https://bugzilla.novell.com/show_bug.cgi?id=591039).
> 
> Hi Wengang,
> 
> Thanks for the replying:-)
> Another question is, in which cases when di is staled, di->i_size is different to lvb->lvb_isize ? IMHO, update the on
> disk inode will take an EX lock which will update lvb->lvb_isize as well ?

Suppose the you got the di before prior EX holder flushed changes to disk, the di could be stale.
And if the happen to be a size change on the prior EX holder, di->i_size
!= lvb->lvb_isize. Well, this case shouldn't happen unless there is bug.

lvb values are set when and only when EX holder downgrades the lock. And
the values are from in-memory inode(and/or ocfs2_inode_info). That means
no update on lvb->lvb_isize when we update meta from disk.

      reply	other threads:[~2010-03-31  7:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-31  1:09 [Ocfs2-devel] question for lvb->lvb_igeneration Coly Li
2010-03-31  2:44 ` Wengang Wang
2010-03-31  6:11   ` Coly Li
2010-03-31  7:29     ` Wengang Wang [this message]

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=20100331072938.GA2446@laptop.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.