[Ocfs2-devel] question for lvb->lvb_igeneration

Wengang Wang wen.gang.wang at oracle.com
Wed Mar 31 00:29:38 PDT 2010


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.



More information about the Ocfs2-devel mailing list