From: Dave Chinner Date: Tue, 24 Aug 2010 01:44:56 +0000 (+1000) Subject: xfs: handle negative wbc->nr_to_write during sync writeback X-Git-Tag: v2.6.36-rc3~27^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=efceab1d563153a2b1a6e7d35376241a48126989;p=pandora-kernel.git xfs: handle negative wbc->nr_to_write during sync writeback During data integrity (WB_SYNC_ALL) writeback, wbc->nr_to_write will go negative on inodes with more than 1024 dirty pages due to implementation details of write_cache_pages(). Currently XFS will abort page clustering in writeback once nr_to_write drops below zero, and so for data integrity writeback we will do very inefficient page at a time allocation and IO submission for inodes with large numbers of dirty pages. Fix this by only aborting the page clustering code when wbc->nr_to_write is negative and the sync mode is WB_SYNC_NONE. Cc: Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig --- Reading git-diff-tree failed