提交 9af45ef5 编写于 作者: J Jaegeuk Kim

f2fs: add comments of start_bidx_of_node

The caller of start_bidx_of_node() should give proper node offsets which
point only direct node blocks. Otherwise, it is a caller's bug.
This patch adds comments to make it clear.
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
上级 a7fdffbd
...@@ -424,7 +424,11 @@ static int gc_node_segment(struct f2fs_sb_info *sbi, ...@@ -424,7 +424,11 @@ static int gc_node_segment(struct f2fs_sb_info *sbi,
} }
/* /*
* Calculate start block index that this node page contains * Calculate start block index indicating the given node offset.
* Be careful, caller should give this node offset only indicating direct node
* blocks. If any node offsets, which point the other types of node blocks such
* as indirect or double indirect node blocks, are given, it must be a caller's
* bug.
*/ */
block_t start_bidx_of_node(unsigned int node_ofs) block_t start_bidx_of_node(unsigned int node_ofs)
{ {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册