* [Cluster-devel] [GFS2 PATCH] Direct IO write at end of file error
@ 2008-09-11 19:35 Bob Peterson
2008-09-15 10:24 ` Steven Whitehouse
0 siblings, 1 reply; 2+ messages in thread
From: Bob Peterson @ 2008-09-11 19:35 UTC (permalink / raw)
To: cluster-devel.redhat.com
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;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Cluster-devel] [GFS2 PATCH] Direct IO write at end of file error
2008-09-11 19:35 [Cluster-devel] [GFS2 PATCH] Direct IO write at end of file error Bob Peterson
@ 2008-09-15 10:24 ` Steven Whitehouse
0 siblings, 0 replies; 2+ messages in thread
From: Steven Whitehouse @ 2008-09-15 10:24 UTC (permalink / raw)
To: cluster-devel.redhat.com
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;
> }
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-09-15 10:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-11 19:35 [Cluster-devel] [GFS2 PATCH] Direct IO write at end of file error Bob Peterson
2008-09-15 10:24 ` Steven Whitehouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).