From: Jaegeuk Kim <jaegeuk.kim@samsung.com>
To: Wang Sheng-Hui <shhuiw@gmail.com>
Cc: linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH v2] f2fs-tools: fix the calculation for raw_node->footer.next_blkaddr in f2fs_write_root_inode
Date: Fri, 28 Jun 2013 14:56:22 +0900 [thread overview]
Message-ID: <1372398982.736.6.camel@kjgkr> (raw)
In-Reply-To: <51CD1B40.2080803@gmail.com>
Hi,
Again, it doesn't make sense why we should cpu_to_le32(x) +
cpu_to_le32(1) instead of cpu_to_le32(x + 1).
What is the problem?
2013-06-28 (금), 13:12 +0800, Wang Sheng-Hui:
> 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..f00ba04 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) + cpu_to_le32(1);
>
> raw_node->i.i_mode = cpu_to_le16(0x41ed);
> raw_node->i.i_links = cpu_to_le32(2);
--
Jaegeuk Kim
Samsung
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
next prev parent reply other threads:[~2013-06-28 5:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-28 5:12 [f2fs-dev] [PATCH v2] f2fs-tools: fix the calculation for raw_node->footer.next_blkaddr in f2fs_write_root_inode Wang Sheng-Hui
2013-06-28 5:56 ` Jaegeuk Kim [this message]
2013-06-28 5:56 ` Wang Sheng-Hui
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1372398982.736.6.camel@kjgkr \
--to=jaegeuk.kim@samsung.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=shhuiw@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).