From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wendy Cheng Date: Wed, 27 Jun 2007 11:00:03 -0400 Subject: [Cluster-devel] [GFS2 PATCH] inode size inconsistency Message-ID: <46827B73.8040802@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit This should have been part of the NFS patch #1 but somehow I missed it when packaging the patches. It is not a critical issue as the others (I hope). RHEL 5.1 31.el5 kernel runs fine without this change. Our truncate code is chopped into two parts, one for vfs inode changes (in vmtruncate()) and one of gfs inode (in gfs2_truncatei()). These two operatons are, unfortunately, not atomic. So it could happens that vmtruncate() succeeds (inode->i_size is changed) but gfs2_truncatei fails (say kernel temporarily out of memory). This would leave gfs inode i_di.di_size out of sync with vfs inode i_size. It will later confuse gfs2_commit_write() if a write is issued. Last time I checked, it will cause file corruption. -- Wendy -------------- next part -------------- A non-text attachment was scrubbed... Name: 04_gfs2_specsfs.patch Type: text/x-patch Size: 523 bytes Desc: not available URL: