All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ocfs2-devel] question for lvb->lvb_igeneration
@ 2010-03-31  1:09 Coly Li
  2010-03-31  2:44 ` Wengang Wang
  0 siblings, 1 reply; 4+ messages in thread
From: Coly Li @ 2010-03-31  1:09 UTC (permalink / raw)
  To: ocfs2-devel

Hi,

As my understanding, inode->i_generation only gets updated when inode with same inode number is recreated.
When truncating a file, the modification of di->i_size will not update the inode->i_generation. Therefore, I suspicious
it's problematic in following condition.

1) in ocfs2_inode_lock_update(), if ocfs2_meta_lvb_is_trustable() returns 1, update inode->i_size from lvb->lvb_isize by
ocfs2_refresh_inode_from_lvb().
2) If the inode's di->i_size is changed, and not updated to lvb->lvb_isize (can this happen ?),
ocfs2_meta_lvb_is_trustable() still returns 1, while inode->i_size still updates from lvb->lvb_isize.
3) When di->i_size != lvb->lvb_isize, when execution goes into ocfs2_truncate_file() from ocfs2_setattr(), a
mlog_bug_on_msg((le64_to_cpu(fe->i_size) != i_size_read(inode), ...) will be triggered.

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 ?

The reason why I ask this question, is because of bnc#591039 (https://bugzilla.novell.com/show_bug.cgi?id=591039).

Thanks.
-- 
Coly Li
SuSE Labs

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-03-31  7:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.