summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_aops.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@infradead.org>2012-02-29 09:53:50 +0000
committerBen Myers <bpm@sgi.com>2012-03-05 11:53:16 -0600
commit84803fb78237014cbbc86c0f012b273a199f4691 (patch)
tree5910f6bae119115d006f65dca3d8e698ed83fb42 /fs/xfs/xfs_aops.c
parent6923e686f19cb7017fc9777a10e06c2e2b2a2936 (diff)
xfs: log file size updates as part of unwritten extent conversion
If we convert and unwritten extent past the current i_size log the size update as part of the extent manipulation transactions instead of doing an unlogged metadata update later. Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Mark Tinguely <tinguely@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_aops.c')
-rw-r--r--fs/xfs/xfs_aops.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c
index 745492b6c666..8e11b07bb281 100644
--- a/fs/xfs/xfs_aops.c
+++ b/fs/xfs/xfs_aops.c
@@ -179,13 +179,14 @@ xfs_end_io(
ioend->io_error = -error;
goto done;
}
+ } else {
+ /*
+ * We might have to update the on-disk file size after
+ * extending writes.
+ */
+ xfs_setfilesize(ioend);
}
- /*
- * We might have to update the on-disk file size after extending
- * writes.
- */
- xfs_setfilesize(ioend);
done:
xfs_destroy_ioend(ioend);
}