[PATCH] O_DIRECT invalidation fix
If the alignment checks in generic_direct_IO() fail, we end up not forcing writeback of dirty pagecache pages, but we still run invalidate_inode_pages2(). The net result is that dirty pagecache gets incorrectly removed. I guess this will expose unwritten disk blocks. So move the sync up into generic_file_direct_IO(), where we perform the invalidation. So we know that pagecache and disk are in sync before we do anything else.
Showing
Please register or sign in to comment