From: Li Zefan Date: Fri, 2 Sep 2011 07:56:55 +0000 (+0800) Subject: Btrfs: fix wrong max_to_defrag in btrfs_defrag_file() X-Git-Tag: v3.2-rc1~21^2~23^2~14 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ca496604b5975d371bb669ee6c2394bcbea818f;p=pandora-kernel.git Btrfs: fix wrong max_to_defrag in btrfs_defrag_file() It's off-by-one, and thus we may skip the last page while defragmenting. An example case: # create /mnt/file with 2 4K file extents # btrfs fi defrag /mnt/file # sync # filefrag /mnt/file /mnt/file: 2 extents found So it's not defragmented. Signed-off-by: Li Zefan --- Reading git-diff-tree failed