All of lore.kernel.org
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH] f2fs-tools: fix the calculation raw_node->footer.next_blkaddr for in f2fs_write_root_inode
@ 2013-06-28  2:41 Wang Sheng-Hui
  2013-06-28  2:51 ` Jaegeuk Kim
  0 siblings, 1 reply; 2+ messages in thread
From: Wang Sheng-Hui @ 2013-06-28  2:41 UTC (permalink / raw)
  To: linux-f2fs-devel, jaegeuk.kim

The raw_node will take 1 blk itself, and its next blk addr should be +1.

Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
---
  mkfs/f2fs_format.c |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c
index 06771ff..3ab41cc 100644
--- a/mkfs/f2fs_format.c
+++ b/mkfs/f2fs_format.c
@@ -744,7 +744,7 @@ static int f2fs_write_root_inode(void)
  	raw_node->footer.next_blkaddr = cpu_to_le32(
  			le32_to_cpu(super_block.main_blkaddr) +
  			config.cur_seg[CURSEG_HOT_NODE] *
-			config.blks_per_seg + 1);
+			config.blks_per_seg) + 1;

  	raw_node->i.i_mode = cpu_to_le16(0x41ed);
  	raw_node->i.i_links = cpu_to_le32(2);
-- 
1.7.10.4


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-06-28  2:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-28  2:41 [f2fs-dev] [PATCH] f2fs-tools: fix the calculation raw_node->footer.next_blkaddr for in f2fs_write_root_inode Wang Sheng-Hui
2013-06-28  2:51 ` Jaegeuk Kim

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.