From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Whitehouse Date: Mon, 15 Sep 2008 11:24:36 +0100 Subject: [Cluster-devel] [GFS2 PATCH] Direct IO write at end of file error In-Reply-To: <370922106.2117901221161737548.JavaMail.root@zmail02.collab.prod.int.phx2.redhat.com> References: <370922106.2117901221161737548.JavaMail.root@zmail02.collab.prod.int.phx2.redhat.com> Message-ID: <1221474276.3555.3.camel@quoit> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, Well spotted. Applied, thanks, Steve. On Thu, 2008-09-11 at 15:35 -0400, Bob Peterson wrote: > Hi, > > This patch fixes a problem whereby a direct_io write doesn't fall > back to buffered write properly at end of file. > > Regards, > > Bob Peterson > -- > fs/gfs2/ops_address.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c > index e64a1b0..ae7126a 100644 > --- a/fs/gfs2/ops_address.c > +++ b/fs/gfs2/ops_address.c > @@ -975,7 +975,7 @@ static int gfs2_ok_for_dio(struct gfs2_inode *ip, int rw, loff_t offset) > if (gfs2_is_stuffed(ip)) > return 0; > > - if (offset > i_size_read(&ip->i_inode)) > + if (offset >= i_size_read(&ip->i_inode)) > return 0; > return 1; > } >