From: Mark Fasheh Date: Wed, 17 Jan 2007 20:53:31 +0000 (-0800) Subject: ocfs2: teach extend/truncate about sparse files X-Git-Tag: v2.6.22-rc1~1124^2~15 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a0782d09c07aa3ec767ba6089cd15cfbfbfc508;p=pandora-kernel.git ocfs2: teach extend/truncate about sparse files For ocfs2_truncate_file(), we eliminate the "simple" truncate case which no longer exists since i_size is not tied to i_clusters. In ocfs2_extend_file(), we skip the allocation / page zeroing code for file systems which understand sparse files. The core truncate code is changed to do a bottom up tree traversal. This gets abstracted out into it's own function. To make things more readable, most of the special case handling for in-inode extents from ocfs2_do_truncate() is also removed. Though write support for sparse files comes in a later patch, we at least update ocfs2_prepare_inode_for_write() to skip allocation for sparse files. Signed-off-by: Mark Fasheh --- Reading git-diff-tree failed