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)
commitd653788a43475eb3cdfcfaa60fb53451878944cf
tree0da228bfc15f19a852ef49e7b2519022d8e15a96
parent46c04366bbfd112a74dcfebbe41c9bf3f496ea75
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
This page took 0.028109 seconds and 5 git commands to generate.