]> git.baikalelectronics.ru Git - kernel.git/commit
Ocfs2: Fix a regression bug from mainline commit(54d1cb99adbab54817a09c06efe709166e4c...
authorTristan Ye <tristan.ye@oracle.com>
Thu, 19 Aug 2010 07:15:00 +0000 (15:15 +0800)
committerTao Ma <tao.ma@oracle.com>
Wed, 8 Sep 2010 06:25:57 +0000 (14:25 +0800)
commite4689a187be69d8c8e0c4cdbee86943e8bed4f15
tree960d5e11585afea6bb4e24a87fb73a975e16883c
parent1fde6038a1744551505a48ce2bf2586606134337
Ocfs2: Fix a regression bug from mainline commit(54d1cb99adbab54817a09c06efe709166e4c7a7c).

The patch is to fix the regression bug brought from commit 54d1cb9...( 'ocfs2:
Avoid direct write if we fall back to buffered I/O'):

http://oss.oracle.com/bugzilla/show_bug.cgi?id=1285

The commit 54d1cb99adbab54817a09c06efe709166e4c7a7c changed __generic_file_aio_write
to generic_file_buffered_write, which didn't call filemap_{write,wait}_range to  flush
the pagecaches when we were falling O_DIRECT writes back to buffered ones. it did hurt
the O_DIRECT semantics somehow in extented odirect writes.

This patch tries to guarantee O_DIRECT writes of 'fall back to buffered' to be correctly
flushed.

Signed-off-by: Tristan Ye <tristan.ye@oracle.com>
Signed-off-by: Tao Ma <tao.ma@oracle.com>
fs/ocfs2/file.c