Sahitya Tummala 1e78e8bd9d f2fs: fix data corruption issue with hardware encryption
Direct IO can be used in case of hardware encryption. The following
scenario results into data corruption issue in this path -

Thread A -                          Thread B-
-> write file#1 in direct IO
                                    -> GC gets kicked in
                                    -> GC submitted bio on meta mapping
				       for file#1, but pending completion
-> write file#1 again with new data
   in direct IO
                                    -> GC bio gets completed now
                                    -> GC writes old data to the new
                                       location and thus file#1 is
				       corrupted.

Fix this by submitting and waiting for pending io on meta mapping
for direct IO case in f2fs_map_blocks().

Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
2018-10-22 17:54:47 -07:00
..
2018-08-21 18:19:09 -07:00
2018-06-11 10:16:13 -07:00
2018-08-21 23:54:17 -04:00
2018-08-21 18:47:36 -07:00
2018-08-15 22:40:03 -07:00
2018-08-17 16:20:28 -07:00
2018-08-15 22:47:23 -07:00
2018-08-18 11:44:53 -07:00
2018-05-22 14:27:52 -04:00
2018-08-23 16:03:58 -07:00
\n
2018-08-29 14:56:45 -07:00
2018-08-17 16:20:27 -07:00
2018-08-21 18:19:09 -07:00
2018-05-22 14:27:52 -04:00
2018-08-18 11:44:53 -07:00
2018-08-24 13:50:07 +02:00
2018-08-21 18:19:09 -07:00
2018-07-03 16:44:45 -04:00
2018-08-14 10:23:25 -07:00
2018-06-05 19:23:26 +02:00
2018-08-25 18:43:59 -07:00
2018-08-21 18:19:09 -07:00
2018-05-03 16:11:37 -06:00
2018-08-21 18:19:09 -07:00
2018-08-21 18:19:09 -07:00
2018-07-18 15:44:40 +02:00
2018-08-21 18:15:47 -07:00
2018-06-11 08:22:34 -07:00
2018-08-21 18:19:09 -07:00
2018-02-15 15:34:42 -05:00
2018-08-21 18:19:09 -07:00
2018-04-04 12:44:02 -07:00