From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [GFS2 PATCH] Direct IO write at end of file error
Date: Mon, 15 Sep 2008 11:24:36 +0100 [thread overview]
Message-ID: <1221474276.3555.3.camel@quoit> (raw)
In-Reply-To: <370922106.2117901221161737548.JavaMail.root@zmail02.collab.prod.int.phx2.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;
> }
>
prev parent reply other threads:[~2008-09-15 10:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1221474276.3555.3.camel@quoit \
--to=swhiteho@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).