[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Cluster-devel] [GFS2 PATCH] Direct IO write at end of file error



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;
>  }
> 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]