From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bob Peterson Date: Thu, 11 Sep 2008 15:35:37 -0400 (EDT) Subject: [Cluster-devel] [GFS2 PATCH] Direct IO write at end of file error Message-ID: <370922106.2117901221161737548.JavaMail.root@zmail02.collab.prod.int.phx2.redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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; }