[PATCH 02/27] xfs: re-enable non-blocking behaviour in xfs_map_blocks

Christoph Hellwig
2011-07-01T09:46:04Z

[-- Attachment #1: xfs-writepage-repair-nolock-support --]
[-- Type: text/plain, Size: 1061 bytes --]

The non-blockig behaviour in xfs_map_blocks currently is conditional on
having both the WB_SYNC_NONE sync_mode and the nonblocking flag set.
The latter used to be used by both pdflush, kswapd and a few other places
in older kernels, but has been fading out starting with the introduction
of the per-bdi flusher threads.

Enable the non-blocking behaviour for all WB_SYNC_NONE calls to get back
the behaviour we want.

Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: xfs/fs/xfs/linux-2.6/xfs_aops.c
===================================================================
--- xfs.orig/fs/xfs/linux-2.6/xfs_aops.c 2011-06-30 20:10:06.959596789 +0200
+++ xfs/fs/xfs/linux-2.6/xfs_aops.c 2011-06-30 20:10:19.749596630 +0200
@@ -959,7 +959,7 @@ xfs_vm_writepage(
offset = page_offset(page);
type = IO_OVERWRITE;

- if (wbc->sync_mode == WB_SYNC_NONE && wbc->nonblocking)
+ if (wbc->sync_mode == WB_SYNC_NONE)
nonblocking = 1;

do {