From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Whitehouse Date: Fri, 25 Jun 2010 10:54:18 +0100 Subject: [Cluster-devel] [GFS2 Patch] GFS2: O_TRUNC not working on stuffed files across cluster In-Reply-To: <956990027.894591277421309643.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com> References: <956990027.894591277421309643.JavaMail.root@zmail06.collab.prod.int.phx2.redhat.com> Message-ID: <1277459658.2507.5.camel@localhost> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, Now in the -nmw tree. Thanks, Steve. On Thu, 2010-06-24 at 19:15 -0400, Bob Peterson wrote: > Hi, > > This patch replaces a statement that got dropped out by accident. > Without the patch, truncates on stuffed (very small) files cause > those files to have an unpredictable size. > > Regards, > > Bob Peterson > Red Hat File Systems > > > Signed-off-by: Bob Peterson > -- > fs/gfs2/bmap.c | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c > index 0db0cd9..a7b1c7c 100644 > --- a/fs/gfs2/bmap.c > +++ b/fs/gfs2/bmap.c > @@ -1042,6 +1042,7 @@ static int trunc_start(struct gfs2_inode *ip, u64 size) > > if (gfs2_is_stuffed(ip)) { > u64 dsize = size + sizeof(struct gfs2_inode); > + ip->i_disksize = size; > ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME; > gfs2_trans_add_bh(ip->i_gl, dibh, 1); > gfs2_dinode_out(ip, dibh->b_data);