cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [GFS2 Patch] GFS2: O_TRUNC not working on stuffed files across cluster
@ 2010-06-24 23:15 Bob Peterson
  2010-06-25  9:54 ` Steven Whitehouse
  0 siblings, 1 reply; 2+ messages in thread
From: Bob Peterson @ 2010-06-24 23:15 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Hi,

This patch replaces a statement that got dropped out by accident.
Without the patch, truncates on stuffed (very small) files cause
those files to have an unpredictable size.

Regards,

Bob Peterson
Red Hat File Systems


Signed-off-by: Bob Peterson <rpeterso@redhat.com>
--
 fs/gfs2/bmap.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
index 0db0cd9..a7b1c7c 100644
--- a/fs/gfs2/bmap.c
+++ b/fs/gfs2/bmap.c
@@ -1042,6 +1042,7 @@ static int trunc_start(struct gfs2_inode *ip, u64 size)
 
 	if (gfs2_is_stuffed(ip)) {
 		u64 dsize = size + sizeof(struct gfs2_inode);
+		ip->i_disksize = size;
 		ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME;
 		gfs2_trans_add_bh(ip->i_gl, dibh, 1);
 		gfs2_dinode_out(ip, dibh->b_data);



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Cluster-devel] [GFS2 Patch] GFS2: O_TRUNC not working on stuffed files across cluster
  2010-06-24 23:15 [Cluster-devel] [GFS2 Patch] GFS2: O_TRUNC not working on stuffed files across cluster Bob Peterson
@ 2010-06-25  9:54 ` Steven Whitehouse
  0 siblings, 0 replies; 2+ messages in thread
From: Steven Whitehouse @ 2010-06-25  9:54 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Hi,

Now in the -nmw tree. Thanks,

Steve.

On Thu, 2010-06-24 at 19:15 -0400, Bob Peterson wrote:
> Hi,
> 
> This patch replaces a statement that got dropped out by accident.
> Without the patch, truncates on stuffed (very small) files cause
> those files to have an unpredictable size.
> 
> Regards,
> 
> Bob Peterson
> Red Hat File Systems
> 
> 
> Signed-off-by: Bob Peterson <rpeterso@redhat.com>
> --
>  fs/gfs2/bmap.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
> index 0db0cd9..a7b1c7c 100644
> --- a/fs/gfs2/bmap.c
> +++ b/fs/gfs2/bmap.c
> @@ -1042,6 +1042,7 @@ static int trunc_start(struct gfs2_inode *ip, u64 size)
>  
>  	if (gfs2_is_stuffed(ip)) {
>  		u64 dsize = size + sizeof(struct gfs2_inode);
> +		ip->i_disksize = size;
>  		ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME;
>  		gfs2_trans_add_bh(ip->i_gl, dibh, 1);
>  		gfs2_dinode_out(ip, dibh->b_data);




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-06-25  9:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-24 23:15 [Cluster-devel] [GFS2 Patch] GFS2: O_TRUNC not working on stuffed files across cluster Bob Peterson
2010-06-25  9:54 ` 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).