]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: optimize restore_node_summary slightly
authorGu Zheng <guz.fnst@cn.fujitsu.com>
Fri, 7 Mar 2014 10:43:36 +0000 (18:43 +0800)
committerJaegeuk Kim <jaegeuk.kim@samsung.com>
Mon, 10 Mar 2014 09:45:15 +0000 (18:45 +0900)
commit99c62a1240415a8750f4d6009bf73a448855d9b9
tree0da228bfc15f19a852ef49e7b2519022d8e15a96
parenta7705f0a9969ab68921606ed18c599f44ba508ac
f2fs: optimize restore_node_summary slightly

Previously, we ra_sum_pages to pre-read contiguous pages as more
as possible, and if we fail to alloc more pages, an ENOMEM error
will be reported upstream, even though we have alloced some pages
yet. In fact, we can use the available pages to do the job partly,
and continue the rest in the following circle. Only reporting ENOMEM
upstream if we really can not alloc any available page.

And another fix is ignoring dealing with the following pages if an
EIO occurs when reading page from page_list.

Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com>
Reviewed-by: Chao Yu <chao2.yu@samsung.com>
[Jaegeuk Kim: modify the flow for better neat code]
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
fs/f2fs/node.c
fs/f2fs/segment.c