[GFS2] Reduce truncate IO traffic
authorWendy Cheng <wcheng@redhat.com>
Mon, 20 Aug 2007 13:29:53 +0000 (09:29 -0400)
committerSteven Whitehouse <swhiteho@redhat.com>
Wed, 10 Oct 2007 07:55:36 +0000 (08:55 +0100)
commita13b8c5f2381495879e6facd3b3ada51c9e68194
tree79852951c3074af8b2d9e84fdc03d622bc022be3
parent9a5ad13856cbd10be429f09517c51277c02530f7
[GFS2] Reduce truncate IO traffic

Current GFS2 setattr call unconditionally invokes do_shrink even the
requested size and actual file size are equal. This has generated large
amount of extra IOs found during NFS benchmark runs. This patch moves
the relevant logic out of shrink code path. Since setattr is a system
call, the time stamps update is still required.

Signed-off-by: S. Wendy Cheng <wcheng@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/bmap.c