f2fs: fix to enlarge size of write_io_dummy mempool
authorChao Yu <yuchao0@huawei.com>
Mon, 27 Feb 2017 10:43:13 +0000 (18:43 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 27 Feb 2017 18:40:10 +0000 (10:40 -0800)
It needs to double cache size of write_io_dummy mempool, otherwise we may
run out of cache in scenraio of Data/Node IOs were issued concurrently.

Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/super.c

index 5330588..7571eb2 100644 (file)
@@ -1929,7 +1929,7 @@ try_onemore:
 
        if (F2FS_IO_SIZE(sbi) > 1) {
                sbi->write_io_dummy =
-                       mempool_create_page_pool(F2FS_IO_SIZE(sbi) - 1, 0);
+                       mempool_create_page_pool(2 * (F2FS_IO_SIZE(sbi) - 1), 0);
                if (!sbi->write_io_dummy)
                        goto free_options;
        }